From 73cfeb9dbcaee25fa126e32e862d8d66a704d83c Mon Sep 17 00:00:00 2001 From: favonia Date: Wed, 30 Mar 2022 16:31:07 -0500 Subject: [PATCH] ci: test OCaml 4.08, 4.14, and 5.0 --- .github/workflows/ocaml.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ocaml.yml b/.github/workflows/ocaml.yml index 9be8943..c43bacf 100644 --- a/.github/workflows/ocaml.yml +++ b/.github/workflows/ocaml.yml @@ -6,17 +6,30 @@ on: pull_request: jobs: run: + strategy: + matrix: + ocaml-compiler: + - "4.08" + - "4.14" + - "ocaml-variants.5.0.0+trunk" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ocaml/setup-ocaml@v2 with: - ocaml-compiler: "4.14" - - run: opam pin . --with-doc --with-test --yes + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + - run: opam pin . --with-test --yes + if: ${{ matrix.ocaml-compiler != 'ocaml-variants.5.0.0+trunk' }} + - run: | + opam repo add alpha git+https://github.com/kit-ty-kate/opam-alpha-repository.git + opam pin . --with-doc --with-test --yes + if: ${{ matrix.ocaml-compiler == 'ocaml-variants.5.0.0+trunk' }} + - run: echo 'opam-build-root='`opam var bwd:build` >> $GITHUB_ENV - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && matrix.ocaml-compiler == 'ocaml-variants.5.0.0+trunk' }} - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && matrix.ocaml-compiler == 'ocaml-variants.5.0.0+trunk' }} with: force_orphan: true github_token: ${{ secrets.GITHUB_TOKEN }}