forked from coq/opam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
187 lines (168 loc) · 4.24 KB
/
.gitlab-ci.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
stages:
- lint
- build
image: buildpack-deps:stable-scm
variables:
OPAMJOBS: "2"
cache:
paths:
- opam-cache
key: v2
before_script:
- export HOME=$(pwd)
- echo CI_RUNNER_TAGS=${CI_RUNNER_TAGS}
- export OPAM_VARIANT=$(if echo $CI_RUNNER_TAGS | grep -q no-sandbox; then echo "plain"; else echo "sandbox"; fi)
- echo OPAM_VARIANT=${OPAM_VARIANT}
- export OPAM_VERSION=2.1.2
- export OPAM_ROOT_DIR=${HOME}/opam-root-${COMPILER}-${OPAM_VERSION}-${OPAM_VARIANT}
- export OPAM_ROOT_CACHE=${HOME}/opam-cache/cache-${COMPILER}-${OPAM_VERSION}-${OPAM_VARIANT}.tgz
- apt-get update -qy
- apt-get install libgtksourceview2.0-dev -y || true # gone with Debian bullseye
- apt-get install build-essential -y # missing with Debian bullseye
- apt-get install unzip libgtksourceview-3.0-dev libncurses5-dev curl jq ruby bubblewrap time libgmp-dev coinor-csdp libstring-shellquote-perl libipc-system-simple-perl automake autoconf libtool wdiff -y # wdiff is used in test-suite of hierarchy-builder
- apt-get install clang -y
- test -e $OPAM_ROOT_CACHE || scripts/opam-coq-init
- curl -L https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-${OPAM_VERSION}-x86_64-linux >/usr/local/bin/opam
- chmod +x /usr/local/bin/opam
- set -o pipefail
.opam-build:
stage: build
tags:
- ci.inria.fr
- medium
script: |
PR=${CI_COMMIT_REF_NAME##pr-};
echo "Github PR number: $PR";
SKIP=$(set +o pipefail; curl https://api.github.com/repos/coq/opam/issues/$PR | jq -rc .body | grep ^ci-skip: | cat );
echo "SKIP packages per user request: $SKIP";
scripts/opam-coq-list-pr-files | xargs scripts/opam-coq-install-remove $OPAM_ROOT_CACHE $SKIP --
artifacts:
name: "$CI_JOB_NAME"
when: on_failure
paths:
- log/
expire_in: 1 week
# Json
json-data:
stage: build
tags:
- ci.inria.fr
- medium
variables:
COMPILER: "4.11.2"
script: |
. scripts/opam-coq-setup-root
mkdir -p log; > log/log.json
setup_root $OPAM_ROOT_CACHE log/log.json
opam install -y dune.2.9.3 opam-core.2.1.0 opam-file-format.2.1.3 ppx_deriving_yojson.3.6.1
ocamlfind opt -package opam-file-format,opam-core,ppx_deriving_yojson,str -linkpkg scripts/archive2web.ml -o scripts/archive2web
scripts/archive2web released extra-dev > coq-packages.json
artifacts:
name: "$CI_JOB_NAME"
paths:
- coq-packages.json
expire_in: 1 week
# Lint
opam-lint:
stage: lint
tags:
- ci.inria.fr
- medium
variables:
COMPILER: "4.11.2"
script:
- scripts/opam-coq-list-pr-files | xargs scripts/opam-coq-lint
# Build
opam-build:4.07.1:
extends: .opam-build
variables:
COMPILER: "4.07.1"
except:
- web
opam-build:4.11.2:
extends: .opam-build
variables:
COMPILER: "4.11.2"
except:
- web
opam-build:4.14.0:
extends: .opam-build
variables:
COMPILER: "4.14.0"
except:
- web
opam-build:5.0.0:
extends: .opam-build
variables:
COMPILER: "5.0.0"
except:
- web
opam-build:any:
extends: .opam-build
variables:
COMPILER: "4.09.0"
EXTRA_OPAM_OPTION: "--update-invariant"
except:
- web
# Build without timeout
opam-build-no-timeout:4.05.0:
extends: .opam-build
variables:
COMPILER: "4.05.0"
only:
- web
tags:
- no-timeout
opam-build-no-timeout:4.07.1:
extends: .opam-build
variables:
COMPILER: "4.07.1"
only:
- web
tags:
- no-timeout
opam-build-no-timeout:4.09.0:
extends: .opam-build
variables:
COMPILER: "4.09.0"
only:
- web
tags:
- no-timeout
opam-build-no-timeout:4.11.2:
extends: .opam-build
variables:
COMPILER: "4.11.2"
only:
- web
tags:
- no-timeout
opam-build-no-timeout:4.13.1:
extends: .opam-build
variables:
COMPILER: "4.13.1"
only:
- web
tags:
- no-timeout
opam-build-no-timeout:any:
extends: .opam-build
variables:
COMPILER: "4.09.0"
EXTRA_OPAM_OPTION: "--update-invariant"
only:
- web
tags:
- no-timeout
# JSON data
# json-data:
# image: nixos/nix:2.3.12
# cache: {}
# before_script: []
# script:
# - nix-shell --run "dune exec --profile=release -- archive2web released extra-dev > coq-packages.json"
# artifacts:
# name: "$CI_JOB_NAME"
# paths:
# - coq-packages.json
# expire_in: 1 year