-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix CI using coq-library-undecidability github action file
- Loading branch information
1 parent
9c79689
commit f2ff92e
Showing
1 changed file
with
45 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,53 @@ | ||
name: CI | ||
name: coq-library-fol CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
env: | ||
OCAML_VERSION: 4.11.0 | ||
CACHE_KEY: opam-8.18-${{github.base_ref}}-${{github.ref}} | ||
jobs: | ||
build-deps: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Try to restore build cache | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.opam" | ||
key: ${{env.CACHE_KEY}} | ||
restore-keys: | | ||
opam-8.18--refs/heads/${{github.base_ref}} | ||
- name: Install OCaml | ||
uses: avsm/setup-ocaml@v1 | ||
with: | ||
ocaml-version: ${{env.OCAML_VERSION}} | ||
|
||
- name: Checkout code | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
opam repo add coq-released https://coq.inria.fr/opam/released | ||
opam update | ||
opam upgrade | ||
opam install . --deps-only --with-doc --with-test | ||
opam list --installed | ||
strategy: | ||
matrix: | ||
coq_version: | ||
- '8.18' | ||
ocaml_version: | ||
- '4.14-flambda' | ||
fail-fast: true | ||
|
||
build-full: | ||
needs: build-deps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore build cache | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.opam" | ||
key: ${{env.CACHE_KEY}} | ||
|
||
- name: Check sucess of cache restoration | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: exit | ||
|
||
- name: Install OCaml | ||
uses: avsm/setup-ocaml@v1 | ||
with: | ||
ocaml-version: ${{env.OCAML_VERSION}} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build interfaces (vos) | ||
run: opam exec -- make -j 2 vos TIMED=1 | ||
|
||
- name: Build full (vo) | ||
run: opam exec -- make -j 2 all TIMED=1 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Docker-Coq-Action | ||
uses: coq-community/docker-coq-action@v1 | ||
with: | ||
coq_version: ${{ matrix.coq_version }} | ||
ocaml_version: ${{ matrix.ocaml_version }} | ||
before_script: | | ||
startGroup "Workaround permission issue" | ||
sudo chown -R coq:coq . # <-- | ||
opam exec -- ocamlfind list | ||
endGroup | ||
before_install: | | ||
startGroup "Print opam config" | ||
sudo chown -R coq:coq . | ||
opam config list; opam repo list; opam list | ||
endGroup | ||
script: | | ||
startGroup "Build project" | ||
opam exec -- make -j 2 all TIMED=1 | ||
endGroup | ||
uninstall: | | ||
startGroup "Clean project" | ||
endGroup | ||
- name: Revert permissions | ||
# to avoid a warning at cleanup time | ||
if: ${{ always() }} | ||
run: sudo chown -R 1001:116 . # <-- |