Skip to content

Use record information in compiler reporting #73

Use record information in compiler reporting

Use record information in compiler reporting #73

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@v6
- 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@v5
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@v5
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: 🛠️ Install Rocq
run: opam install -y rocq-core.${{ matrix.rocq.version }}
# The Rocq backend currently compiles against math-comp master, soon to be
# released as 2.6.0. Analysis and finmap master need to be pinned as well to
# master, as current releases do not compile with math-comp master.
- name: 🛠️ Pin math-comp+finmap+analysis to master
run: |
opam pin add -y -k git https://github.com/math-comp/math-comp.git#master
opam pin add -y -k git https://github.com/math-comp/finmap.git#master
opam pin add -y -k git https://github.com/math-comp/analysis.git#master
- 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