chore: try to move to setup-ocaml v2

This commit is contained in:
Simon Cruanes 2021-08-02 13:51:24 -04:00
parent 1b87075284
commit 30419a2ec7

View file

@ -19,8 +19,8 @@ jobs:
- ubuntu-latest - ubuntu-latest
- windows-latest - windows-latest
ocaml: ocaml:
- '4.08.1'
- '4.03.0' - '4.03.0'
- '4.08.1'
- '4.12.0' - '4.12.0'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -32,23 +32,10 @@ jobs:
if_true: "D:\\cygwin\\home\\runneradmin\\.opam" if_true: "D:\\cygwin\\home\\runneradmin\\.opam"
if_false: "~/.opam" if_false: "~/.opam"
- name: Checkout code - uses: actions/checkout@v2
uses: actions/checkout@main - uses: ocaml/setup-ocaml@v2
- name: Cache opam
id: cache-opam
uses: actions/cache@v2
with: with:
path: ${{ steps.path.outputs.value }} ocaml-compiler: ${{ matrix.ocaml-compiler }}
key: opam-${{ matrix.os }}-${{ matrix.ocaml }}
- name: Use OCaml ${{ matrix.ocaml }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml }}
- run: opam update -u
if: steps.cache-opam.outputs.cache-hit == 'true'
- run: opam pin -n . - run: opam pin -n .
@ -70,7 +57,3 @@ jobs:
- run: opam exec -- dune runtest -j 1 -p containers # test only core on non-ubuntu platform - run: opam exec -- dune runtest -j 1 -p containers # test only core on non-ubuntu platform
if: ${{ matrix.os != 'ubuntu-latest' }} if: ${{ matrix.os != 'ubuntu-latest' }}
- name: Remove troublesome files for caching on windows
if: matrix.os == 'windows-latest'
run: |
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}