From e6085d6726128a6ca49055d8fb6eb594848cf778 Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Fri, 16 Feb 2024 15:11:23 +0100 Subject: [PATCH] fix(CI): Remove coq-bignums beforehand & Ensure `make -C tests` runs after `make install` (#87) Co-authored-by: Erik Martin-Dorel Co-authored-by: Pierre Roux --- .github/workflows/docker-action.yml | 10 ++++++++++ coq-bignums.opam | 8 +++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-action.yml b/.github/workflows/docker-action.yml index 0216ceb..dc43cf0 100644 --- a/.github/workflows/docker-action.yml +++ b/.github/workflows/docker-action.yml @@ -1,3 +1,5 @@ +# Beware not to destroy this file when regenerating it from meta.yml + name: Docker CI on: @@ -25,6 +27,14 @@ jobs: with: opam_file: 'coq-bignums.opam' custom_image: ${{ matrix.image }} + install: | + startGroup "Install dependencies" + # sudo apt-get update -y -q + opam remove -y coq-bignums # remove coq-bignums already in image + opam pin add -n -y -k path $PACKAGE $WORKDIR + opam update -y + opam install --confirm-level=unsafe-yes -j 2 $PACKAGE --deps-only + endGroup export: 'OPAMWITHTEST' env: OPAMWITHTEST: 'true' diff --git a/coq-bignums.opam b/coq-bignums.opam index 0ac2f8d..16e28ce 100644 --- a/coq-bignums.opam +++ b/coq-bignums.opam @@ -13,10 +13,12 @@ This Coq library provides BigN, BigZ, and BigQ that used to be part of the standard library.""" build: [make "-j%{jobs}%"] -run-test: [make "-C" "tests" "-j%{jobs}%"] -install: [make "install"] +install: [ + [make "install"] + [make "-C" "tests" "-j%{jobs}%"] {with-test} +] depends: [ - "ocaml" + "ocaml" "coq" {= "dev"} ]