.gitlab-ci.yml 17.9 KB
Newer Older
1
image: gitlab-registry.mpcdf.mpg.de/tpurcell/cpp_sisso
Thomas Purcell's avatar
Thomas Purcell committed
2
3
4

stages:
  - build
Thomas Purcell's avatar
Thomas Purcell committed
5
6
  - unit_test
  - bin_test
Thomas Purcell's avatar
Thomas Purcell committed
7
  - doc_builds
Thomas Purcell's avatar
Thomas Purcell committed
8

Thomas Purcell's avatar
Thomas Purcell committed
9
build-intel-base:
10
11
  stage: build
  script:
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
    - mkdir build_intel_base/
    - cd build_intel_base/
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILE=icc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=ON -DBUILD_PARAMS=OFF -DBUILD_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=../intel_base/ ../
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
      - intel_base/
    expire_in: 1 days

build-intel-py:
  stage: build
  script:
    - python -m venv cpp_sisso_env_intel_py
    - source cpp_sisso_env_intel_py/bin/activate
    - mkdir build_intel_py/
    - cd build_intel_py/
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_py/lib/python3.7/site-packages/
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILE=icc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=OFF -DBUILD_PARAMS=OFF -DBUILD_PYTHON=ON -DCMAKE_INSTALL_PREFIX=../intel_py/ ../
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
49
      - intel_py/
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
      - cpp_sisso_env_intel_py/*
    expire_in: 1 days

build-intel-param:
  stage: build
  script:
    - mkdir build_intel_param/
    - cd build_intel_param/
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILE=icc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=ON -DBUILD_PARAMS=ON -DBUILD_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=../intel_param/ ../
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
      - intel_param/
    expire_in: 1 days

build-intel-param-py:
  stage: build
  script:
    - python -m venv cpp_sisso_env_intel_param_py
    - source cpp_sisso_env_intel_param_py/bin/activate
78
79
80
81
82
83
    - mkdir build_intel/
    - cd build_intel/
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
84
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_param_py/lib/python3.7/site-packages/
85
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
86
    - cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILE=icc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=OFF -DBUILD_PARAMS=ON -DBUILD_PYTHON=ON -DCMAKE_INSTALL_PREFIX=../intel_param_py/ ../
87
88
89
90
91
92
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
93
94
      - intel_param_py/
      - cpp_sisso_env_intel_param_py/
95
96
    expire_in: 1 days

97
test-intel-pytest-py:
98
99
  stage: unit_test
  dependencies:
100
    - build-intel-py
101
  script:
102
103
104
105
106
107
108
109
110
    - source cpp_sisso_env_intel_py/bin/activate
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_py/lib/python3.7/site-packages/
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
111
    - pytest --ignore=tests/pytest/test_param.py --ignore=tests/pytest/test_feature_creation/test_parameterize/ --ignore=tests/pytest/test_model_eval/test_param_model_node/ --ignore=tests/pytest/test_model_eval/test_models/test_reg_model_param.py --ignore=tests/pytest/test_nl_opt/ tests/pytest
112
113
114
115
116
117
118

test-intel-pytest-param-py:
  stage: unit_test
  dependencies:
    - build-intel-param-py
  script:
    - source cpp_sisso_env_intel_param_py/bin/activate
119
120
121
122
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
123
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_param_py/lib/python3.7/site-packages/
124
125
126
127
128
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
    - pytest tests/pytest

129
test-intel-base-googletest:
130
131
  stage: unit_test
  dependencies:
132
    - build-intel-base
133
134
135
136
137
138
139
140
  script:
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
141
    - cd intel_base/tests/
142
143
    - googletest/sisso_test

144
145
146
147
148
149
150
151
152
153
154
155
test-intel-param-googletest:
  stage: unit_test
  dependencies:
    - build-intel-param
  script:
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
Thomas Purcell's avatar
Thomas Purcell committed
156
    - cd intel_param/tests/
157
158
159
    - googletest/sisso_test

test-intel-bin-param:
160
161
  stage: bin_test
  dependencies:
162
    - build-intel-param-py
163
  script:
164
    - source cpp_sisso_env_intel_param_py/bin/activate
165
166
167
168
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
169
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_param_py/lib/python3.7/site-packages/
170
171
172
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=1
    - cd tests/exec_test/default/
173
    - for direc in ../*/; do cd $direc; mpiexec -n 1 ../../../intel_param_py/bin/sisso++; python check_model.py; done
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    - cd ../../../

test-intel-bin-base:
  stage: bin_test
  dependencies:
    - build-intel-py
  script:
    - source cpp_sisso_env_intel_py/bin/activate
    - export I_MPI_ROOT=/home/runner/intel/oneapi/mpi/latest/
    - export INTEL_COMP_ROOT=/home/runner/intel/oneapi/compiler/latest/linux/
    - export MKLROOT=/home/runner/intel/oneapi/mkl/latest/
    - export LD_LIBRARY_PATH=$I_MPI_ROOT/lib/:$I_MPI_ROOT/lib/release:$MKLROOT/lib/intel64:$INTEL_COMP_ROOT/lib/:$INTEL_COMP_ROOT/compiler/lib/intel64/:$LD_LIBRARY_PATH:$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_env_intel_py/lib/python3.7/site-packages/
    - export PATH=$INTEL_COMP_ROOT/bin/:$INTEL_COMP_ROOT/bin/intel64:$I_MPI_ROOT/bin:$PATH
    - export OMP_NUM_THREADS=1
    - cd tests/exec_test/default/
190
    - for direc in ../*/; do cd $direc; if [[ $direc != *"param"* ]]; then mpiexec -n 1 ../../../intel_py/bin/sisso++; python check_model.py; fi; done
191
192
    - cd ../../../

193
build-gnu-base:
Thomas Purcell's avatar
Thomas Purcell committed
194
195
  stage: build
  script:
196
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
197
198
199
    - mkdir build_gnu_base/
    - cd build_gnu_base/
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=ON -DBUILD_PARAMS=OFF -DBUILD_PYTHON=OFF  -DCMAKE_INSTALL_PREFIX=../gnu_base/ ../
200
201
202
203
204
205
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
206
      - gnu_base/
207
208
209
210
211

build-gnu-param:
  stage: build
  script:
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
212
213
214
    - mkdir build_gnu_param/
    - cd build_gnu_param/
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=ON -DBUILD_PARAMS=ON -DBUILD_PYTHON=OFF  -DCMAKE_INSTALL_PREFIX=../gnu_param/ ../
215
216
217
218
219
220
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
221
      - gnu_param/
222
223
224
225

build-gnu-py:
  stage: build
  script:
226
227
    - python -m venv cpp_sisso_gnu_py_env
    - source cpp_sisso_gnu_py_env/bin/activate
228
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
229
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_py_env/lib/python3.7/site-packages/
230
231
    - mkdir build_py/
    - cd build_py/
232
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=OFF -DBUILD_PARAMS=OFF -DBUILD_PYTHON=ON  -DCMAKE_INSTALL_PREFIX=../gnu_py/ ../
233
234
235
236
237
238
    - make
    - make install
    - cd ../
  artifacts:
    when: always
    paths:
239
240
      - gnu_py/
      - cpp_sisso_gnu_py_env/
241

242
243
244
build-gnu-param-py:
  stage: build
  script:
245
246
    - python -m venv cpp_sisso_gnu_param_py_env
    - source cpp_sisso_gnu_param_py_env/bin/activate
247
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
248
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_param_py_env/lib/python3.7/site-packages/
249
250
    - mkdir build_param_py/
    - cd build_param_py/
251
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_CXX_FLAGS="-O3" -DBUILD_TESTS=OFF -DBUILD_PARAMS=ON -DBUILD_PYTHON=ON  -DCMAKE_INSTALL_PREFIX=../gnu_param_py/ ../
Thomas Purcell's avatar
Thomas Purcell committed
252
253
    - make
    - make install
Thomas Purcell's avatar
Thomas Purcell committed
254
    - cd ../
Thomas Purcell's avatar
Thomas Purcell committed
255
256
257
  artifacts:
    when: always
    paths:
258
259
      - gnu_param_py/
      - cpp_sisso_gnu_param_py_env/
260
261

test-gnu-pytest-py:
Thomas Purcell's avatar
Thomas Purcell committed
262
  stage: unit_test
Thomas Purcell's avatar
Thomas Purcell committed
263
  dependencies:
264
    - build-gnu-py
Thomas Purcell's avatar
Thomas Purcell committed
265
  script:
266
    - source cpp_sisso_gnu_py_env/bin/activate
267
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
268
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_py_env/lib/python3.7/site-packages/
269
270
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
271
    - pytest --ignore=tests/pytest/test_param.py --ignore=tests/pytest/test_feature_creation/test_parameterize/ --ignore=tests/pytest/test_model_eval/test_param_model_node/ --ignore=tests/pytest/test_model_eval/test_models/test_reg_model_param.py --ignore=tests/pytest/test_nl_opt/ tests/pytest
272
273
274
275
276
277

test-gnu-pytest-param-py:
  stage: unit_test
  dependencies:
    - build-gnu-param-py
  script:
278
    - source cpp_sisso_gnu_param_py_env/bin/activate
279
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
280
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_param_py_env/lib/python3.7/site-packages/
281
282
283
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
    - pytest tests/pytest
284

285
286
287
288
289
290
291
test-gnu-base-googletest:
  stage: unit_test
  dependencies:
    - build-gnu-base
  script:
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
292
    - cd gnu_base/tests/
293
294
295
296
297
298
299
300
301
    - googletest/sisso_test

test-gnu-param-googletest:
  stage: unit_test
  dependencies:
    - build-gnu-param
  script:
    - export OMP_NUM_THREADS=2
    - export OMP_PLACES=cores
302
    - cd gnu_param/tests/
303
304
305
    - googletest/sisso_test

test-gnu-bin-param:
Thomas Purcell's avatar
Thomas Purcell committed
306
  stage: bin_test
Thomas Purcell's avatar
Thomas Purcell committed
307
  dependencies:
308
    - build-gnu-param-py
Thomas Purcell's avatar
Thomas Purcell committed
309
  script:
310
    - source cpp_sisso_gnu_param_py_env/bin/activate
311
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
312
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_param_py_env/lib/python3.7/site-packages/
313
    - export OMP_NUM_THREADS=1
314
    - cd tests/exec_test/default/
315
    - for direc in ../*/; do cd $direc; mpiexec -n 1 ../../../gnu_param_py/bin/sisso++; python check_model.py; done
316
317
318
319
320
321
322
    - cd ../../../

test-gnu-bin-base:
  stage: bin_test
  dependencies:
    - build-gnu-py
  script:
323
    - source cpp_sisso_gnu_py_env/bin/activate
324
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
325
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:cpp_sisso_gnu_py_env/lib/python3.7/site-packages/
326
327
    - export OMP_NUM_THREADS=1
    - cd tests/exec_test/default/
328
    - for direc in ../*/; do cd $direc; if [[ $direc != *"param"* ]]; then mpiexec -n 1 ../../../gnu_py/bin/sisso++; python check_model.py; fi; done
329
    - cd ../../../
Thomas Purcell's avatar
Thomas Purcell committed
330

Thomas Purcell's avatar
Thomas Purcell committed
331
332
333
334
335
336
build-gnu-gcov:
  stage: build
  script:
    - python -m venv cpp_sisso_gnu_gcov_env
    - source cpp_sisso_gnu_gcov_env/bin/activate
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7:$LD_LIBRARY_PATH
337
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:`pwd`/cpp_sisso_gnu_gcov_env/lib/python3.7/site-packages/
338
339
    - mkdir build_gcov/
    - cd build_gcov/
340
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_BUILD_TYPE="Coverage" -DMPIEXEC_EXECUTABLE=/usr/bin/mpiexec -DBUILD_TESTS=ON -DBUILD_PARAMS=ON -DBUILD_PYTHON=ON  -DCMAKE_INSTALL_PREFIX=../gnu_gcov/ ../
341
    - make install
342
    - make coverage
Thomas Purcell's avatar
Thomas Purcell committed
343
    - cd ../
344
  coverage: /^\s*lines:\s*\d+.\d+\%/
Thomas Purcell's avatar
Thomas Purcell committed
345
346
  artifacts:
    when: always
347
348
    name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
    reports:
349
      cobertura: build_gcov/coverage.xml
Thomas Purcell's avatar
Thomas Purcell committed
350

351
352
353
354
355
build-gnu-lcov:
  stage: build
  script:
    - python -m venv cpp_sisso_gnu_lcov_env
    - source cpp_sisso_gnu_lcov_env/bin/activate
356
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7/:$LD_LIBRARY_PATH
357
358
359
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:`pwd`/cpp_sisso_gnu_lcov_env/lib/python3.7/site-packages/
    - mkdir build_lcov/
    - cd build_lcov/
360
    - cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILE=gcc -DCMAKE_BUILD_TYPE="Coverage" -DMPIEXEC_EXECUTABLE=/usr/bin/mpiexec -DBUILD_TESTS=ON -DBUILD_PARAMS=ON -DBUILD_PYTHON=ON -DCMAKE_INSTALL_PREFIX=../gnu_lcov/ ../
361
362
363
364
365
366
    - make install
    - make coverage_html
    - cd ../
  artifacts:
    when: always
    paths:
367
      - gnu_lcov/
368
      - cpp_sisso_gnu_lcov_env/
369
      - build_lcov/coverage_html/
370

Thomas Purcell's avatar
Thomas Purcell committed
371
pages:
372
  stage: doc_builds
373
374
  dependencies:
    - build-gnu-lcov
Thomas Purcell's avatar
Thomas Purcell committed
375
  script:
376
    - source cpp_sisso_gnu_lcov_env/bin/activate
377
    - export LD_LIBRARY_PATH=$HOME/intel/oneapi/intelpython/latest/lib/:$HOME/intel/oneapi/intelpython/latest/lib/python3.7/:$LD_LIBRARY_PATH
Thomas Purcell's avatar
Thomas Purcell committed
378
    - export PYTHONPATH=$HOME/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:`pwd`/cpp_sisso_gnu_lcov_env/lib/python3.7/site-packages/
379
380
    - cd docs/
    - make html
381
    - mv _build/html/ ../public/
382
383
    - cd ../
    - mv build_lcov/coverage_html/ public/coverage/
Thomas Purcell's avatar
Thomas Purcell committed
384
385
  artifacts:
    paths:
386
      - public
Thomas Purcell's avatar
Thomas Purcell committed
387
388
389
390
  only:
  - master
  - docs
  - joss