Skip to content

Commit f2ff92e

Browse files
fix CI using coq-library-undecidability github action file
1 parent 9c79689 commit f2ff92e

File tree

1 file changed

+45
-62
lines changed

1 file changed

+45
-62
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,53 @@
1-
name: CI
1+
name: coq-library-fol CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review]
47

5-
env:
6-
OCAML_VERSION: 4.11.0
7-
CACHE_KEY: opam-8.18-${{github.base_ref}}-${{github.ref}}
88
jobs:
9-
build-deps:
9+
build:
1010
runs-on: ubuntu-latest
11-
steps:
12-
- name: Try to restore build cache
13-
id: cache
14-
uses: actions/cache@v3
15-
with:
16-
path: "~/.opam"
17-
key: ${{env.CACHE_KEY}}
18-
restore-keys: |
19-
opam-8.18--refs/heads/${{github.base_ref}}
20-
21-
- name: Install OCaml
22-
uses: avsm/setup-ocaml@v1
23-
with:
24-
ocaml-version: ${{env.OCAML_VERSION}}
25-
26-
- name: Checkout code
27-
if: steps.cache.outputs.cache-hit != 'true'
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 1
3111

32-
- name: Build dependencies
33-
if: steps.cache.outputs.cache-hit != 'true'
34-
run: |
35-
opam repo add coq-released https://coq.inria.fr/opam/released
36-
opam update
37-
opam upgrade
38-
opam install . --deps-only --with-doc --with-test
39-
opam list --installed
12+
strategy:
13+
matrix:
14+
coq_version:
15+
- '8.18'
16+
ocaml_version:
17+
- '4.14-flambda'
18+
fail-fast: true
4019

41-
build-full:
42-
needs: build-deps
43-
runs-on: ubuntu-latest
4420
steps:
45-
- name: Restore build cache
46-
id: cache
47-
uses: actions/cache@v3
48-
with:
49-
path: "~/.opam"
50-
key: ${{env.CACHE_KEY}}
51-
52-
- name: Check sucess of cache restoration
53-
if: steps.cache.outputs.cache-hit != 'true'
54-
run: exit
55-
56-
- name: Install OCaml
57-
uses: avsm/setup-ocaml@v1
58-
with:
59-
ocaml-version: ${{env.OCAML_VERSION}}
60-
61-
- name: Checkout code
62-
uses: actions/checkout@v4
63-
with:
64-
fetch-depth: 1
65-
66-
- name: Build interfaces (vos)
67-
run: opam exec -- make -j 2 vos TIMED=1
6821

69-
- name: Build full (vo)
70-
run: opam exec -- make -j 2 all TIMED=1
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Docker-Coq-Action
28+
uses: coq-community/docker-coq-action@v1
29+
with:
30+
coq_version: ${{ matrix.coq_version }}
31+
ocaml_version: ${{ matrix.ocaml_version }}
32+
before_script: |
33+
startGroup "Workaround permission issue"
34+
sudo chown -R coq:coq . # <--
35+
opam exec -- ocamlfind list
36+
endGroup
37+
before_install: |
38+
startGroup "Print opam config"
39+
sudo chown -R coq:coq .
40+
opam config list; opam repo list; opam list
41+
endGroup
42+
script: |
43+
startGroup "Build project"
44+
opam exec -- make -j 2 all TIMED=1
45+
endGroup
46+
uninstall: |
47+
startGroup "Clean project"
48+
endGroup
49+
50+
- name: Revert permissions
51+
# to avoid a warning at cleanup time
52+
if: ${{ always() }}
53+
run: sudo chown -R 1001:116 . # <--

0 commit comments

Comments
 (0)