diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d66d007..1210d42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,6 +51,11 @@ jobs: ocaml-compiler: ${{ matrix.ocaml-compiler }} allow-prerelease-opam: true + - name: set ocamlversion + run: echo "ocamlversion=$(opam exec -- ocamlc -version)" >> $GITHUB_OUTPUT + id: conf + shell: bash + - run: opam install . --with-test --deps-only - run: opam exec -- make test @@ -63,13 +68,13 @@ jobs: - run: opam exec -- opam install -v ocamlbuild - run: opam exec -- opam install -v menhir - run: opam exec -- opam install -v camlp4 - if: (! startsWith(matrix.ocaml-compiler, '5.2')) + if: ${{ ! startsWith(steps.conf.outputs.ocamlversion, '5.2.') }} - run: opam exec -- make test-external - if: (! startsWith(matrix.ocaml-compiler, '5.2')) - - run: opam exec -- opam install -v mtime.1.0.0 # this tests topkg, with stub libraries + if: ${{ ! startsWith(steps.conf.outputs.ocamlversion, '5.2.') }} + - run: opam exec -- opam install -v mtime.1.4.0 # this tests topkg, with stub libraries - run: opam exec -- opam install -v inotify.2.3 # this tests oasis, with stub libraries - if: (! startsWith(matrix.ocaml-compiler, '5')) && runner.os != 'Windows' + if: ${{ ! startsWith(steps.conf.outputs.ocamlversion, '5.') && runner.os != 'Windows' }} - run: opam exec -- opam install -v cpuid.0.1.1 # this tests the ocb-stubblr plugin if: runner.os != 'Windows' - run: opam exec -- opam install -v shcaml.0.2.1 # this tests the cppo plugin - if: (! startsWith(matrix.ocaml-compiler, '5')) && runner.os != 'Windows' + if: ${{ ! startsWith(steps.conf.outputs.ocamlversion, '5.') && runner.os != 'Windows' }}