Make all tests #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Make all tests | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/make-test-all.yml" | |
| # push: | |
| workflow_dispatch: | |
| schedule: | |
| # Prime the caches every Monday | |
| - cron: 0 1 * * MON | |
| permissions: read-all | |
| # Copy-pasted from https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ocaml-version: | |
| - "4.14" | |
| - "5.3" | |
| name: Make test on OCaml v${{ matrix.ocaml-version }} | |
| runs-on: ubuntu-latest | |
| env: | |
| DUNE_CACHE: 'enabled-except-user-rules' | |
| steps: | |
| - name: Checkout tree | |
| uses: actions/checkout@v4 | |
| - name: Set-up OCaml ${{ matrix.ocaml-version }} | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-version }} | |
| dune-cache: true | |
| - name: Install herdtools7's dependencies | |
| run: opam install . --deps-only --yes --with-test | |
| - name: Install carpenter dependencies | |
| run: opam install feat qcheck re logs cmdliner | |
| - run: opam exec -- make build DUNE_PROFILE=dev | |
| - run: opam exec -- make test-all DUNE_PROFILE=dev | |
| env: | |
| ALL_TESTS: true | |
| - run: | | |
| opam exec -- dune build asllib/aslref.opam | |
| opam pin asllib | |
| opam install . | |
| aslref: | |
| name: Install ASLRef on OCaml v5 | |
| runs-on: ubuntu-latest | |
| env: | |
| DUNE_CACHE: 'enabled-except-user-rules' | |
| steps: | |
| - name: Checkout tree | |
| uses: actions/checkout@v4 | |
| - name: Set-up OCaml 5 | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: 5 | |
| dune-cache: true | |
| - name: Install dependencies | |
| run: | | |
| opam exec -- dune build asllib/aslref.opam | |
| opam install ./asllib --deps-only --yes | |
| - name: Define installation directory | |
| run: echo "INSTALL_DIR=${{ runner.temp }}/prefix" >> "$GITHUB_ENV" | |
| - name: Create installation directory | |
| run: mkdir $INSTALL_DIR | |
| - name: Build and install ASLRef | |
| run: | | |
| opam exec -- make build-aslref PREFIX=$INSTALL_DIR | |
| opam exec -- make install-aslref PREFIX=$INSTALL_DIR | |
| - name: Check ASLRef installed | |
| run: $INSTALL_DIR/bin/aslref --version |