forked from sosy-lab/sv-benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
205 lines (175 loc) · 5.29 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# This file is part of the SV-Benchmarks collection of verification tasks:
# https://github.com/sosy-lab/sv-benchmarks
#
# SPDX-FileCopyrightText: 2011-2020 The SV-Benchmarks Community
#
# SPDX-License-Identifier: Apache-2.0
stages:
- images
- checks
# have CI for both branches and merge requests, but no duplicates
# (i.e., do not run branch CI if there is a MR open)
# https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
workflow:
rules:
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
when: never
- when: always
sanity-checks:
stage: checks
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/sanity-checks:latest
script: "c/check.py"
# for jobs that should only be executed on branches (and MRs)
.branch-rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
# for jobs that should not be executed on branches and MRs, but for main, tags, schedules, etc.
.main-rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
when: never
- when: always
.branch-compile-check: &branch-compile-check
stage: checks
rules:
- !reference [.branch-rules, rules]
script:
- "${CC} -v --version"
- "cd c"
- "./diff_ci.sh 'make -j2 -C'"
.clang-3-9: &clang-3-9
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/clang:3.9
variables:
CC: clang-3.9
.gcc-5: &gcc-5
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/gcc:5
variables:
CC: gcc-5
branch-compile-clang:3.9:
<<: *branch-compile-check
<<: *clang-3-9
branch-compile-gcc:5:
<<: *branch-compile-check
<<: *gcc-5
.main-compile-check: &main-compile-check
stage: checks
rules:
- !reference [.main-rules, rules]
script:
- "${CC} -v --version"
- "cd c"
- "make -j2"
.main-compile-check-juliet: &main-compile-check-juliet
stage: checks
rules:
- !reference [.main-rules, rules]
script:
- "${CC} -v --version"
- "cd c/Juliet_Test"
- "make -j2"
main-compile-clang:3.9:
<<: *main-compile-check
<<: *clang-3-9
main-compile-gcc:5:
<<: *main-compile-check
<<: *gcc-5
main-compile-clang:3.9-juliet:
<<: *main-compile-check-juliet
<<: *clang-3-9
main-compile-gcc:5-juliet:
<<: *main-compile-check-juliet
<<: *gcc-5
branch-preprocessing-consistency:
stage: checks
rules:
- !reference [.branch-rules, rules]
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/preprocessing-consistency:latest
script:
- "cd c"
- "./diff_ci.sh './compare.py --keep-going --skip-large --directory'"
main-preprocessing-consistency:
stage: checks
rules:
- !reference [.main-rules, rules]
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/preprocessing-consistency:latest
script:
- "goto-diff --version"
- "cd c"
- "./compare.py --keep-going --skip-large"
java:
stage: checks
image: registry.gitlab.com/sosy-lab/benchmarking/sv-benchmarks/ci/java:latest
script:
- "cd java"
- "javac -version"
- "./check-compile.py"
java-format:
stage: checks
image: openjdk:11
script: "java/check-format.sh"
cache:
key: "$CI_JOB_NAME"
paths:
- "java/*.jar"
check-links:
stage: checks
image: "$CI_REGISTRY/sosy-lab/benchmarking/sv-benchmarks/ci/link-checks:latest"
script: "FAIL=0; for md in $(find . -name '*.md'); do pandoc -t html5 \"$md\" -o \"$md\".html; echo -e \"\\n\\nFILE: $md\"; linkchecker --check-extern --config .linkchecker.config \"$md\".html; FAIL=$((FAIL += $?)); rm \"$md\".html; done; exit $FAIL"
.build-docker:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --dockerfile $CI_PROJECT_DIR/$DOCKERFILE --destination $CI_REGISTRY_IMAGE/$IMAGE
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
build-docker:clang:3.9:
extends: .build-docker
stage: images
variables:
DOCKERFILE: c/.Dockerfile.clang-3.9
IMAGE: ci/clang:3.9
build-docker:gcc:5:
extends: .build-docker
stage: images
variables:
DOCKERFILE: c/.Dockerfile.gcc-5
IMAGE: ci/gcc:5
build-docker:preprocessing-consistency:latest:
extends: .build-docker
stage: images
variables:
DOCKERFILE: c/.Dockerfile.preprocessing-consistency
IMAGE: ci/preprocessing-consistency:latest
build-docker:sanity-checks:latest:
extends: .build-docker
stage: images
variables:
DOCKERFILE: c/.Dockerfile.sanity-checks
IMAGE: ci/sanity-checks:latest
build-docker:java:latest:
extends: .build-docker
stage: images
variables:
DOCKERFILE: java/.Dockerfile
IMAGE: ci/java:latest
build-docker:link-checks:latest:
extends: .build-docker
stage: images
variables:
DOCKERFILE: .Dockerfile.link-checks
IMAGE: ci/link-checks:latest
# check license declarations etc.
reuse:
stage: checks
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint