-
Notifications
You must be signed in to change notification settings - Fork 218
/
.gitlab-ci.yml
203 lines (182 loc) · 5.22 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
include:
- local: '/share/ci/pypicongpu.yml'
stages:
- validate
- generate
- test
variables:
CONTAINER_TAG: "3.2"
PIC_CI_MAINLINE: "TRUE"
.base_generate-reduced-matrix:
stage: generate
variables:
PIP_BREAK_SYSTEM_PACKAGES: 1
script:
- apt update
- apt install -y python3-pip
- apt install -y curl
- apt install -y git
- pip3 install allpairspy
- $CI_PROJECT_DIR/share/ci/git_merge.sh
- $CI_PROJECT_DIR/share/ci/generate_reduced_matrix.sh -n ${TEST_TUPLE_NUM_ELEM} -j 15 > compile.yml
- cat compile.yml
artifacts:
paths:
- compile.yml
tags:
- x86_64
- cpuonly
interruptible: true
# pull request validation:
# - check PR destination
# - check python code style: flake8, pyflake
# - rebase the PR to the destination branch
# - check C++ code style
pull-request-validation:
stage: validate
image: ubuntu:focal
variables:
PIP_BREAK_SYSTEM_PACKAGES: 1
script:
- apt update
- apt install -y -q git curl wget python3 python3-pip
# Test if pull request can be merged into the destination branch
- source $CI_PROJECT_DIR/share/ci/git_merge.sh
- pip3 install -U -r requirements_pre-commit.txt
- pre-commit install
- pre-commit run --all-files --hook-stage manual --show-diff-on-failure
tags:
- x86_64
- cpuonly
interruptible: true
# generate reduced test matrix
# required variables (space separated lists):
# PIC_INPUTS - Path to examples relative to share/picongpu.
# If input is 'pmacc' the folder will be ignored and tests for pmacc will be generated.
# e.g.
# "examples" starts one gitlab job per directory in `examples/*`
# "examples/" compile all directories in `examples/*` within one gitlab job
# "examples/KelvinHelmholtz" compile all cases within one gitlab job
picongpu-generate-reduced-matrix_examples:
variables:
PIC_INPUTS: "examples"
TEST_TUPLE_NUM_ELEM: 1
QUICK_CI_TESTS: 1
extends: ".base_generate-reduced-matrix"
picongpu-compile-reduced-matrix_examples:
stage: test
trigger:
include:
- artifact: compile.yml
job: picongpu-generate-reduced-matrix_examples
strategy: depend
picongpu-generate-reduced-matrix_tests:
variables:
PIC_INPUTS: "tests"
TEST_TUPLE_NUM_ELEM: 1
QUICK_CI_TESTS: 1
extends: ".base_generate-reduced-matrix"
picongpu-compile-reduced-matrix_tests:
stage: test
trigger:
include:
- artifact: compile.yml
job: picongpu-generate-reduced-matrix_tests
strategy: depend
picongpu-generate-reduced-matrix_benchmarks:
variables:
PIC_INPUTS: "benchmarks"
TEST_TUPLE_NUM_ELEM: 1
QUICK_CI_TESTS: 1
extends: ".base_generate-reduced-matrix"
picongpu-compile-reduced-matrix_benchmarks:
stage: test
trigger:
include:
- artifact: compile.yml
job: picongpu-generate-reduced-matrix_benchmarks
strategy: depend
pmacc-generate-reduced-matrix:
variables:
PIC_INPUTS: "pmacc"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
pmacc-compile-reduced-matrix:
stage: test
trigger:
include:
- artifact: compile.yml
job: pmacc-generate-reduced-matrix
strategy: depend
pmacc-header-generate-reduced-matrix:
variables:
PIC_INPUTS: "pmacc_header"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
pmacc-header-compile-reduced-matrix:
stage: test
trigger:
include:
- artifact: compile.yml
job: pmacc-header-generate-reduced-matrix
strategy: depend
picongpu-unittest-generate-reduced-matrix:
variables:
PIC_INPUTS: "unit"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
picongpu-unittest-compile-reduced-matrix:
stage: test
trigger:
include:
- artifact: compile.yml
job: picongpu-unittest-generate-reduced-matrix
strategy: depend
picongpu-header-generate-reduced-matrix:
variables:
PIC_INPUTS: "picongpu_header"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
picongpu-header-compile-reduced-matrix:
stage: test
trigger:
include:
- artifact: compile.yml
job: picongpu-header-generate-reduced-matrix
strategy: depend
pypicongpu-generate-full-matrix:
stage: generate
image: ubuntu:22.04
variables:
PIP_BREAK_SYSTEM_PACKAGES: 1
script:
- apt update
- apt install -y python3 python3-pip
- pip3 install pyyaml requests typeguard
- $CI_PROJECT_DIR/share/ci/git_merge.sh
- python3 $CI_PROJECT_DIR/share/ci/pypicongpu_generator.py $CI_PROJECT_DIR/lib/python/picongpu/picmi/requirements.txt $CI_PROJECT_DIR/lib/python/picongpu/pypicongpu/requirements.txt > compile.yml
- cat compile.yml
artifacts:
paths:
- compile.yml
tags:
- x86_64
interruptible: true
pypicongpu-full-matrix:
stage: test
trigger:
include:
- artifact: compile.yml
job: pypicongpu-generate-full-matrix
strategy: depend
pypicongpu-compiling-test:
stage: test
extends: .base_pypicongpu_compile_test
variables:
PIP_BREAK_SYSTEM_PACKAGES: 1
CI_CONTAINER_NAME: 'ubuntu20.04'
PYTHON_VERSION: '3.11.*'
CXX_VERSION: 'g++-11'
CMAKE_VERSION: '3.22'
BOOST_VERSION: '1.75.0'
PYTHON_COMPILING_TEST: 'ON'