-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
200 lines (191 loc) · 7.28 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
include:
- local: 'ci_tools/reusable_ci_jobs.yml'
cmake_tests:
extends: .cmake_tests
image: ghcr.io/gyselax/gyselalibxx_env
timeout: 2 hours
variables:
RELATIVE_RESTART_TOLERANCE: '0.0'
ABSOLUTE_RESTART_TOLERANCE: '0.0'
script: |
set -x
git config --global --add safe.directory /builds/gysela-developpers/gyselalibxx/vendor/kokkos
rm -rf build || true
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-Wall -Werror=unused-variable -Werror=parentheses -Wno-sign-compare" -DBUILD_BENCHMARKS=ON $GENERAL_CMAKE_OPTIONS -DKokkos_ENABLE_SERIAL=ON ..
make -j 4
ctest -j 2 --output-on-failure --timeout 5 -LE test_on_Release_only --output-junit tests.xml
artifacts:
when: always
expire_in: 1 day
reports:
junit: ./build/tests.xml
cmake_tests_Release:
extends: .cmake_tests
image: ghcr.io/gyselax/gyselalibxx_env
variables:
RELATIVE_RESTART_TOLERANCE: '0.0'
ABSOLUTE_RESTART_TOLERANCE: '0.0'
script: |
set -x
git config --global --add safe.directory /builds/gysela-developpers/gyselalibxx/vendor/kokkos
rm -rf build || true
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare" -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release $GENERAL_CMAKE_OPTIONS -DKokkos_ENABLE_SERIAL=ON ..
make -j 4
ctest -j 2 --output-on-failure --timeout 5 --output-junit tests.xml
ls ./tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
ls ./tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
artifacts:
when: always
expire_in: 1 day
paths:
- ./build/tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
- ./build/tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
reports:
junit: ./build/tests.xml
cmake_tests_Release_OMP:
extends: .cmake_tests
image: ghcr.io/gyselax/gyselalibxx_env
variables:
RELATIVE_RESTART_TOLERANCE: '1e-14'
ABSOLUTE_RESTART_TOLERANCE: '1e-14'
script: |
set -x
git config --global --add safe.directory /builds/gysela-developpers/gyselalibxx/vendor/kokkos
rm -rf build || true
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare" -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release $GENERAL_CMAKE_OPTIONS -DKokkos_ENABLE_OPENMP=ON ..
make -j 4
OMP_NUM_THREADS=2 ctest -j 2 --output-on-failure --timeout 5 --output-junit tests.xml
ls ./tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
ls ./tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
artifacts:
when: always
expire_in: 1 day
paths:
- ./build/tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
- ./build/tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
reports:
junit: ./build/tests.xml
cmake_tests_Release_GPU:
extends: .cmake_tests
tags:
- persee
variables:
RELATIVE_RESTART_TOLERANCE: '1e-14'
ABSOLUTE_RESTART_TOLERANCE: '1e-14'
before_script: |
. /data/gyselarunner/spack-0.20.0/share/spack/setup-env.sh
spack load gcc@11
spack env activate gyselalibxx-env-omp-cuda
script: |
set -x
export OMP_PROC_BIND=spread
export OMP_PLACES=threads
export OMP_NUM_THREADS=8
git config --global --add safe.directory /builds/gysela-developpers/gyselalibxx/vendor/kokkos
rm -rf build || true
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=${CI_PROJECT_DIR}/vendor/kokkos/bin/nvcc_wrapper \
-DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare -Xcudafe --diag_suppress=unsigned_compare_with_zero -Xcudafe --diag_suppress=integer_sign_change" \
-DCMAKE_BUILD_TYPE=Release -DDDC_BUILD_TESTS=ON $GENERAL_CMAKE_OPTIONS -DKokkos_ARCH_VOLTA70=ON -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_CUDA=ON ..
make -j 8
ctest -j 2 --output-on-failure --timeout 5 --output-junit tests.xml -LE ResultsNotTested
ls ./tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
ls ./tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
artifacts:
when: always
expire_in: 1 day
paths:
- ./build/tests/geometryXVx/landau/fft/growthrate_t0.0to45.0.png
- ./build/tests/geometryXVx/landau/fft/frequency_t0.0to45.0.png
reports:
junit: ./build/tests.xml
indentation:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stage: test
needs: []
image: ghcr.io/gyselax/gyselalibxx_env
variables:
GIT_SUBMODULE_STRATEGY: recursive
script: |
./bin/indent -td
python_best_practices:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stage: test
needs: []
image: ghcr.io/gyselax/gyselalibxx_env
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
export PYTHONPATH="./post-process/PythonScripts"
script: |
pylint $(find tests -iname *.py)
pylint $(find doc -iname *.py)
pylint $(find ci_tools -iname *.py)
# Find all files with no extension or a .py extension in post-process/PythonScripts/
POST_PROCESS_PYTHON_FILES=$(find post-process/PythonScripts/ -type f ! -name "*.*"; find post-process/PythonScripts -iname *.py)
# Get pylint errors without failing
pylint ${POST_PROCESS_PYTHON_FILES} > post_process_errors.txt || true
# Filter errors on changed files
git config --global --add safe.directory $(pwd)
git fetch origin main
for f in $(git diff origin/main --name-only); do grep $f post_process_errors.txt || true; done | tee filtered_errors.txt
# Raise an error if post-process in filtered errors
! grep "post-process" filtered_errors.txt >/dev/null
public_mirror:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
tags: [ outssh ]
needs: []
image: ghcr.io/gyselax/gyselalibxx_env
variables:
GIT_SUBMODULE_STRATEGY: recursive
script: ./bin/public_mirror
documentation:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stage: test
needs: []
image: ghcr.io/gyselax/gyselalibxx_env
before_script: |
git config --global --add safe.directory $CI_PROJECT_DIR
git fetch origin ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --recurse-submodules=no
script: |
rm -rf build || true
# Make docs
cmake -DGYSELALIBXX_COMPILE_SOURCE=OFF -DBUILD_DOCUMENTATION=1 -B build-docs .
cmake --build build-docs
# Get files which have changed in this merge request
git diff origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}..HEAD --no-indent-heuristic --unified=0 --output=pull_diff.txt --no-color
# Filter documentation messages to only complain about modified files
python3 ci_tools/check_documentation.py pull_diff.txt build-docs/docs/doxygen.log
git diff origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}..HEAD --no-indent-heuristic --unified=0 --output=pull_new_files.txt --no-color --diff-filter=A
python3 ci_tools/check_readme_presence.py pull_new_files.txt
allow_failure: true
markdown_best_practices:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stage: test
needs: []
image: ghcr.io/gyselax/gyselalibxx_env
variables:
GIT_SUBMODULE_STRATEGY: recursive
script: |
MARKDOWN_FILES=$(find . -name "*.md" -not -path "./vendor/*")
MARKDOWN_FILES="$MARKDOWN_FILES $(find ./vendor/sll/ -name '*.md')"
echo $MARKDOWN_FILES
set +e
python3 ci_tools/markdown_linter.py ${MARKDOWN_FILES}
allow_failure:
exit_codes: 2