Test Rocq #186
Workflow file for this run
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: Test Rocq | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| tags: | |
| - "v*" | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| merge_group: | |
| defaults: | |
| run: | |
| shell: sh | |
| jobs: | |
| test-vehicle-rocq: | |
| strategy: | |
| matrix: | |
| os: | |
| - name: "Linux" | |
| type: "ubuntu-latest" | |
| - name: "macOS" | |
| type: "macos-latest" | |
| haskell: | |
| - ghc: | |
| version: "9.6.5" | |
| cabal: | |
| version: "3.14.2.0" | |
| project-file: "cabal.project" | |
| extra-args: "" | |
| extra-args-test-golden: "" | |
| ocaml: | |
| - version: "5.4.1" | |
| rocq: | |
| - version: "9.1.1" | |
| name: Rocq / ${{ matrix.os.name }} - Rocq ${{ matrix.rocq.version }} | |
| runs-on: ${{ matrix.os.type }} | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v7 | |
| - name: 🛠️ Install Haskell | |
| uses: haskell-actions/setup@v2 | |
| id: setup-haskell | |
| with: | |
| ghc-version: ${{ matrix.haskell.ghc.version }} | |
| cabal-version: ${{ matrix.haskell.cabal.version }} | |
| - name: 🛠️ Configure | |
| run: | | |
| cabal configure --project-file=${{ matrix.haskell.cabal.project-file }} | |
| cabal build all --project-file=${{ matrix.haskell.cabal.project-file }} --dry-run | |
| - name: 💾 Restore Cabal dependencies | |
| uses: actions/cache/restore@v6 | |
| if: ${{ !env.ACT }} | |
| id: cache-haskell | |
| env: | |
| key: ${{ matrix.os.name }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }} | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
| restore-keys: ${{ env.key }}- | |
| - name: 🛠️ Install Cabal dependencies | |
| if: ${{ env.ACT || steps.cache-haskell.outputs.cache-hit != 'true' }} | |
| run: cabal build all --only-dependencies | |
| - name: 💾 Save Cabal dependencies | |
| uses: actions/cache/save@v6 | |
| if: ${{ !env.ACT && steps.cache-haskell.outputs.cache-hit != 'true' }} | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ steps.cache-haskell.outputs.cache-primary-key }} | |
| - name: 🛠️ Install OCaml | |
| uses: ocaml/setup-ocaml@v3.6.1 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml.version }} | |
| - name: 🛠️ Add Rocq opam repository | |
| run: opam repo add rocq-released https://rocq-prover.org/opam/released | |
| - name: 💾 Restore opam cache | |
| uses: actions/cache/restore@v6 | |
| if: ${{ !env.ACT }} | |
| id: cache-opam | |
| env: | |
| key: opam-${{ matrix.os.name }}-ocaml-${{ matrix.ocaml.version }}-rocq-${{ matrix.rocq.version }} | |
| with: | |
| path: ~/.opam | |
| key: ${{ env.key }}-deps-${{ hashFiles('vehicle-rocq/vehicle-rocq.opam') }} | |
| restore-keys: ${{ env.key }}- | |
| - name: 🛠️ Install Rocq + vehicle-rocq deps | |
| if: ${{ env.ACT || steps.cache-opam.outputs.cache-hit != 'true' }} | |
| run: | | |
| opam install -y rocq-core.${{ matrix.rocq.version }} | |
| opam install -y --deps-only ./vehicle-rocq | |
| - name: 💾 Save opam cache | |
| uses: actions/cache/save@v6 | |
| if: ${{ !env.ACT && steps.cache-opam.outputs.cache-hit != 'true' }} | |
| with: | |
| path: ~/.opam | |
| key: ${{ steps.cache-opam.outputs.cache-primary-key }} | |
| - name: 🛠️ Install vehicle-rocq | |
| run: opam install -y ./vehicle-rocq | |
| - name: 🧪 Test Vehicle-Rocq interaction | |
| run: | | |
| eval $(opam env) | |
| cabal test \ | |
| vehicle:test:golden-tests \ | |
| --test-show-details=always \ | |
| --test-option=--color=always \ | |
| --test-option=--num-threads=1 \ | |
| --test-option=-p \ | |
| --test-option='/Rocq/' \ | |
| --test-option=--allowlist-externals=rocq |