forked from aff3ct/aff3ct
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
207 lines (187 loc) · 5.08 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
207 lines (187 loc) · 5.08 KB
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
206
207
# CI environment
variables:
GIT_SUBMODULE_STRATEGY: none
workflow:
auto_cancel:
on_new_commit: interruptible
rules:
- if: $CI_COMMIT_TITLE =~ /-draft$/ # add '-draft' to 1st commit message line end to ignore pipeline
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_AFF3CT_ON_JOB_FAILURE == "none"
auto_cancel:
on_job_failure: none
- if: $CI_AFF3CT_ON_JOB_FAILURE == "all"
auto_cancel:
on_job_failure: all
stages:
- analysis
- build
- check
- test
- coverage
- deploy
# default values
default:
artifacts:
expire_in: 2 months
interruptible: true
before_script:
- hostname
- whoami
- pwd
# generic configuration for linux
.tags-linux:
tags:
- x86_64
- linux
- docker
.config-common-linux:
extends: .tags-linux
before_script:
- hostname
- whoami
###################
## analysis jobs ##
###################
analysis-headers:
extends: .tags-linux
rules:
- when: on_success
image: ubuntu:20.04
stage: analysis
artifacts:
name: analysis-headers
when: on_failure
paths:
- aff3ct.hpp
script:
- ./scripts/generate_aff3ct_header.sh aff3ct.hpp
- diff aff3ct.hpp include/aff3ct.hpp
analysis-cppcheck:
extends: .tags-linux
rules:
- when: on_success
image: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_cppcheck:v1.9
stage: analysis
allow_failure: false
artifacts:
name: analysis-cppcheck-logs
when: always
paths:
- cppcheck/
script:
- ./ci/analysis-cppcheck.sh
analysis-clang-format:
extends: .config-common-linux
image: ubuntu:22.04
stage: analysis
script:
- apt update
- apt -y install clang-format
- clang-format --version
- mkdir original_code
- cp -r include original_code
- cp -r src original_code
- ./scripts/apply_clang_format.sh
- mkdir new_code
- cp -r include new_code
- cp -r src new_code
- diff -r new_code original_code
analysis-clang:
extends: .tags-linux
rules:
- if: $CI_SERVER_HOST == "gitlab.com" && $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"
when: always
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: never
image: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_clang:v10.0.0
stage: analysis
variables:
GIT_SUBMODULE_STRATEGY: recursive
CFLAGS: -pedantic -fdiagnostics-show-option -Wall -Wno-overloaded-virtual
CMAKE_OPT: -DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=OFF -DAFF3CT_COMPILE_SHARED_LIB=OFF -DAFF3CT_PREC=MULTI -DAFF3CT_EXT_STRINGS=OFF
NAME: build_analysis_clang
REPORTS_DIR: clang_reports
artifacts:
name: analysis-clang-reports
when: always
paths:
- clang_reports/
script:
- source ./ci/tools/threads.sh
- ./ci/analysis-clang.sh
analysis-git-submodules:
extends: .tags-linux
rules:
- if: $CI_COMMIT_BRANCH == "ppa_upload"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: always
image: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_git:v2.25.1
stage: analysis
rules:
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "develop"
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "master"
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- source ./ci/tools/git-branch.sh
- ./ci/analysis-git-submodule.sh
analysis-documentation:
image: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_doc
stage: analysis
artifacts:
name: analysis-documentation
when: always
paths:
- doc/build/html
# - doc/build/latex
- doc/build/doxygen
tags:
- x86_64
- linux
- docker
script:
- export THREADS="1"
- ./ci/analysis-documentation.sh
include:
# standard linux jobs (build, check, regression, coverage)
- local: 'ci/linux/ci-linux-std.yml'
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
# conditional windows jobs (build)
- local: 'ci/windows/ci-windows.yml'
rules:
- if: $CI_AFF3CT_RUNNERS_WINDOWS == "ON" && $CI_PIPELINE_SOURCE != "schedule"
# conditional macos jobs (build)
- local: 'ci/macos/ci-macos.yml'
rules:
- if: $CI_AFF3CT_RUNNERS_MACOS == "ON" && $CI_PIPELINE_SOURCE != "schedule"
# deploy jobs depending on branches and repository location
- local: 'ci/deploy/deploy-gitlab-com.yml'
rules:
- if: $CI_SERVER_HOST == "gitlab.com" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "ppa_upload"
- if: $CI_SERVER_HOST == "gitlab.com" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "develop"
- if: $CI_SERVER_HOST == "gitlab.com" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "master"
###########################
## deploy coverage pages ##
###########################
pages:
stage: deploy
rules:
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "develop"
tags:
- linux
dependencies:
- coverage-linux
allow_failure: true
script:
- mv code_coverage_report/ public/
artifacts:
paths:
- public
expire_in: 30 days