-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
172 lines (162 loc) · 4.08 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
variables:
SCHEDULER_PARAMETERS: '-Aslai -N1'
CUSTOM_CI_BUILDS_DIR: /p/scratch/cslai
stages:
- build
- test
- coverage
build_cpu:
stage: build
tags: [ docker-proton ]
image:
name: opensuse:jsc-gcc12
#rules:
# - changes:
# - '**/*.cpp'
# - '**/*.h'
# - '**/*.hpp'
# - '**/*.c'
# - '**/*.cu'
# - '**/*.cuh'
# - '**/*.f90'
# - '**/*.inc'
# - '**/*.cmake'
# - '**/CMakeLists.txt'
script:
- cmake --version
- mkdir -p build_cpu
- cd build_cpu
- env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpifort -DCHASE_ENABLE_MIXED_PRECISION=ON -DENABLE_TESTS=ON -DMPI_RUN_ARGS="--allow-run-as-root" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
- make VERBOSE=1
artifacts:
paths:
- build_cpu/Makefile
- build_cpu/CTestTestfile.cmake
- build_cpu/tests
expire_in: 1 week
test_cpu:
stage: test
dependencies:
- build_cpu
tags: [ docker-proton ]
image:
name: opensuse:jsc-gcc12
#rules:
# - changes:
# - '**/*.cpp'
# - '**/*.h'
# - '**/*.hpp'
# - '**/*.c'
# - '**/*.f90'
# - '**/*.inc'
# - '**/*.cmake'
# - '**/CMakeLists.txt'
script:
- cd build_cpu
- CTEST_OUTPUT_ON_FAILURE=1 make test
- rm -rf _deps
artifacts:
paths:
- build_cpu/*
expire_in: 1 week
build_gpu:
stage: build
tags:
- juwels_booster
- jacamar
- login
- shell
#rules:
# - changes:
# - '**/*.cpp'
# - '**/*.h'
# - '**/*.hpp'
# - '**/*.c'
# - '**/*.cu'
# - '**/*.cuh'
# - '**/*.f90'
# - '**/*.inc'
# - '**/*.cmake'
# - '**/CMakeLists.txt'
id_tokens:
SITE_ID_TOKEN:
aud: https://gitlab.jsc.fz-juelich.de
script:
- echo $SYSTEMNAME
- module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
- cmake --version
- mkdir -p build_gpu
- cd build_gpu
#- export CFLAGS='-Wextra -Wall -pedantic'
#- export CXXFLAGS='-Wextra -Wall -pedantic'
#- export FFLAGS='-Wextra -Wall -pedantic'
- env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpifort -DCHASE_ENABLE_MIXED_PRECISION=ON -DENABLE_TESTS=ON -DMPI_RUN="srun" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
- make VERBOSE=1
artifacts:
paths:
- build_gpu/Makefile
- build_gpu/CTestTestfile.cmake
- build_gpu/tests
expire_in: 1 week
test_gpu:
stage: test
dependencies:
- build_gpu
tags:
- juwels_booster
- jacamar
- compute
- slurm
#rules:
# - changes:
# - '**/*.cpp'
# - '**/*.h'
# - '**/*.hpp'
# - '**/*.c'
# - '**/*.cu'
# - '**/*.cuh'
# - '**/*.f90'
# - '**/*.inc'
# - '**/*.cmake'
# - '**/CMakeLists.txt'
id_tokens:
SITE_ID_TOKEN:
aud: https://gitlab.jsc.fz-juelich.de
script:
- echo $SYSTEMNAME
- module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
- export CUDA_VISIBLE_DEVICES=0,1,2,3
- cd build_gpu
- CTEST_OUTPUT_ON_FAILURE=1 make test
- rm -rf _deps
artifacts:
paths:
- build_gpu/*
expire_in: 1 week
coverage:
stage: coverage
coverage: '/lines......: (\d+[.]\d+)/'
dependencies:
- test_cpu
- test_gpu
tags: [ docker-proton ]
image:
name: opensuse:jsc-gcc12
#rules:
# - changes:
# - '**/*.cpp'
# - '**/*.h'
# - '**/*.hpp'
# - '**/*.c'
# - '**/*.cu'
# - '**/*.cuh'
# - '**/*.f90'
# - '**/*.inc'
# - '**/*.cmake'
# - '**/CMakeLists.txt'
script:
# Merge the two coverage files
- lcov --capture --directory ./build_cpu --output-file coverage_cpu.info
- lcov --capture --directory ./build_gpu --output-file coverage_gpu.info
- lcov --add-tracefile coverage_cpu.info --add-tracefile coverage_gpu.info --output-file coverage.info
- lcov --summary coverage.info