Make everything run on Gitlab infrastructure.
[alexxy/gromacs.git] / admin / gitlab-ci / gromacs.gitlab-ci.yml
1 # Build, test, and install variously configured GROMACS installations.
2
3 # Initial build that always needs to pass before follow-up stages run
4 simple-build:
5   extends:
6     - .variables:default
7     - .use-ccache
8     - .use-clang:base
9     - .rules:basic-push
10   stage: pre-build
11   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
12   variables:
13     KUBERNETES_CPU_LIMIT: 8
14     KUBERNETES_CPU_REQUEST: 4
15     KUBERNETES_MEMORY_REQUEST: 8Gi
16     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
17     CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
18     CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
19     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
20     CMAKE_GPU_OPTIONS: "-DGMX_GPU=None"
21     CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
22     COMPILER_MAJOR_VERSION: 9
23     BUILD_DIR: simple-build
24   script:
25     - echo $CMAKE_COMPILER_SCRIPT
26     - echo $CMAKE_EXTRA_OPTIONS
27     - echo $CMAKE_SIMD_OPTIONS
28     - echo $CMAKE_GPU_OPTIONS
29     - echo $CMAKE_MPI_OPTIONS
30     - echo $CMAKE_PRECISION_OPTIONS
31     - echo $CMAKE_BUILD_TYPE_OPTIONS
32     - echo $CMAKE_GMXAPI_OPTIONS
33     - if [[ -d $BUILD_DIR ]] ; then
34       echo "Cleaning up build directory" ;
35       rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
36       else
37       echo "Preparing new build directory" ;
38       mkdir $BUILD_DIR ;
39       fi
40     - cd $BUILD_DIR
41     - cmake ..
42       -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
43       $CMAKE_COMPILER_SCRIPT
44       $CMAKE_EXTRA_OPTIONS
45       $CMAKE_SIMD_OPTIONS
46       $CMAKE_MPI_OPTIONS
47       $CMAKE_PRECISION_OPTIONS
48       $CMAKE_BUILD_TYPE_OPTIONS
49       $CMAKE_GPU_OPTIONS
50       $CMAKE_GMXAPI_OPTIONS
51       -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
52       2>&1 | tee cmakeLog.log
53     - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
54     - if [ -s cmakeErrors.log  ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
55     - cmake --build . -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee buildLogFile.log
56     - cmake --build . --target tests -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee testBuildLogFile.log
57     - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
58       | grep -v "CMake" | tee buildErrors.log || true
59     - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
60     - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
61     - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
62     - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
63     - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
64       ctestLog.log | tee ctestErrors.log
65     - xsltproc $CI_PROJECT_DIR/scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
66     - if [ -s ctestErrors.log ] ; then
67       echo "Error during running ctest";
68       exit 1;
69       fi
70     - cd ..
71   artifacts:
72     reports:
73       junit: $BUILD_DIR/JUnitTestResults.xml
74     paths:
75       - $BUILD_DIR/*log
76     when: always
77     expire_in: 1 week
78
79 # Jobs running in first pre-build stage
80
81 .gromacs:base:configure:
82   extends:
83     - .variables:default
84   stage: configure-build
85   cache: {}
86   variables:
87     KUBERNETES_CPU_LIMIT: 1
88     KUBERNETES_CPU_REQUEST: 1
89     KUBERNETES_MEMORY_REQUEST: 2Gi
90     CMAKE_COMPILER_SCRIPT: ""
91     CMAKE_EXTRA_OPTIONS: ""
92     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
93     CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
94     CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
95     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
96     CMAKE_GPU_OPTIONS: "-DGMX_GPU=None"
97   script:
98     - echo $CMAKE_COMPILER_SCRIPT
99     - echo $CMAKE_EXTRA_OPTIONS
100     - echo $CMAKE_SIMD_OPTIONS
101     - echo $CMAKE_GPU_OPTIONS
102     - echo $CMAKE_MPI_OPTIONS
103     - echo $CMAKE_PRECISION_OPTIONS
104     - echo $CMAKE_BUILD_TYPE_OPTIONS
105     - echo $CMAKE_GMXAPI_OPTIONS
106     - if [[ -d $BUILD_DIR ]] ; then
107       rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
108       else
109       echo "Preparing new build directory" ;
110       mkdir $BUILD_DIR ;
111       fi
112     - cd $BUILD_DIR
113     - cmake ..
114       -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
115       $CMAKE_COMPILER_SCRIPT
116       $CMAKE_EXTRA_OPTIONS
117       $CMAKE_SIMD_OPTIONS
118       $CMAKE_MPI_OPTIONS
119       $CMAKE_PRECISION_OPTIONS
120       $CMAKE_BUILD_TYPE_OPTIONS
121       $CMAKE_GPU_OPTIONS
122       $CMAKE_GMXAPI_OPTIONS
123       -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
124       2>&1 | tee cmakeLog.log
125     - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
126     - if [ -s cmakeErrors.log  ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
127     - cd ..
128   artifacts:
129     when: always
130     paths:
131       - $BUILD_DIR
132
133 .gromacs:base:release:configure:
134   extends:
135     - .variables:default
136   stage: release-configure
137   cache: {}
138   variables:
139     KUBERNETES_CPU_LIMIT: 1
140     KUBERNETES_CPU_REQUEST: 1
141     KUBERNETES_MEMORY_REQUEST: 2Gi
142     CMAKE_COMPILER_SCRIPT: ""
143     CMAKE_EXTRA_OPTIONS: ""
144     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
145     CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
146     CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
147     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
148     CMAKE_GPU_OPTIONS: "-DGMX_GPU=None"
149     CMAKE_REGRESSIONTEST_OPTIONS: "-DREGRESSIONTEST_PATH=../\\$RELEASE_REGRESSIONTESTS"
150     RELEASE_BUILD_DIR: release-builds
151     RELEASE_SOURCE: release-source-from-tarball
152     RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
153   script:
154     - VERSION=`cat version.json |
155       python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
156     - if [[ $GROMACS_RELEASE != "true" ]] ; then
157       VERSION=$VERSION-dev ;
158       fi
159     - SOURCENAME=gromacs-$VERSION
160     - SOURCETARBALL=$SOURCENAME.tar.gz
161     - REGTESTNAME=regressiontests-$VERSION
162     - REGTESTTARBALL=$REGTESTNAME.tar.gz
163     - echo "$SOURCETARBALL"
164     - echo "$REGTESTTARBALL"
165     - RELEASE_TARBALLS=release-tarballs
166     - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
167     - mv $SOURCETARBALL $RELEASE_TARBALLS
168     - mv $REGTESTTARBALL $RELEASE_TARBALLS
169     - cd $RELEASE_TARBALLS
170     # We rename the source and regressiontest directories
171     # to have names for them that don't change for different versions.
172     - tar -xf $SOURCETARBALL
173     - mv $SOURCENAME ../$RELEASE_SOURCE
174     - tar -xf $REGTESTTARBALL
175     - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
176     - rm $SOURCETARBALL $REGTESTTARBALL
177     - cd ..
178     - echo $CMAKE_COMPILER_SCRIPT
179     - echo $CMAKE_EXTRA_OPTIONS
180     - echo $CMAKE_SIMD_OPTIONS
181     - echo $CMAKE_GPU_OPTIONS
182     - echo $CMAKE_MPI_OPTIONS
183     - echo $CMAKE_PRECISION_OPTIONS
184     - echo $CMAKE_BUILD_TYPE_OPTIONS
185     - echo $CMAKE_GMXAPI_OPTIONS
186     - if [[ -d $RELEASE_BUILD_DIR ]] ; then
187       echo "Cleaning up build directory" ;
188       rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
189       else
190       echo "Preparing new build directory" ;
191       mkdir $RELEASE_BUILD_DIR ;
192       fi
193     - cd $RELEASE_BUILD_DIR
194     - cmake ../$RELEASE_SOURCE/
195       -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
196       $CMAKE_COMPILER_SCRIPT
197       $CMAKE_EXTRA_OPTIONS
198       $CMAKE_SIMD_OPTIONS
199       $CMAKE_MPI_OPTIONS
200       $CMAKE_PRECISION_OPTIONS
201       $CMAKE_BUILD_TYPE_OPTIONS
202       $CMAKE_GPU_OPTIONS
203       $CMAKE_GMXAPI_OPTIONS
204       $CMAKE_REGRESSIONTEST_OPTIONS
205       -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR
206       2>&1 | tee cmakeLog.log
207     - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
208     - if [ -s cmakeErrors.log  ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
209     - cd ..
210   artifacts:
211     when: always
212     paths:
213       - $RELEASE_BUILD_DIR
214       - $RELEASE_REGRESSIONTESTS
215       - $RELEASE_SOURCE
216
217 # Templates for configuration stage
218
219 gromacs:gcc-7:configure:
220   extends:
221     - .gromacs:base:configure
222     - .use-gcc:base
223     - .use-opencl
224     - .rules:merge-requests
225   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
226   variables:
227     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
228     CMAKE_EXTRA_OPTIONS: "-DGMX_EXTERNAL_CLFFT=ON"
229     COMPILER_MAJOR_VERSION: 7
230
231 gromacs:gcc-8-cuda-10.1:configure:
232   extends:
233     - .gromacs:base:configure
234     - .use-gcc:base
235     - .use-cuda
236     - .rules:merge-requests
237   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
238   variables:
239     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1"
240     COMPILER_MAJOR_VERSION: 8
241
242 gromacs:clang-TSAN:configure:
243   extends:
244     - .gromacs:base:configure
245     - .use-clang:base
246     - .rules:merge-requests
247   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
248   variables:
249     COMPILER_MAJOR_VERSION: 8
250     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=TSAN"
251
252 gromacs:clang-8:configure:
253   extends:
254     - .gromacs:base:configure
255     - .use-clang:base
256     - .rules:merge-requests
257   image: gromacs/cmake-3.15.7-llvm-8-intelopencl-openmpi:2020
258   variables:
259     COMPILER_MAJOR_VERSION: 8
260
261     #gromacs:clang-9-mpi:configure:
262     #  extends:
263     #   - .gromacs:base:configure
264     #   - .use-clang:base
265     #   - .use-mpi
266     #   - .rules:merge-requests
267     #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
268     #  variables:
269     #    COMPILER_MAJOR_VERSION: 9
270     #    CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
271
272     #gromacs:clang-static-analyzer:configure:
273     #  extends:
274     #    - .gromacs:base:configure
275     #    - .use-clang:base
276     #    - .rules:merge-requests
277     #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
278     #  variables:
279     #     CMAKE_COMPILER_SCRIPT: "-DCMAKE_CXX_COMPILER=/usr/local/libexec/c++-analyzer -DCMAKE_C_COMPILER=gcc"
280     #     CMAKE_EXTRA_OPTIONS: "-DGMX_CLANG_ANALYZER=ON -DGMX_OPENMP=OFF -DGMX_USE_RDTSCP=OFF -DGMX_FFT_LIBRARY=fftpack -DGMX_DEVELOPER_BUILD=ON"
281     #     CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
282
283      #gromacs:clang-ASAN:configure:
284      #  extends:
285      #    - .gromacs:base:configure
286      #    - .use-clang:base
287      #    - .rules:merge-requests
288      #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
289      #  variables:
290      #    COMPILER_MAJOR_VERSION: 8
291      #    CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=ASAN"
292
293 gromacs:gcc-8-cuda-10.1:release:configure:
294   extends:
295     - .gromacs:base:release:configure
296     - .use-gcc:base
297     - .use-mpi
298     - .use-cuda
299     - .rules:nightly-only-for-release
300   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
301   variables:
302     COMPILER_MAJOR_VERSION: 8
303     RELEASE_BUILD_DIR: release-builds-gcc
304     CMAKE_EXTRA_OPTIONS: "-DGMX_BUILD_MDRUN_ONLY=ON"
305     CMAKE_BUILD_TYPE_OPTIONS : "-DCMAKE_BUILD_TYPE=RelWithDebug"
306     CMAKE_REGRESSIONTEST_OPTIONS: ""
307   dependencies:
308     - archive:package
309     - regressiontests:package
310     - prepare-release-version
311
312 gromacs:gcc-7:release:configure:
313   extends:
314     - .gromacs:base:release:configure
315     - .use-gcc:base
316     - .rules:nightly-only-for-release
317   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
318   variables:
319     COMPILER_MAJOR_VERSION: 7
320     RELEASE_BUILD_DIR: release-builds-gcc
321     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
322   dependencies:
323     - archive:package
324     - regressiontests:package
325     - prepare-release-version
326
327       #gromacs:clang-9:release:configure:
328       #  extends:
329       #    - .gromacs:base:release:configure
330       #    - .use-clang:base
331       #    - .use-mpi
332       #    - .rules:nightly-only-for-release
333       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
334       #  variables:
335       #    COMPILER_MAJOR_VERSION: 9
336       #    RELEASE_BUILD_DIR: release-builds-clang
337       #    CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=ON"
338       #    CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
339       #  dependencies:
340       #    - archive:package
341       #    - regressiontests:package
342       #    - prepare-release-version
343
344 gromacs:clang-8-cuda-10.1:release:configure:
345   extends:
346     - .gromacs:base:release:configure
347     - .use-clang:base
348     - .use-cuda
349     - .rules:nightly-only-for-release
350   image: gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master
351   variables:
352     COMPILER_MAJOR_VERSION: 8
353     RELEASE_BUILD_DIR: release-builds-clang
354     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithDebug"
355
356 # Jobs running during build stage
357
358 .gromacs:base:build:
359   stage: build
360   script:
361     - cd $BUILD_DIR
362     - cmake --build . -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee buildLogFile.log
363     - cmake --build . --target tests -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee testBuildLogFile.log
364     - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
365       | grep -v "CMake" | tee buildErrors.log || true
366     - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
367     - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
368     - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
369     - cd ..
370   artifacts:
371     when: always
372     paths:
373       - $BUILD_DIR
374       - $INSTALL_DIR/
375
376 .gromacs:static-analyzer-build:
377   stage: build
378   script:
379     - cd $BUILD_DIR
380     - scan-build -o scan_html cmake --build . -- -j8 2>&1 | tee buildLogFile.log
381     - awk '/warning/,/warning.*generated|^$/' buildLogFile.log
382       | grep -v "CMake" | tee buildErrors.log || true
383     - grep "cannot be built" buildLogFile.log | tee -a buildErrors.log || true
384     - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
385     - cd ..
386   artifacts:
387     when: always
388     paths:
389       - $BUILD_DIR/scan_html
390
391 gromacs:gcc-7:build:
392   extends:
393     - .variables:default
394     - .gromacs:base:build
395     - .before_script:default
396     - .use-ccache
397     - .rules:merge-requests
398   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
399   needs:
400     - job: gromacs:gcc-7:configure
401       artifacts: true
402
403 gromacs:gcc-8-cuda-10.1:build:
404   extends:
405     - .variables:default
406     - .gromacs:base:build
407     - .before_script:default
408     - .use-ccache
409     - .rules:merge-requests
410   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
411   needs:
412     - job: gromacs:gcc-8-cuda-10.1:configure
413
414 gromacs:clang-TSAN:build:
415   extends:
416     - .variables:default
417     - .gromacs:base:build
418     - .use-clang:base
419     - .use-ccache
420     - .rules:merge-requests
421   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
422   needs:
423     - job: gromacs:clang-TSAN:configure
424
425       #gromacs:clang-ASAN:build:
426       #  extends:
427       #    - .variables:default
428       #    - .gromacs:base:build
429       #    - .use-clang:base
430       #    - .use-ccache
431       #    - .rules:merge-requests
432       #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
433       #  tags:
434       #  needs:
435       #    - job: gromacs:clang-ASAN:configure
436
437       #gromacs:clang-static-analyzer:build:
438       #  extends:
439       #    - .variables:default
440       #    - .gromacs:static-analyzer-build
441       #    - .use-clang:base
442       #    - .use-ccache
443       #    - .rules:merge-requests
444       #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
445       #  tags:
446       #  needs:
447       #    - job: gromacs:clang-static-analyzer:configure
448
449 gromacs:clang-8:build:
450   extends:
451     - .variables:default
452     - .gromacs:base:build
453     - .before_script:default
454     - .use-ccache
455     - .rules:merge-requests
456   image: gromacs/cmake-3.15.7-llvm-8-intelopencl-openmpi:2020
457   needs:
458     - job: gromacs:clang-8:configure
459
460       #gromacs:clang-9-mpi:build:
461       #  extends:
462       #    - .variables:default
463       #    - .gromacs:base:build
464       #    - .before_script:default
465       #    - .use-ccache
466       #    - .rules:merge-requests
467       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
468       #  needs:
469       #    - job: gromacs:clang-9-mpi:configure
470
471 gromacs:gcc-8-cuda-10.1:release:build:
472   extends:
473     - .variables:default  
474     - .gromacs:base:build
475     - .before_script:default
476     - .use-ccache
477     - .rules:nightly-only-for-release
478   stage: release-build
479   variables:
480     BUILD_DIR: release-builds-gcc
481   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
482   needs:
483     - job: gromacs:gcc-8-cuda-10.1:release:configure
484
485 gromacs:gcc-7:release:build:
486   extends:
487     - .variables:default
488     - .gromacs:base:build
489     - .before_script:default
490     - .use-ccache
491     - .rules:nightly-only-for-release
492   stage: release-build
493   variables:
494     BUILD_DIR: release-builds-gcc
495   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
496   needs:
497     - job: gromacs:gcc-7:release:configure
498
499       #gromacs:clang-9:release:build:
500       #  extends:
501       #    - .variables:default
502       #    - .gromacs:base:build
503       #    - .before_script:default
504       #    - .use-ccache
505       #    - .rules:nightly-only-for-release
506       #  stage: release-build
507       #  variables:
508       #    BUILD_DIR: release-builds-clang
509       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
510       #  needs:
511       #    - job: gromacs:clang-9:release:configure
512
513 gromacs:clang-8-cuda-10.1:release:build:
514   extends:
515     - .variables:default
516     - .gromacs:base:build
517     - .before_script:default
518     - .use-ccache
519     - .rules:nightly-only-for-release
520   stage: release-build
521   variables:
522     BUILD_DIR: release-builds-clang
523   image: gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master
524   needs:
525     - job: gromacs:clang-8-cuda-10.1:release:configure
526
527 # Jobs running during test stage
528
529 .gromacs:base:test:
530   extends:
531     - .variables:default
532   stage: test
533   cache: {}
534   retry:
535     max: 1
536   variables:
537     CTEST_RUN_MODE: "ExperimentalTest"
538   script:
539     - cd $BUILD_DIR
540     # Needed to run MPI enabled code in the docker images, until we set up different users
541     - export OMPI_ALLOW_RUN_AS_ROOT=1
542     - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
543     - ctest -D $CTEST_RUN_MODE --output-on-failure | tee ctestLog.log || true
544     - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
545       ctestLog.log | tee ctestErrors.log
546     - xsltproc $CI_PROJECT_DIR/scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/*.xml > JUnitTestResults.xml
547     - if [ -s ctestErrors.log ] ; then
548       echo "Error during running ctest";
549       exit 1;
550       fi
551     - cd ..
552   artifacts:
553     reports:
554       junit: $BUILD_DIR/JUnitTestResults.xml
555     paths:
556       - $BUILD_DIR/Testing
557       - $BUILD_DIR/tests
558     when: always
559     expire_in: 1 week
560
561 .gromacs:base:regressiontest:
562   extends:
563     - .variables:default
564   variables:
565     KUBERNETES_CPU_LIMIT: 4
566     KUBERNETES_CPU_REQUEST: 4
567     KUBERNETES_MEMORY_REQUEST: 4Gi
568     REGRESSIONTEST_TOTAL_RANK_NUMBER: 4
569     REGRESSIONTEST_OMP_RANK_NUMBER: 2
570     REGRESSIONTEST_PME_RANK_NUMBER: 1
571     REGRESSIONTEST_MPI_RUN_COMMAND: ""
572     REGRESSIONTEST_DOUBLE: ""
573     REGRESSIONTEST_PARALLEL: "-nt"
574   stage: test
575   cache: {}
576   retry:
577     max: 1
578   script:
579     - export LSAN_OPTIONS="suppressions=$CI_PROJECT_DIR/admin/lsan-suppressions.txt:print_suppressions=0"
580     # Needed to run MPI enabled code in the docker images, until we set up different users
581     - export OMPI_ALLOW_RUN_AS_ROOT=1
582     - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
583     - tar xzf gmx-regressiontests.tar.gz
584     - source $INSTALL_DIR/bin/GMXRC
585     - cd regressiontests
586     - perl gmxtest.pl $REGRESSIONTEST_PARALLEL $REGRESSIONTEST_TOTAL_RANK_NUMBER -ntomp $REGRESSIONTEST_OMP_RANK_NUMBER -npme $REGRESSIONTEST_PME_RANK_NUMBER $REGRESSIONTEST_DOUBLE $REGRESSIONTEST_MPI_RUN_COMMAND -xml all
587   artifacts:
588     paths:
589       - regressiontests/gmxtest.xml
590     when: always
591     expire_in: 1 week
592
593 gromacs:gcc-7:test:
594   extends:
595     - .gromacs:base:test
596     - .rules:merge-requests
597   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
598   variables:
599     KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu"
600     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
601   tags:
602   needs:
603     - job: gromacs:gcc-7:build
604
605 gromacs:gcc-8-cuda-10.1:test:
606   extends:
607     - .gromacs:base:test
608     - .rules:merge-requests
609   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
610   variables:
611     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
612     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
613   tags:
614   needs:
615     - job: gromacs:gcc-8-cuda-10.1:build
616
617 gromacs:clang-8:test:
618   extends:
619     - .gromacs:base:test
620     - .rules:merge-requests
621   image: gromacs/cmake-3.15.7-llvm-8-intelopencl-openmpi:2020
622   needs:
623     - job: gromacs:clang-8:build
624
625 gromacs:clang-TSAN:test:
626   extends:
627     - .gromacs:base:test
628     - .rules:merge-requests
629   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
630   needs:
631     - job: gromacs:clang-TSAN:build
632
633       #gromacs:clang-ASAN:test:
634       #  extends:
635       #    - .gromacs:base:test
636       #    - .use-clang:base
637       #    - .rules:merge-requests
638       #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
639       #  variables:
640       #    CTEST_RUN_MODE: "ExperimentalMemCheck"
641       #  tags:
642       #  needs:
643       #    - job: gromacs:clang-ASAN:build
644
645       #gromacs:clang-9-mpi:test:
646       #  extends:
647       #    - .gromacs:base:test
648       #    - .rules:merge-requests
649       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
650       #  tags:
651       #  needs:
652       #    - job: gromacs:clang-9-mpi:build
653
654 gromacs:gcc-7:regressiontest:
655   extends:
656     - .gromacs:base:regressiontest
657     - .rules:merge-requests
658   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
659   variables:
660     KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu"
661     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
662     REGRESSIONTEST_PME_RANK_NUMBER: 0
663     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
664     REGRESSIONTEST_OMP_RANK_NUMBER: 1
665   tags:
666   needs:
667     - job: gromacs:gcc-7:build
668     - job: regressiontests:prepare
669
670 gromacs:gcc-8-cuda-10.1:regressiontest:
671   extends:
672     - .gromacs:base:regressiontest
673     - .rules:merge-requests
674   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
675   variables:
676     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
677     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
678     REGRESSIONTEST_PME_RANK_NUMBER: 0
679     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
680     REGRESSIONTEST_OMP_RANK_NUMBER: 1
681   tags:
682   needs:
683     - job: gromacs:gcc-8-cuda-10.1:build
684     - job: regressiontests:prepare
685
686 gromacs:clang-8:regressiontest:
687   extends:
688     - .gromacs:base:regressiontest
689     - .rules:merge-requests
690   image: gromacs/cmake-3.15.7-llvm-8-intelopencl-openmpi:2020
691   tags:
692   needs:
693     - job: gromacs:clang-8:build
694     - job: regressiontests:prepare
695
696 gromacs:clang-TSAN:regressiontest:
697   extends:
698     - .gromacs:base:regressiontest
699     - .rules:merge-requests
700   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
701   tags:
702   needs:
703     - job: gromacs:clang-TSAN:build
704     - job: regressiontests:prepare
705
706       #gromacs:clang-ASAN:regressiontest:
707       #  extends:
708       #    - .gromacs:base:regressiontest
709       #    - .use-clang:base
710       #    - .rules:merge-requests
711       #  image: gromacs/cmake-3.13.0-llvm-8-tsan:master
712       #  tags:
713       #  needs:
714       #    - job: gromacs:clang-ASAN:build
715       #    - job: regressiontests:prepare
716
717       #gromacs:clang-9:regressiontest:
718       #  extends:
719       #    - .gromacs:base:regressiontest
720       #    - .rules:merge-requests
721       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
722       #  variables:
723       #    REGRESSIONTEST_DOUBLE: "-double"
724       #    REGRESSIONTEST_PARALLEL: "-np"
725       #  tags:
726       #  needs:
727       #    - job: gromacs:clang-9-mpi:build
728       #    - job: regressiontests:prepare
729
730 gromacs:gcc-8-cuda-10.1:release:test:
731   extends:
732     - .gromacs:base:test
733     - .rules:nightly-only-for-release
734   stage: release-tests
735   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
736   variables:
737     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
738     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
739     BUILD_DIR: release-builds-gcc
740   tags:
741   needs:
742     - job: gromacs:gcc-8-cuda-10.1:release:configure
743     - job: gromacs:gcc-8-cuda-10.1:release:build
744
745 gromacs:gcc-7:release:test:
746   extends:
747     - .gromacs:base:test
748     - .rules:nightly-only-for-release
749   stage: release-tests
750   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
751   variables:
752     BUILD_DIR: release-builds-gcc
753   needs:
754     - job: gromacs:gcc-7:release:configure
755     - job: gromacs:gcc-7:release:build
756
757       #gromacs:clang-9:release:test:
758       #  extends:
759       #    - .gromacs:base:test
760       #    - .rules:nightly-only-for-release
761       #  stage: release-tests
762       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
763       #  variables:
764       #    BUILD_DIR: release-builds-clang
765       #  needs:
766       #    - job: gromacs:clang-9:release:configure
767       #    - job: gromacs:clang-9:release:build
768
769 gromacs:clang-8-cuda-10.1:release:test:
770   extends:
771     - .gromacs:base:test
772     - .rules:nightly-only-for-release
773   stage: release-tests
774   image: gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master
775   variables:
776     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
777     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
778     BUILD_DIR: release-builds-clang
779   tags:
780   needs:
781     - job: gromacs:clang-8-cuda-10.1:release:configure
782     - job: gromacs:clang-8-cuda-10.1:release:build
783
784 gromacs:gcc-7:release:regressiontest:
785   extends:
786     - .gromacs:base:regressiontest
787     - .rules:nightly-only-for-release
788   stage: release-tests
789   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
790   variables:
791     BUILD_DIR: release-builds-gcc
792   tags:
793   needs:
794     - job: gromacs:gcc-7:release:build
795     - job: regressiontests:package
796
797       #gromacs:clang-9:release:regressiontest:
798       #  extends:
799       #    - .gromacs:base:regressiontest
800       #    - .rules:nightly-only-for-release
801       #  stage: release-tests
802       #  image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
803       #  variables:
804       #    BUILD_DIR: release-builds-clang
805       #    REGRESSIONTEST_DOUBLE: "-double"
806       #    REGRESSIONTEST_PARALLEL: "-np"
807       #  tags:
808       #  needs:
809       #    - job: gromacs:clang-9:release:build
810       #    - job: regressiontests:package
811
812 gromacs:clang-8-cuda-10.1:release:regressiontest:
813   extends:
814     - .gromacs:base:regressiontest
815     - .rules:nightly-only-for-release
816   stage: release-tests
817   image: gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master
818   variables:
819     BUILD_DIR: release-builds-clang
820     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
821     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
822     REGRESSIONTEST_PME_RANK_NUMBER: 0
823     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
824     REGRESSIONTEST_OMP_RANK_NUMBER: 1
825   tags:
826   needs:
827     - job: gromacs:clang-8-cuda-10.1:release:build
828     - job: regressiontests:package
829