Skip to content

Commit 30419a2

Browse files
committed
chore: try to move to setup-ocaml v2
1 parent 1b87075 commit 30419a2

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- ubuntu-latest
2020
- windows-latest
2121
ocaml:
22-
- '4.08.1'
2322
- '4.03.0'
23+
- '4.08.1'
2424
- '4.12.0'
2525

2626
runs-on: ${{ matrix.os }}
@@ -32,23 +32,10 @@ jobs:
3232
if_true: "D:\\cygwin\\home\\runneradmin\\.opam"
3333
if_false: "~/.opam"
3434

35-
- name: Checkout code
36-
uses: actions/checkout@main
37-
38-
- name: Cache opam
39-
id: cache-opam
40-
uses: actions/cache@v2
35+
- uses: actions/checkout@v2
36+
- uses: ocaml/setup-ocaml@v2
4137
with:
42-
path: ${{ steps.path.outputs.value }}
43-
key: opam-${{ matrix.os }}-${{ matrix.ocaml }}
44-
45-
- name: Use OCaml ${{ matrix.ocaml }}
46-
uses: avsm/setup-ocaml@v1
47-
with:
48-
ocaml-version: ${{ matrix.ocaml }}
49-
50-
- run: opam update -u
51-
if: steps.cache-opam.outputs.cache-hit == 'true'
38+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
5239

5340
- run: opam pin -n .
5441

@@ -70,7 +57,3 @@ jobs:
7057
- run: opam exec -- dune runtest -j 1 -p containers # test only core on non-ubuntu platform
7158
if: ${{ matrix.os != 'ubuntu-latest' }}
7259

73-
- name: Remove troublesome files for caching on windows
74-
if: matrix.os == 'windows-latest'
75-
run: |
76-
if (Test-Path D:\\cygwin\\home\\runneradmin\\.opam\\ocaml-variants.${{ matrix.ocaml }}+mingw64c\\.opam-switch\\sources\\ocamlbuild.0.14.0\\examples\\){Remove-Item –path D:\\cygwin\\home\\runneradmin\\.opam\\ocaml-variants.${{ matrix.ocaml }}+mingw64c\\.opam-switch\\sources\\ocamlbuild.0.14.0\\examples\\ –recurse}

0 commit comments

Comments
 (0)