Skip to content

CN: Mucore program export to Coq #6

CN: Mucore program export to Coq

CN: Mucore program export to Coq #6

Workflow file for this run

# Builds CN with Coq and runs Coq tests
name: CN-Coq
on:
pull_request:
push:
branches:
- master
- cn-logging
- cn-resource-logging
env:
CERBERUS_IMAGE_ID: ghcr.io/rems-project/cerberus/cn:release
# cancel in-progress job when a new push is performed
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
version: [5.2.0]
runs-on: ubuntu-22.04
steps:
- name: Checkout Cerberus
uses: actions/checkout@v4
- name: System dependencies (Ubuntu)
run: |
sudo apt-get install build-essential libgmp-dev z3 opam
- name: Restore OPAM cache
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}-with-coq
- name: Setup OPAM
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam switch create ${{ matrix.version }}-with-coq ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }}-with-coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
- name: Save OPAM cache
uses: actions/cache/save@v4
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
with:
path: ~/.opam
key: ${{ matrix.version }}-with-coq
- name: Install Cerberus
run: |
opam switch ${{ matrix.version }}-with-coq
eval $(opam env --switch=${{ matrix.version }}-with-coq )
opam pin --yes --no-action add cerberus-lib .
opam pin --yes --no-action add cerberus .
opam install --yes cerberus
- name: Install CN (with Coq)
run: |
opam switch ${{ matrix.version }}-with-coq
eval $(opam env --switch=${{ matrix.version }}-with-coq )
opam pin --yes --no-action add cn .
opam pin --yes --no-action add cn-coq .
opam install --yes cn cn-coq ocamlformat.0.26.2
- name: Run CN-Coq tests
run: |
opam switch ${{ matrix.version }}-with-coq
eval $(opam env --switch=${{ matrix.version }}-with-coq )
./tests/run-cn-coq.sh