@@ -2,61 +2,55 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [master]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [master]
8
8
9
- env :
10
- OCAML_VERSION : 4.14.0
11
-
12
9
jobs :
13
10
test :
14
11
strategy :
15
12
fail-fast : false
16
13
matrix :
17
14
os : [macos-latest, ubuntu-latest, windows-latest, macos-arm]
15
+ ocaml_compiler : [4.14.0]
18
16
19
17
runs-on : ${{matrix.os}}
20
-
18
+
21
19
steps :
22
- - name : " Windows: Set git to use LF"
23
- if : runner.os == 'Windows'
24
- run : |
25
- git config --global core.autocrlf false
26
- git config --global core.eol lf
27
-
28
- - uses : actions/checkout@v3
29
-
30
- - name : Use OCaml ${{env.OCAML_VERSION}}
31
- if : runner.name != 'macos-arm'
32
- uses : ocaml/setup-ocaml@v2.0.3
33
- with :
34
- ocaml-compiler : ${{env.OCAML_VERSION}}
35
- # Set default repo explicitly.
36
- # Windows uses https://github.com/fdopen/opam-repository-mingw otherwise which may be out of date.
37
- opam-repositories : |
38
- default: https://github.com/ocaml/opam-repository.git
39
- opam-pin : false
40
- opam-depext : false
41
-
42
- - name : Use OCaml ${{env.OCAML_VERSION}}
43
- if : runner.name == 'macos-arm'
44
- uses : AbstractMachinesLab/setup-ocaml@arm-support
45
- with :
46
- ocaml-compiler : ${{env.OCAML_VERSION}}
47
- opam-pin : false
48
- opam-depext : false
49
-
50
- - name : Install dependencies
51
- run : opam install . --deps-only
52
-
53
- - name : Build executables
54
- run : opam exec -- dune build
55
-
56
- - name : Run roundtrip tests
57
- if : runner.os != 'Windows'
58
- run : opam exec -- make roundtrip-test
59
-
60
- - name : Run tests (Windows)
61
- if : runner.os == 'Windows'
62
- run : opam exec -- make test
20
+ - name : " Windows: Set git to use LF"
21
+ if : runner.os == 'Windows'
22
+ run : |
23
+ git config --global core.autocrlf false
24
+ git config --global core.eol lf
25
+
26
+ - uses : actions/checkout@v3
27
+
28
+ - name : Use OCaml ${{matrix.ocaml_compiler}}
29
+ if : runner.name != 'macos-arm'
30
+ uses : ocaml/setup-ocaml@v2
31
+ with :
32
+ ocaml-compiler : ${{matrix.ocaml_compiler}}
33
+ opam-pin : false
34
+ opam-depext : false
35
+
36
+ - name : Use OCaml ${{matrix.ocaml_compiler}} (macOS ARM)
37
+ if : runner.name == 'macos-arm'
38
+ uses : AbstractMachinesLab/setup-ocaml@arm-support
39
+ with :
40
+ ocaml-compiler : ${{matrix.ocaml_compiler}}
41
+ opam-pin : false
42
+ opam-depext : false
43
+
44
+ - name : Install dependencies
45
+ run : opam install . --deps-only
46
+
47
+ - name : Build executables
48
+ run : opam exec -- dune build
49
+
50
+ - name : Run roundtrip tests
51
+ if : runner.os != 'Windows'
52
+ run : opam exec -- make roundtrip-test
53
+
54
+ - name : Run tests (Windows)
55
+ if : runner.os == 'Windows'
56
+ run : opam exec -- make test
0 commit comments