-
Notifications
You must be signed in to change notification settings - Fork 51
/
.gitlab-ci.yml
302 lines (285 loc) · 9.21 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
stages:
- build
- check
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
CMAKE_BUILD_TYPE: Release
NUM_PROC_BUILD_MAX: '32'
NUM_PROC_TEST_MAX: '8'
default:
interruptible: true
image: public.ecr.aws/lts/ubuntu:latest # Ubuntu 22.04
tags:
- arch:amd64
- size:2xlarge
before_script:
# Install build dependencies, set default number of cores for building and testing
- |
if [[ "$CI_JOB_STAGE" == "build" ]]; then
apt-get update -q
apt-get install -y build-essential cmake curl gfortran git pkg-config python3 wget
if [[ "$(nproc)" -gt "$NUM_PROC_BUILD_MAX" ]]; then
export NUM_PROC_BUILD=$NUM_PROC_BUILD_MAX
else
export NUM_PROC_BUILD=$(nproc)
fi
if [[ "$(nproc)" -gt "$NUM_PROC_TEST_MAX" ]]; then
export NUM_PROC_TEST=$NUM_PROC_TEST_MAX
else
export NUM_PROC_TEST=$(nproc)
fi
fi
# Install Julia
- |
curl -fsSL https://install.julialang.org | sh -s -- -y
export PATH=~/.juliaup/bin:$PATH
test-build:
stage: build
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DPALACE_WITH_STRUMPACK=ON
-DPALACE_WITH_MUMPS=ON
-DPALACE_WITH_ARPACK=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
artifacts:
paths:
- build
expire_in: 1 day
test-build-clang:
stage: build
script:
- apt-get install -y clang lld libmpich-dev libopenblas-serial-dev
- export LDFLAGS='-fuse-ld=lld'
- mkdir build && cd build
- cmake ..
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DPALACE_WITH_STRUMPACK=ON
-DPALACE_WITH_MUMPS=ON
-DPALACE_WITH_ARPACK=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-mpicc:
stage: build
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DCMAKE_CXX_COMPILER=mpicxx
-DCMAKE_C_COMPILER=mpicc
-DCMAKE_Fortran_COMPILER=mpif90
-DPALACE_WITH_STRUMPACK=ON
-DPALACE_WITH_MUMPS=ON
-DPALACE_WITH_ARPACK=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-shared:
stage: build
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DBUILD_SHARED_LIBS=ON
-DPALACE_WITH_STRUMPACK=ON
-DPALACE_WITH_MUMPS=ON
-DPALACE_WITH_ARPACK=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-openmp:
stage: build
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DPALACE_WITH_OPENMP=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-bigint:
stage: build
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DPALACE_WITH_64BIT_INT=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-openmpi:
stage: build
script:
- apt-get install -y libopenmpi-dev libopenblas-serial-dev
- export OMPI_ALLOW_RUN_AS_ROOT=1 && export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
- export OMPI_MCA_btl_vader_single_copy_mechanism=none
- mkdir build && cd build
- cmake ..
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-intel-oneapi:
stage: build
image: intel/oneapi-hpckit:latest # Intel oneAPI image from Docker Hub
script:
# Image has MKLROOT and environment configured by default
- mkdir build && cd build
- cmake ..
-DCMAKE_CXX_COMPILER=icpx
-DCMAKE_C_COMPILER=icx
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-aocl:
stage: build
script:
# Install AMD Optimizing CPU Libraries (AOCL)
- apt-get install -y libmpich-dev
- wget https://download.amd.com/developer/eula/aocl/aocl-4-1/aocl-linux-gcc-4.1.0_1_amd64.deb
- apt-get install -y ./aocl-linux-gcc-4.1.0_1_amd64.deb
- rm aocl-linux-gcc-*.deb
- export AOCLROOT=/opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc
- export LD_LIBRARY_PATH=$AOCLROOT/lib:$LD_LIBRARY_PATH
- mkdir build && cd build
- cmake ..
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-arm64:
stage: build
tags:
- arch:arm64
- size:2xlarge
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-arm64-shared:
stage: build
tags:
- arch:arm64
- size:2xlarge
script:
- apt-get install -y libmpich-dev libopenblas-serial-dev
- mkdir build && cd build
- cmake ..
-DBUILD_SHARED_LIBS=ON
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-build-arm64-armpl:
stage: build
tags:
- arch:arm64
- size:2xlarge
script:
# Install Arm Performance Libraries
- apt-get install -y libmpich-dev
- wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/22-0-2/Ubuntu20.04/arm-performance-libraries_22.0.2_Ubuntu-20.04_gcc-11.2.tar
- tar -xf arm-performance-libraries* && rm -rf arm-performance-libraries*.tar
- ./arm-performance-libraries*/arm-performance-libraries*.sh -a -i /opt/arm
- export ARMPL_DIR=/opt/arm/armpl_22.0.2_gcc-11.2
- export LD_LIBRARY_PATH=$ARMPL_DIR/lib:$LD_LIBRARY_PATH
- mkdir build && cd build
- cmake ..
- make -j$NUM_PROC_BUILD
- cd ..
- export PATH=$(pwd)/build/bin:$PATH
- julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
- julia --project=test/examples --color=yes test/examples/runtests.jl
test-format:
stage: check
tags:
- size:medium
variables:
GIT_SUBMODULE_STRATEGY: none
script:
# Install more recent clang-format from LLVM (match Homebrew v16)
- apt-get install -y gpg
- wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
- |
echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-16 main" \
| tee /etc/apt/sources.list.d/llvm.list
- apt-get update -q && apt-get install -y clang-format-16
- ./scripts/format-source --clang-format clang-format-16
- |-
if [[ `git status -s | wc -l` -ne 0 ]]; then
echo 'Error: Commit is not formatted!'
echo 'Run '\`'./scripts/format-source'\`' in the source root directory'
echo 'Summary of required changes:'
echo "`git diff --stat`"
echo 'Repository status:'
echo "`git status`"
exit 1
else
echo 'Commit is correctly formatted'
exit 0
fi
dependencies: []
test-config:
stage: check
tags:
- size:medium
variables:
GIT_SUBMODULE_STRATEGY: none
script:
- OUTPUT=$(find examples -name *.json -exec ./scripts/validate-config {} \;)
- |-
if echo $OUTPUT | grep -q 'Validation failed'; then
echo 'Error: Configuration file validation failed!'
echo 'Summary of output:'
echo $OUTPUT
exit 1
else
echo 'Configuration file validation passed'
exit 0
fi
dependencies: []
pages:
stage: deploy
tags:
- size:medium
variables:
GIT_SUBMODULE_STRATEGY: none
script:
- julia --project=docs -e 'using Pkg; Pkg.instantiate()'
- julia --project=docs --color=yes docs/make.jl
- mv docs/build public
dependencies: []
artifacts:
paths:
- public
expire_in: never
only:
- main