Skip to content

Commit d19467c

Browse files
authored
Merge pull request #98 from mbarbin/ocaml-5.4-in-ci
Enable OCaml 5.4 in CI
2 parents 20e0361 + c8690d4 commit d19467c

File tree

10 files changed

+175
-8
lines changed

10 files changed

+175
-8
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os:
1717
- ubuntu-latest
1818
ocaml-compiler:
19-
- 5.3.x
19+
- 5.4.x
2020

2121
runs-on: ${{ matrix.os }}
2222

@@ -32,7 +32,7 @@ jobs:
3232
opam-repositories: |
3333
default: https://github.com/ocaml/opam-repository.git
3434
mbarbin: https://github.com/mbarbin/opam-repository.git
35-
# alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
35+
alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
3636
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
3737
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
3838

.github/workflows/deploy-doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
- name: Setup OCaml
3535
uses: ocaml/setup-ocaml@v3
3636
with:
37-
ocaml-compiler: "5.3.x"
37+
ocaml-compiler: "5.4.x"
3838
dune-cache: true
3939
opam-repositories: |
4040
default: https://github.com/ocaml/opam-repository.git
4141
mbarbin: https://github.com/mbarbin/opam-repository.git
42-
# alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
42+
alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
4343
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
4444
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
4545

.github/workflows/more-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ jobs:
2828
- macos-latest
2929
- ubuntu-latest
3030
ocaml-compiler:
31+
- 5.4.x
3132
- 5.3.x
3233
- 5.2.x
3334
exclude:
3435
# We exclude the combination already tested in the 'ci' workflow.
3536
- os: ubuntu-latest
36-
ocaml-compiler: 5.3.x
37+
ocaml-compiler: 5.4.x
3738

3839
runs-on: ${{ matrix.os }}
3940

@@ -49,7 +50,7 @@ jobs:
4950
opam-repositories: |
5051
default: https://github.com/ocaml/opam-repository.git
5152
mbarbin: https://github.com/mbarbin/opam-repository.git
52-
# alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
53+
alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
5354
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
5455
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
5556

.github/workflows/test-deploy-doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
- name: Setup OCaml
3535
uses: ocaml/setup-ocaml@v3
3636
with:
37-
ocaml-compiler: "5.3.x"
37+
ocaml-compiler: "5.4.x"
3838
dune-cache: true
3939
opam-repositories: |
4040
default: https://github.com/ocaml/opam-repository.git
4141
mbarbin: https://github.com/mbarbin/opam-repository.git
42-
# alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
42+
alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
4343
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
4444
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
4545

lib/cr_comment/test/test__filter.ml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ let%expect_test "all" =
5454
()
5555
;;
5656

57+
let%expect_test "equal" =
58+
require_equal [%here] (module Cr_comment.Filter) All All;
59+
require_not_equal [%here] (module Cr_comment.Filter) All Invalid;
60+
[%expect {||}];
61+
()
62+
;;
63+
64+
let%expect_test "compare" =
65+
print_s
66+
[%sexp
67+
(List.sort
68+
(List.concat [ List.rev Cr_comment.Filter.all; [ Soon; Invalid; Someday; Now ] ])
69+
~compare:Cr_comment.Filter.compare
70+
: Cr_comment.Filter.t list)];
71+
[%expect {| (All Invalid Invalid CRs XCRs Now Now Soon Soon Someday Someday) |}];
72+
()
73+
;;
74+
5775
let%expect_test "string count" =
5876
let count = List.length Cr_comment.Filter.all in
5977
let string_count =
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
(********************************************************************************)
2+
(* crs - A tool for managing code review comments embedded in source code *)
3+
(* Copyright (C) 2024-2025 Mathieu Barbin <mathieu.barbin@gmail.com> *)
4+
(* *)
5+
(* This file is part of crs. *)
6+
(* *)
7+
(* crs is free software; you can redistribute it and/or modify it under the *)
8+
(* terms of the GNU Lesser General Public License as published by the Free *)
9+
(* Software Foundation either version 3 of the License, or any later version, *)
10+
(* with the LGPL-3.0 Linking Exception. *)
11+
(* *)
12+
(* crs is distributed in the hope that it will be useful, but WITHOUT ANY *)
13+
(* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *)
14+
(* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and *)
15+
(* the file `NOTICE.md` at the root of this repository for more details. *)
16+
(* *)
17+
(* You should have received a copy of the GNU Lesser General Public License *)
18+
(* and the LGPL-3.0 Linking Exception along with this library. If not, see *)
19+
(* <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively. *)
20+
(********************************************************************************)
21+
22+
let%expect_test "all" =
23+
List.iter Cr_comment.Priority.all ~f:(fun priority ->
24+
print_s [%sexp { priority : Cr_comment.Priority.t }]);
25+
[%expect
26+
{|
27+
((priority Now))
28+
((priority Soon))
29+
((priority Someday))
30+
|}];
31+
()
32+
;;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(*_*******************************************************************************)
2+
(*_ crs - A tool for managing code review comments embedded in source code *)
3+
(*_ Copyright (C) 2024-2025 Mathieu Barbin <mathieu.barbin@gmail.com> *)
4+
(*_ *)
5+
(*_ This file is part of crs. *)
6+
(*_ *)
7+
(*_ crs is free software; you can redistribute it and/or modify it under the *)
8+
(*_ terms of the GNU Lesser General Public License as published by the Free *)
9+
(*_ Software Foundation either version 3 of the License, or any later version, *)
10+
(*_ with the LGPL-3.0 Linking Exception. *)
11+
(*_ *)
12+
(*_ crs is distributed in the hope that it will be useful, but WITHOUT ANY *)
13+
(*_ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *)
14+
(*_ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and *)
15+
(*_ the file `NOTICE.md` at the root of this repository for more details. *)
16+
(*_ *)
17+
(*_ You should have received a copy of the GNU Lesser General Public License *)
18+
(*_ and the LGPL-3.0 Linking Exception along with this library. If not, see *)
19+
(*_ <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively. *)
20+
(*_*******************************************************************************)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
(********************************************************************************)
2+
(* crs - A tool for managing code review comments embedded in source code *)
3+
(* Copyright (C) 2024-2025 Mathieu Barbin <mathieu.barbin@gmail.com> *)
4+
(* *)
5+
(* This file is part of crs. *)
6+
(* *)
7+
(* crs is free software; you can redistribute it and/or modify it under the *)
8+
(* terms of the GNU Lesser General Public License as published by the Free *)
9+
(* Software Foundation either version 3 of the License, or any later version, *)
10+
(* with the LGPL-3.0 Linking Exception. *)
11+
(* *)
12+
(* crs is distributed in the hope that it will be useful, but WITHOUT ANY *)
13+
(* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *)
14+
(* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and *)
15+
(* the file `NOTICE.md` at the root of this repository for more details. *)
16+
(* *)
17+
(* You should have received a copy of the GNU Lesser General Public License *)
18+
(* and the LGPL-3.0 Linking Exception along with this library. If not, see *)
19+
(* <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively. *)
20+
(********************************************************************************)
21+
22+
let%expect_test "all" =
23+
List.iter Cr_comment.Qualifier.all ~f:(fun qualifier ->
24+
let priority = Cr_comment.Qualifier.priority qualifier in
25+
print_s
26+
[%sexp { qualifier : Cr_comment.Qualifier.t; priority : Cr_comment.Priority.t }]);
27+
[%expect
28+
{|
29+
((qualifier None)
30+
(priority Now))
31+
((qualifier Soon)
32+
(priority Soon))
33+
((qualifier Someday)
34+
(priority Someday))
35+
|}];
36+
()
37+
;;
38+
39+
let%expect_test "equal" =
40+
require_equal [%here] (module Cr_comment.Qualifier) None None;
41+
require_not_equal [%here] (module Cr_comment.Qualifier) None Soon;
42+
[%expect {||}];
43+
()
44+
;;
45+
46+
let%expect_test "compare" =
47+
print_s
48+
[%sexp
49+
(List.sort
50+
(List.concat
51+
[ List.rev Cr_comment.Qualifier.all; [ Soon; None; Someday; None ] ])
52+
~compare:Cr_comment.Qualifier.compare
53+
: Cr_comment.Qualifier.t list)];
54+
[%expect {| (None None None Soon Soon Someday Someday) |}];
55+
()
56+
;;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(*_*******************************************************************************)
2+
(*_ crs - A tool for managing code review comments embedded in source code *)
3+
(*_ Copyright (C) 2024-2025 Mathieu Barbin <mathieu.barbin@gmail.com> *)
4+
(*_ *)
5+
(*_ This file is part of crs. *)
6+
(*_ *)
7+
(*_ crs is free software; you can redistribute it and/or modify it under the *)
8+
(*_ terms of the GNU Lesser General Public License as published by the Free *)
9+
(*_ Software Foundation either version 3 of the License, or any later version, *)
10+
(*_ with the LGPL-3.0 Linking Exception. *)
11+
(*_ *)
12+
(*_ crs is distributed in the hope that it will be useful, but WITHOUT ANY *)
13+
(*_ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *)
14+
(*_ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and *)
15+
(*_ the file `NOTICE.md` at the root of this repository for more details. *)
16+
(*_ *)
17+
(*_ You should have received a copy of the GNU Lesser General Public License *)
18+
(*_ and the LGPL-3.0 Linking Exception along with this library. If not, see *)
19+
(*_ <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively. *)
20+
(*_*******************************************************************************)

lib/cr_comment/test/test__status.ml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,23 @@ let%expect_test "to_string" =
3535
|}];
3636
()
3737
;;
38+
39+
let%expect_test "equal" =
40+
require_equal [%here] (module Cr_comment.Status) CR CR;
41+
require_not_equal [%here] (module Cr_comment.Status) CR XCR;
42+
[%expect {||}];
43+
()
44+
;;
45+
46+
let%expect_test "compare" =
47+
let cr = Cr_comment.Status.CR in
48+
let xcr = Cr_comment.Status.XCR in
49+
print_s
50+
[%sexp
51+
(List.sort
52+
(List.concat [ List.rev Cr_comment.Status.all; [ xcr; cr; xcr ] ])
53+
~compare:Cr_comment.Status.compare
54+
: Cr_comment.Status.t list)];
55+
[%expect {| (CR CR XCR XCR XCR) |}];
56+
()
57+
;;

0 commit comments

Comments
 (0)