Skip to content

Drop unneeded build matrix items #2

Drop unneeded build matrix items

Drop unneeded build matrix items #2

Workflow file for this run

name: Build and test
on:
- push
- pull_request
- workflow_dispatch
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest
# - windows-latest # zarith fails to build on Windows
ocaml-compiler:
- "5.2"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Cache opam root
uses: actions/cache@v4
with:
path: ~/.opam
key: opam-root-${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}-${{ hashFiles('flake.nix') }}
- name: Cache opam switch
id: cache-opam-packages
uses: actions/cache@v4
with:
path: switch-state.tar.gz
key: opam-cache-${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}-${{ hashFiles('flake.nix') }}
- name: Install cached opam packages
if: steps.cache-opam-packages.outputs.cache-hit == 'true'
run: |
opam init --disable-sandboxing -y
eval $(opam env)
opam switch create . --deps-only --locked -y || opam switch import switch-state.tar.gz
- name: Install opam packages (uncached)
if: steps.cache-opam-packages.outputs.cache-hit != 'true'
run: opam install coq dune
- name: Dune build
run: opam exec -- dune build
- name: Export opam switch
if: steps.opam-cache.outputs.cache-hit != 'true'
run: |
eval $(opam env)
opam switch export switch-state.tar.gz