2 # Initial build that always needs to pass before follow-up stages run
10 KUBERNETES_CPU_LIMIT: 8
11 KUBERNETES_CPU_REQUEST: 4
12 KUBERNETES_MEMORY_LIMIT: 8Gi
13 CMAKE_COMPILER_SCRIPT: ""
14 CMAKE_EXTRA_OPTIONS: ""
15 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
16 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
17 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
18 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
19 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
20 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
21 BUILD_DIR: simple-build
26 - echo $CMAKE_COMPILER_SCRIPT
27 - echo $CMAKE_EXTRA_OPTIONS
28 - echo $CMAKE_SIMD_OPTIONS
29 - echo $CMAKE_GPU_OPTIONS
30 - echo $CMAKE_MPI_OPTIONS
31 - echo $CMAKE_PRECISION_OPTIONS
32 - echo $CMAKE_BUILD_TYPE_OPTIONS
33 - echo $CMAKE_GMXAPI_OPTIONS
34 - if [[ -d $BUILD_DIR ]] ; then
35 echo "Cleaning up build directory" ;
36 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
38 echo "Preparing new build directory" ;
43 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
44 $CMAKE_COMPILER_SCRIPT
48 $CMAKE_PRECISION_OPTIONS
49 $CMAKE_BUILD_TYPE_OPTIONS
52 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
53 2>&1 | tee cmakeLog.log
54 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
55 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
56 - cmake --build . -- -j8 2>&1 | tee buildLogFile.log
57 - cmake --build . --target tests -- -j8 2>&1 | tee testBuildLogFile.log
58 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
59 | grep -v "CMake" | tee buildErrors.log || true
60 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
61 - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
62 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
63 - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
64 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
65 ctestLog.log | tee ctestErrors.log
66 - xsltproc scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
67 - if [ -s ctestErrors.log ] ; then
68 echo "Error during running ctest";
74 junit: $BUILD_DIR/JUnitTestResults.xml
80 # Jobs running in first pre-build stage
82 .configure-extends-template:
86 stage: configure-build
88 KUBERNETES_CPU_LIMIT: 1
89 KUBERNETES_CPU_REQUEST: 1
90 KUBERNETES_MEMORY_LIMIT: 2Gi
91 CMAKE_COMPILER_SCRIPT: ""
92 CMAKE_EXTRA_OPTIONS: ""
93 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AUTO"
94 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
95 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
96 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
97 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
98 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
100 - echo $CMAKE_COMPILER_SCRIPT
101 - echo $CMAKE_EXTRA_OPTIONS
102 - echo $CMAKE_SIMD_OPTIONS
103 - echo $CMAKE_GPU_OPTIONS
104 - echo $CMAKE_MPI_OPTIONS
105 - echo $CMAKE_PRECISION_OPTIONS
106 - echo $CMAKE_BUILD_TYPE_OPTIONS
107 - echo $CMAKE_GMXAPI_OPTIONS
108 - if [[ -d $BUILD_DIR ]] ; then
109 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
111 echo "Preparing new build directory" ;
116 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
117 $CMAKE_COMPILER_SCRIPT
121 $CMAKE_PRECISION_OPTIONS
122 $CMAKE_BUILD_TYPE_OPTIONS
124 $CMAKE_GMXAPI_OPTIONS
125 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
126 2>&1 | tee cmakeLog.log
127 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
128 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
135 .configure-release-extends-template:
139 stage: release-configure
141 KUBERNETES_CPU_LIMIT: 1
142 KUBERNETES_CPU_REQUEST: 1
143 KUBERNETES_MEMORY_LIMIT: 2Gi
144 CMAKE_COMPILER_SCRIPT: ""
145 CMAKE_EXTRA_OPTIONS: ""
146 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AUTO"
147 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
148 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
149 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
150 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
151 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
152 RELEASE_BUILD_DIR: release-builds
153 RELEASE_SOURCE: release-source-from-tarball
154 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
163 - VERSION=`cat version.json |
164 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
165 - if [[ $GROMACS_RELEASE != "true" ]] ; then
166 VERSION=$VERSION-dev ;
168 - SOURCENAME=gromacs-$VERSION
169 - SOURCETARBALL=$SOURCENAME.tar.gz
170 - REGTESTNAME=regressiontests-$VERSION
171 - REGTESTTARBALL=$REGTESTNAME.tar.gz
172 - echo "$SOURCETARBALL"
173 - echo "$REGTESTTARBALL"
174 - RELEASE_TARBALLS=release-tarballs
175 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
176 - mv $SOURCETARBALL $RELEASE_TARBALLS
177 - mv $REGTESTTARBALL $RELEASE_TARBALLS
178 - cd $RELEASE_TARBALLS
179 # We rename the source and regressiontest directories
180 # to have names for them that don't change for different versions.
181 - tar -xf $SOURCETARBALL
182 - mv $SOURCENAME ../$RELEASE_SOURCE
183 - tar -xf $REGTESTTARBALL
184 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
185 - rm $SOURCETARBALL $REGTESTTARBALL
187 - echo $CMAKE_COMPILER_SCRIPT
188 - echo $CMAKE_EXTRA_OPTIONS
189 - echo $CMAKE_SIMD_OPTIONS
190 - echo $CMAKE_GPU_OPTIONS
191 - echo $CMAKE_MPI_OPTIONS
192 - echo $CMAKE_PRECISION_OPTIONS
193 - echo $CMAKE_BUILD_TYPE_OPTIONS
194 - echo $CMAKE_GMXAPI_OPTIONS
195 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
196 echo "Cleaning up build directory" ;
197 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
199 echo "Preparing new build directory" ;
200 mkdir $RELEASE_BUILD_DIR ;
202 - cd $RELEASE_BUILD_DIR
203 - cmake ../$RELEASE_SOURCE/
204 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
205 $CMAKE_COMPILER_SCRIPT
209 $CMAKE_PRECISION_OPTIONS
210 $CMAKE_BUILD_TYPE_OPTIONS
212 $CMAKE_GMXAPI_OPTIONS
213 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
214 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
215 2>&1 | tee cmakeLog.log
216 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
217 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
223 - $RELEASE_REGRESSIONTESTS
226 # Templates for configuration stage
229 - .configure-extends-template
234 - .configure-extends-template
243 configure-gcc-7-release:
245 - .configure-release-extends-template
249 RELEASE_BUILD_DIR: release-builds-gcc
258 - package-archive-release
259 - package-regressiontests-release
260 - prepare-release-version
262 configure-gcc-7-simd-sse41:
264 - .configure-extends-template
270 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1"
275 configure-gcc-7-double:
277 - .configure-extends-template
283 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
288 configure-gcc-7-double-release:
290 - .configure-release-extends-template
294 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
295 RELEASE_BUILD_DIR: release-builds-gcc
304 - package-archive-release
305 - package-regressiontests-release
306 - prepare-release-version
308 configure-gcc-7-gmxapi:
310 - .configure-extends-template
311 - .configure-gmxapi-template
320 configure-gcc-7-gmxapi-release:
322 - .configure-release-extends-template
323 - .configure-gmxapi-template
327 RELEASE_BUILD_DIR: release-builds-gcc
336 - package-archive-release
337 - package-regressiontests-release
338 - prepare-release-version
342 - .configure-extends-template
351 configure-gcc-8-release:
353 - .configure-release-extends-template
357 RELEASE_BUILD_DIR: release-builds-gcc
366 - package-archive-release
367 - package-regressiontests-release
368 - prepare-release-version
370 configure-gcc-8-cuda-10.2:
372 - .configure-gcc-cuda
373 - .use-gcc8:cuda-10.2
381 # For version of clang before 7, we need to always provide the full version
382 # Use something like this instead in the download script:
383 # APT_COMPILER_VERSION=$(($COMPILER_MAJOR_VERSION < 7 ? "${COMPILER_MAJOR_VERSION}.0" : $COMPILER_MAJOR_VERSION))
386 - .configure-extends-template
392 COMPILER_MAJOR_VERSION: "6.0"
393 CMAKE_MPI_OPTIONS: -DGMX_OPENMP=OFF
400 - .configure-extends-template
409 configure-clang-7-release:
411 - .configure-release-extends-template
415 RELEASE_BUILD_DIR: release-builds-clang
424 - package-archive-release
425 - package-regressiontests-release
426 - prepare-release-version
428 configure-clang-7-gmxapi:
430 - .configure-extends-template
431 - .configure-gmxapi-template
440 configure-clang-7-gmxapi-release:
442 - .configure-release-extends-template
443 - .configure-gmxapi-template
447 RELEASE_BUILD_DIR: release-builds-clang
456 - package-archive-release
457 - package-regressiontests-release
458 - prepare-release-version
462 - .configure-extends-template
471 configure-clang-8-release:
473 - .configure-release-extends-template
477 RELEASE_BUILD_DIR: release-builds-clang
486 - package-archive-release
487 - package-regressiontests-release
488 - prepare-release-version
490 # Jobs running during build stage
492 .binary-build-template:
493 # Dockerfiles are from dockerhub, user eriklindahl
494 # image in admin/dockerimages/ci-docs-py27
496 image: biophysics/gcc-gromacs
501 - cmake --build . -- -j8 2>&1 | tee buildLogFile.log
502 - cmake --build . --target tests -- -j8 2>&1 | tee testBuildLogFile.log
503 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
504 | grep -v "CMake" | tee buildErrors.log || true
505 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
506 - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
507 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
515 .build-extends-template:
517 - .binary-build-template
523 - .build-extends-template
528 - .build-extends-template
533 - job: configure-gcc-7
541 - .build-extends-template
545 BUILD_DIR: release-builds-gcc
547 - job: configure-gcc-7-release
557 build-gcc-7-simd-sse41:
559 - .build-extends-template
564 - job: configure-gcc-7-simd-sse41
572 - .build-extends-template
577 - job: configure-gcc-7-double
585 - .build-extends-template
586 - .gmxapi-extra-installs
591 - job: configure-gcc-7-gmxapi
597 build-gcc-7-double-release:
599 - .build-extends-template
603 BUILD_DIR: release-builds-gcc
605 - job: configure-gcc-7-double-release
615 build-gcc-7-gmxapi-release:
617 - .build-extends-template
618 - .gmxapi-extra-installs
622 BUILD_DIR: release-builds-gcc
624 - job: configure-gcc-7-gmxapi-release
636 - .build-extends-template
641 - job: configure-gcc-8
649 - .build-extends-template
653 BUILD_DIR: release-builds-gcc
655 - job: configure-gcc-8-release
665 build-gcc-8-cuda-10.2:
668 - .use-gcc8:cuda-10.2
672 - job: configure-gcc-8-cuda-10.2
680 - .build-extends-template
689 - job: configure-clang-6
702 - job: configure-clang-7
708 build-clang-7-release:
714 BUILD_DIR: release-builds-clang
716 - job: configure-clang-7-release
726 build-clang-7-gmxapi:
729 - .gmxapi-extra-installs
734 - job: configure-clang-7-gmxapi
740 build-clang-7-gmxapi-release:
743 - .gmxapi-extra-installs
747 BUILD_DIR: release-builds-clang
749 - job: configure-clang-7-gmxapi-release
766 - job: configure-clang-8
772 build-clang-8-release:
778 BUILD_DIR: release-builds-clang
780 - job: configure-clang-8-release
791 # Jobs running during test stage
792 .test-script-template:
795 - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
796 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
797 ctestLog.log | tee ctestErrors.log
798 - xsltproc scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
799 - if [ -s ctestErrors.log ] ; then
800 echo "Error during running ctest";
806 junit: $BUILD_DIR/JUnitTestResults.xml
813 .test-extends-template:
818 - .test-script-template
823 - .test-extends-template
828 - .test-extends-template
840 - .test-extends-template
844 BUILD_DIR: release-builds-gcc
846 - job: configure-gcc-7-release
848 - job: build-gcc-7-release
858 test-gcc-7-simd-sse41:
860 - .test-extends-template
865 - job: build-gcc-7-simd-sse41
872 - .test-extends-template
877 - job: build-gcc-7-double
882 test-gcc-7-double-release:
884 - .test-extends-template
888 BUILD_DIR: release-builds-gcc
890 - job: configure-gcc-7-double-release
892 - job: build-gcc-7-double-release
904 - .test-extends-template
905 - .gmxapi-extra-installs
910 - job: build-gcc-7-gmxapi
915 test-gcc-7-gmxapi-release:
917 - .test-extends-template
918 - .gmxapi-extra-installs
922 BUILD_DIR: release-builds-gcc
924 - job: configure-gcc-7-gmxapi-release
926 - job: build-gcc-7-gmxapi-release
938 - .test-extends-template
950 - .test-extends-template
954 BUILD_DIR: release-builds-gcc
956 - job: configure-gcc-8-release
958 - job: build-gcc-8-release
968 test-gcc-8-cuda-10.2:
970 KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
971 KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
974 - .use-gcc8:cuda-10.2
978 - job: build-gcc-8-cuda-10.2
985 - .test-extends-template
997 - .test-extends-template
1002 - job: build-clang-7
1007 test-clang-7-release:
1009 - .test-extends-template
1011 stage: release-tests
1013 BUILD_DIR: release-builds-clang
1015 - job: configure-clang-7-release
1017 - job: build-clang-7-release
1027 test-clang-7-gmxapi:
1029 - .test-extends-template
1030 - .gmxapi-extra-installs
1035 - job: build-clang-7-gmxapi
1040 test-clang-7-gmxapi-release:
1042 - .test-extends-template
1043 - .gmxapi-extra-installs
1045 stage: release-tests
1047 BUILD_DIR: release-builds-clang
1049 - job: configure-clang-7-gmxapi-release
1051 - job: build-clang-7-gmxapi-release
1063 - .test-extends-template
1068 - job: build-clang-8
1073 test-clang-8-release:
1075 - .test-extends-template
1077 stage: release-tests
1079 BUILD_DIR: release-builds-clang
1081 - job: configure-clang-8-release
1083 - job: build-clang-8-release