-
Notifications
You must be signed in to change notification settings - Fork 47
82 lines (78 loc) · 2.65 KB
/
docker-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# This file was generated from `meta.yml`, please do not edit manually.
# Follow the instructions on https://github.com/coq-community/templates to regenerate.
name: Docker CI
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
build:
# the OS must be GNU/Linux to be able to use the docker-coq-action
runs-on: ubuntu-latest
strategy:
matrix:
image:
- 'coqorg/coq:8.9'
- 'coqorg/coq:8.11'
- 'coqorg/coq:8.12-ocaml-4.10-flambda'
- 'coqorg/coq:8.13'
- 'coqorg/coq:8.14'
- 'coqorg/coq:8.15'
- 'coqorg/coq:8.16'
- 'coqorg/coq:8.17'
- 'coqorg/coq:8.18'
- 'coqorg/coq:8.19'
- 'coqorg/coq:8.20'
- 'coqorg/coq:dev'
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: coq-community/docker-coq-action@v1
with:
opam_file: 'coq-ext-lib.opam'
custom_image: ${{ matrix.image }}
before_install: |
startGroup "Setup and print opam config"
opam repo -a --set-default add coq-extra-dev https://coq.inria.fr/opam/extra-dev
opam config list; opam repo list; opam list
endGroup
after_script: |
startGroup "Test dependants"
PINS=$(opam list -s --pinned --columns=package | xargs | tr ' ' ,)
PACKAGES=`opam list -s --depends-on coq-ext-lib --coinstallable-with $PINS`
for PACKAGE in $PACKAGES
do DEPS_FAILED=false
opam install -y --deps-only $PACKAGE || DEPS_FAILED=true
[ $DEPS_FAILED == true ] || opam install -t $PACKAGE
done
endGroup
set -o pipefail # recommended if the script uses pipes
startGroup "Generate Coqdoc"
make -j`nproc` coqdoc || echo "Failed to generate Coqdoc"
endGroup
before_script: |
startGroup "Workaround permission issue"
sudo chown -R coq:coq .
endGroup
export: 'OPAMWITHTEST OPAMCONFIRMLEVEL'
env:
OPAMWITHTEST: true
OPAMCONFIRMLEVEL: unsafe-yes
- name: Revert permissions
# to avoid a warning at cleanup time
if: ${{ always() }}
run: sudo chown -R 1001:116 .
- uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: coqdoc
path: html
overwrite: true
# See also:
# https://github.com/coq-community/docker-coq-action#readme
# https://github.com/erikmd/docker-coq-github-action-demo