-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
243 lines (213 loc) · 4.09 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
---
stages:
- build
- test
- sonar
# JOB_INT: [ 32 | 64 | 32-64 ]
# JOB_THREAD: [ n | c | k | s | m ]
# JOB_DEBUG: [ n | a | f ]
# JOB_RENAME: [ n | r ]
.matrix_32: &matrix_32
parallel:
matrix:
- JOB_INT: [32, 32-64]
JOB_THREAD: [n]
JOB_DEBUG: [n]
JOB_RENAME: [n]
- JOB_INT: [32-64]
JOB_THREAD: [n, k]
JOB_DEBUG: [a]
JOB_RENAME: [n]
- JOB_INT: [32]
JOB_THREAD: [n, c, m]
JOB_DEBUG: [f]
JOB_RENAME: [n]
.matrix_64: &matrix_64
parallel:
matrix:
- JOB_INT: [64]
JOB_THREAD: [n]
JOB_DEBUG: [n]
JOB_RENAME: [n]
- JOB_INT: [64]
JOB_THREAD: [n, c, s, m]
JOB_DEBUG: [a]
JOB_RENAME: [n]
- JOB_INT: [64]
JOB_THREAD: [m]
JOB_DEBUG: [a]
JOB_RENAME: [r]
# Default cache
.cache_default: &cache_default
untracked: true
when: 'always'
# GNU Makefile pipeline
## Build
.build_makefile: &build_makefile
stage: build
script:
- ./ci/build_makefile.sh
scotch_build_32:
<<: *build_makefile
tags: ['32bits']
cache:
key: scotch32 $CI_NODE_INDEX
policy: push
<<: *cache_default
<<: *matrix_32
scotch_build_64:
<<: *build_makefile
tags: ['64bits']
cache:
key: scotch64 $CI_NODE_INDEX
policy: push
<<: *cache_default
<<: *matrix_64
## Test
.test_makefile: &test_makefile
stage: test
artifacts:
untracked: true
script:
- ./ci/test_makefile.sh
scotch_test_32:
<<: *test_makefile
tags: ['32bits']
cache:
key: scotch32 $CI_NODE_INDEX
policy: pull
<<: *cache_default
<<: *matrix_32
scotch_test_64:
<<: *test_makefile
tags: ['64bits']
cache:
key: scotch64 $CI_NODE_INDEX
policy: pull
<<: *cache_default
<<: *matrix_64
## Sonarqube analysis if scheduled job
scotch_sonar:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
stage: sonar
tags: ['sonar']
script:
- ci/analysis.sh
- sonar-scanner -X > sonar.log
allow_failure: true
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
paths:
- analyzer_reports
- sonar-project.properties
- ./*.log
- ./*.cov
- ./*.xml
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
# CMake pipeline (not done if scheduled)
## Specific rule: not triggered if scheduled pipeline (for CMake jobs, for example)
.rule_noschedule: &rule_noschedule
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
## Build
.build_cmake: &build_cmake
<<: *rule_noschedule
stage: build
tags: ['cmake']
script:
- ./ci/build_cmake.sh
build_cmake_gcc:
<<: *build_cmake
variables:
CC: "gcc"
FC: "gfortran"
cache:
key: cmake_gcc
policy: push
<<: *cache_default
build_cmake_clang:
<<: *build_cmake
variables:
CC: "clang"
FC: "gfortran"
cache:
key: cmake_clang
policy: push
<<: *cache_default
build_cmake_intel:
<<: *build_cmake
variables:
CC: "icx"
FC: "gfortran"
cache:
key: cmake_intel
policy: push
<<: *cache_default
build_cmake_pgi:
<<: *build_cmake
variables:
CC: "pgcc"
FC: "pgf90"
cache:
key: cmake_pgi
policy: push
<<: *cache_default
## Test
.test_cmake: &test_cmake
<<: *rule_noschedule
stage: test
tags: ['cmake']
script:
- ./ci/test_cmake.sh
artifacts:
untracked: true
reports:
junit: report.xml
test_cmake_gcc:
<<: *test_cmake
needs:
- build_cmake_gcc
variables:
CC: "gcc"
FC: "gfortran"
cache:
key: cmake_gcc
policy: pull
<<: *cache_default
test_cmake_clang:
<<: *test_cmake
needs:
- build_cmake_clang
variables:
CC: "clang"
FC: "gfortran"
cache:
key: cmake_clang
policy: pull-push
<<: *cache_default
test_cmake_intel:
<<: *test_cmake
needs:
- build_cmake_intel
variables:
CC: "icx"
FC: "ifx"
cache:
key: cmake_intel
policy: pull-push
<<: *cache_default
test_cmake_pgi:
<<: *test_cmake
needs:
- build_cmake_pgi
variables:
CC: "pgcc"
FC: "pgf90"
cache:
key: cmake_pgi
policy: pull-push
<<: *cache_default