2 .simple-build-template:
3 # Docker images are from dockerhub, user eriklindahl
5 image: biophysics/gcc-gromacs
7 KUBERNETES_CPU_LIMIT: 8
8 KUBERNETES_CPU_REQUEST: 4
9 KUBERNETES_MEMORY_LIMIT: 8Gi
10 CMAKE_COMPILER_SCRIPT: ""
11 CMAKE_EXTRA_OPTIONS: ""
12 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
13 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
14 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
15 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
16 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
17 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
20 - echo $CMAKE_COMPILER_SCRIPT
21 - echo $CMAKE_EXTRA_OPTIONS
22 - echo $CMAKE_SIMD_OPTIONS
23 - echo $CMAKE_GPU_OPTIONS
24 - echo $CMAKE_MPI_OPTIONS
25 - echo $CMAKE_PRECISION_OPTIONS
26 - echo $CMAKE_BUILD_TYPE_OPTIONS
27 - echo $CMAKE_GMXAPI_OPTIONS
28 - if [[ -d $BUILD_DIR ]] ; then
29 echo "Cleaning up build directory" ;
30 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
32 echo "Preparing new build directory" ;
37 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
38 $CMAKE_COMPILER_SCRIPT
42 $CMAKE_PRECISION_OPTIONS
43 $CMAKE_BUILD_TYPE_OPTIONS
46 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
47 2>&1 | tee cmakeLog.log
48 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
49 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
50 - cmake --build . -- -j8 2>&1 | tee buildLogFile.log
51 - cmake --build . --target tests -- -j8 2>&1 | tee testBuildLogFile.log
52 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
53 | grep -v "CMake" | tee buildErrors.log || true
54 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
55 - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
56 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
57 - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
58 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
59 ctestLog.log | tee ctestErrors.log
60 - xsltproc scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
61 - if [ -s ctestErrors.log ] ; then
62 echo "Error during running ctest";
68 junit: $BUILD_DIR/JUnitTestResults.xml
74 # Initial build that always needs to pass before follow-up stages run
77 - .simple-build-template
78 - .build-cache-template
80 - .gcc-before-script-template
84 COMPILER_MAJOR_VERSION: 7
85 BUILD_DIR: simple-build
90 # Jobs running in first pre-build stage
91 .configure-build-template:
92 # Docker image uploaded to dockerhub by user eriklindahl
93 # TODO: Get DockerFile for admin/dockerfiles
94 stage: configure-build
95 image: biophysics/gcc-gromacs
97 KUBERNETES_CPU_LIMIT: 1
98 KUBERNETES_CPU_REQUEST: 1
99 KUBERNETES_MEMORY_LIMIT: 2Gi
100 CMAKE_COMPILER_SCRIPT: ""
101 CMAKE_EXTRA_OPTIONS: ""
102 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AUTO"
103 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
104 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
105 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
106 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
107 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
110 - echo $CMAKE_COMPILER_SCRIPT
111 - echo $CMAKE_EXTRA_OPTIONS
112 - echo $CMAKE_SIMD_OPTIONS
113 - echo $CMAKE_GPU_OPTIONS
114 - echo $CMAKE_MPI_OPTIONS
115 - echo $CMAKE_PRECISION_OPTIONS
116 - echo $CMAKE_BUILD_TYPE_OPTIONS
117 - echo $CMAKE_GMXAPI_OPTIONS
118 - if [[ -d $BUILD_DIR ]] ; then
119 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
121 echo "Preparing new build directory" ;
126 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
127 $CMAKE_COMPILER_SCRIPT
131 $CMAKE_PRECISION_OPTIONS
132 $CMAKE_BUILD_TYPE_OPTIONS
134 $CMAKE_GMXAPI_OPTIONS
135 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
136 2>&1 | tee cmakeLog.log
137 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
138 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
145 .configure-build-release-template:
146 # Dockerfiles are from dockerhub, user eriklindahl
147 # image in admin/dockerimages/ci-docs-py27
148 stage: release-configure
149 image: biophysics/gcc-gromacs
151 KUBERNETES_CPU_LIMIT: 1
152 KUBERNETES_CPU_REQUEST: 1
153 KUBERNETES_MEMORY_LIMIT: 2Gi
154 CMAKE_COMPILER_SCRIPT: ""
155 CMAKE_EXTRA_OPTIONS: ""
156 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AUTO"
157 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
158 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
159 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
160 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
161 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
162 RELEASE_BUILD_DIR: release-builds
163 RELEASE_SOURCE: release-source-from-tarball
164 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
174 - VERSION=`cat version.json |
175 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
176 - if [[ $GROMACS_RELEASE != "true" ]] ; then
177 VERSION=$VERSION-dev ;
179 - SOURCENAME=gromacs-$VERSION
180 - SOURCETARBALL=$SOURCENAME.tar.gz
181 - REGTESTNAME=regressiontests-$VERSION
182 - REGTESTTARBALL=$REGTESTNAME.tar.gz
183 - echo "$SOURCETARBALL"
184 - echo "$REGTESTTARBALL"
185 - RELEASE_TARBALLS=release-tarballs
186 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
187 - mv $SOURCETARBALL $RELEASE_TARBALLS
188 - mv $REGTESTTARBALL $RELEASE_TARBALLS
189 - cd $RELEASE_TARBALLS
190 # We rename the source and regressiontest directories
191 # to have names for them that don't change for different versions.
192 - tar -xf $SOURCETARBALL
193 - mv $SOURCENAME ../$RELEASE_SOURCE
194 - tar -xf $REGTESTTARBALL
195 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
196 - rm $SOURCETARBALL $REGTESTTARBALL
198 - echo $CMAKE_COMPILER_SCRIPT
199 - echo $CMAKE_EXTRA_OPTIONS
200 - echo $CMAKE_SIMD_OPTIONS
201 - echo $CMAKE_GPU_OPTIONS
202 - echo $CMAKE_MPI_OPTIONS
203 - echo $CMAKE_PRECISION_OPTIONS
204 - echo $CMAKE_BUILD_TYPE_OPTIONS
205 - echo $CMAKE_GMXAPI_OPTIONS
206 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
207 echo "Cleaning up build directory" ;
208 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
210 echo "Preparing new build directory" ;
211 mkdir $RELEASE_BUILD_DIR ;
213 - cd $RELEASE_BUILD_DIR
214 - cmake ../$RELEASE_SOURCE/
215 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
216 $CMAKE_COMPILER_SCRIPT
220 $CMAKE_PRECISION_OPTIONS
221 $CMAKE_BUILD_TYPE_OPTIONS
223 $CMAKE_GMXAPI_OPTIONS
224 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
225 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
226 2>&1 | tee cmakeLog.log
227 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
228 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
234 - $RELEASE_REGRESSIONTESTS
237 .configure-extends-template:
239 - .configure-build-template
243 .configure-release-extends-template:
245 - .configure-build-release-template
249 # Templates for configuration stage
252 - .configure-extends-template
253 - .gcc-before-script-template
254 - .build-gcc-template
256 .configure-gcc-release:
258 - .configure-release-extends-template
259 - .gcc-before-script-template
260 - .build-gcc-template
275 COMPILER_MAJOR_VERSION: 7
280 configure-gcc-7-release:
282 - .configure-gcc-release
286 COMPILER_MAJOR_VERSION: 7
287 RELEASE_BUILD_DIR: release-builds-gcc
296 - package-archive-release
297 - package-regressiontests-release
298 - prepare-release-version
300 configure-gcc-7-simd-sse41:
308 COMPILER_MAJOR_VERSION: 7
309 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1"
314 configure-gcc-7-double:
322 COMPILER_MAJOR_VERSION: 7
323 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
328 configure-gcc-7-double-release:
330 - .configure-gcc-release
334 COMPILER_MAJOR_VERSION: 7
335 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
336 RELEASE_BUILD_DIR: release-builds-gcc
345 - package-archive-release
346 - package-regressiontests-release
347 - prepare-release-version
349 configure-gcc-7-gmxapi:
352 - .configure-gmxapi-template
358 COMPILER_MAJOR_VERSION: 7
363 configure-gcc-7-gmxapi-release:
365 - .configure-gcc-release
366 - .configure-gmxapi-template
370 COMPILER_MAJOR_VERSION: 7
371 RELEASE_BUILD_DIR: release-builds-gcc
380 - package-archive-release
381 - package-regressiontests-release
382 - prepare-release-version
392 COMPILER_MAJOR_VERSION: 8
397 configure-gcc-8-release:
399 - .configure-gcc-release
403 COMPILER_MAJOR_VERSION: 8
404 RELEASE_BUILD_DIR: release-builds-gcc
413 - package-archive-release
414 - package-regressiontests-release
415 - prepare-release-version
417 configure-gcc-8-cuda-10.2:
419 - .configure-gcc-cuda
420 - .gcc-8-cuda-10.2-template
430 - .configure-extends-template
431 - .clang-before-script-template
432 - .build-clang-template
434 .configure-clang-release:
436 - .configure-release-extends-template
437 - .clang-before-script-template
438 - .build-clang-template
440 # For version of clang before 7, we need to always provide the full version
441 # Use something like this instead in the download script:
442 # APT_COMPILER_VERSION=$(($COMPILER_MAJOR_VERSION < 7 ? "${COMPILER_MAJOR_VERSION}.0" : $COMPILER_MAJOR_VERSION))
451 COMPILER_MAJOR_VERSION: "6.0"
452 CMAKE_MPI_OPTIONS: -DGMX_OPENMP=OFF
465 COMPILER_MAJOR_VERSION: 7
470 configure-clang-7-release:
472 - .configure-clang-release
476 COMPILER_MAJOR_VERSION: 7
477 RELEASE_BUILD_DIR: release-builds-clang
486 - package-archive-release
487 - package-regressiontests-release
488 - prepare-release-version
490 configure-clang-7-gmxapi:
493 - .configure-gmxapi-template
499 COMPILER_MAJOR_VERSION: 7
504 configure-clang-7-gmxapi-release:
506 - .configure-clang-release
507 - .configure-gmxapi-template
511 COMPILER_MAJOR_VERSION: 7
512 RELEASE_BUILD_DIR: release-builds-clang
521 - package-archive-release
522 - package-regressiontests-release
523 - prepare-release-version
533 COMPILER_MAJOR_VERSION: 8
538 configure-clang-8-release:
540 - .configure-clang-release
544 COMPILER_MAJOR_VERSION: 8
545 RELEASE_BUILD_DIR: release-builds-clang
554 - package-archive-release
555 - package-regressiontests-release
556 - prepare-release-version
558 # Jobs running during build stage
560 .binary-build-template:
561 # Dockerfiles are from dockerhub, user eriklindahl
562 # image in admin/dockerimages/ci-docs-py27
564 image: biophysics/gcc-gromacs
569 - cmake --build . -- -j8 2>&1 | tee buildLogFile.log
570 - cmake --build . --target tests -- -j8 2>&1 | tee testBuildLogFile.log
571 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
572 | grep -v "CMake" | tee buildErrors.log || true
573 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
574 - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
575 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
583 .build-extends-template:
585 - .binary-build-template
586 - .build-cache-template
591 - .build-extends-template
592 - .gcc-before-script-template
593 - .build-gcc-template
607 - job: configure-gcc-7
619 BUILD_DIR: release-builds-gcc
621 - job: configure-gcc-7-release
631 build-gcc-7-simd-sse41:
638 - job: configure-gcc-7-simd-sse41
651 - job: configure-gcc-7-double
660 - .gmxapi-extra-installs
665 - job: configure-gcc-7-gmxapi
671 build-gcc-7-double-release:
677 BUILD_DIR: release-builds-gcc
679 - job: configure-gcc-7-double-release
689 build-gcc-7-gmxapi-release:
692 - .gmxapi-extra-installs
696 BUILD_DIR: release-builds-gcc
698 - job: configure-gcc-7-gmxapi-release
715 - job: configure-gcc-8
727 BUILD_DIR: release-builds-gcc
729 - job: configure-gcc-8-release
739 build-gcc-8-cuda-10.2:
742 - .gcc-8-cuda-10.2-template
746 - job: configure-gcc-8-cuda-10.2
754 - .build-extends-template
755 - .clang-before-script-template
756 - .build-clang-template
765 - job: configure-clang-6
778 - job: configure-clang-7
784 build-clang-7-release:
790 BUILD_DIR: release-builds-clang
792 - job: configure-clang-7-release
802 build-clang-7-gmxapi:
805 - .gmxapi-extra-installs
810 - job: configure-clang-7-gmxapi
816 build-clang-7-gmxapi-release:
819 - .gmxapi-extra-installs
823 BUILD_DIR: release-builds-clang
825 - job: configure-clang-7-gmxapi-release
842 - job: configure-clang-8
848 build-clang-8-release:
854 BUILD_DIR: release-builds-clang
856 - job: configure-clang-8-release
867 # Jobs running during test stage
871 # Docker image uploaded to dockerhub by user eriklindahl
872 # TODO: Get DockerFile for admin/dockerfiles
873 image: biophysics/gcc-gromacs
878 .test-script-template:
881 - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
882 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
883 ctestLog.log | tee ctestErrors.log
884 - xsltproc scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
885 - if [ -s ctestErrors.log ] ; then
886 echo "Error during running ctest";
892 junit: $BUILD_DIR/JUnitTestResults.xml
899 .test-extends-template:
901 - .test-base-template
902 - .pull-cache-template
903 - .test-script-template
908 COMPILER_MAJOR_VERSION: 7
913 - .test-extends-template
914 - .gcc-before-script-template
940 BUILD_DIR: release-builds-gcc
942 - job: configure-gcc-7-release
944 - job: build-gcc-7-release
954 test-gcc-7-simd-sse41:
961 - job: build-gcc-7-simd-sse41
973 - job: build-gcc-7-double
978 test-gcc-7-double-release:
984 BUILD_DIR: release-builds-gcc
986 - job: configure-gcc-7-double-release
988 - job: build-gcc-7-double-release
1001 - .gmxapi-extra-installs
1006 - job: build-gcc-7-gmxapi
1011 test-gcc-7-gmxapi-release:
1014 - .gmxapi-extra-installs
1016 stage: release-tests
1018 BUILD_DIR: release-builds-gcc
1020 - job: configure-gcc-7-gmxapi-release
1022 - job: build-gcc-7-gmxapi-release
1048 stage: release-tests
1050 BUILD_DIR: release-builds-gcc
1052 - job: configure-gcc-8-release
1054 - job: build-gcc-8-release
1064 test-gcc-8-cuda-10.2:
1066 KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
1067 KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
1070 - .gcc-8-cuda-10.2-template
1074 - job: build-gcc-8-cuda-10.2
1079 .test-clang-template:
1081 COMPILER_MAJOR_VERSION: 7
1082 BUILD_DIR: build-clang
1086 - .test-extends-template
1087 - .clang-before-script-template
1088 - .test-clang-template
1097 - job: build-clang-6
1109 - job: build-clang-7
1114 test-clang-7-release:
1118 stage: release-tests
1120 BUILD_DIR: release-builds-clang
1122 - job: configure-clang-7-release
1124 - job: build-clang-7-release
1134 test-clang-7-gmxapi:
1137 - .gmxapi-extra-installs
1142 - job: build-clang-7-gmxapi
1147 test-clang-7-gmxapi-release:
1150 - .gmxapi-extra-installs
1152 stage: release-tests
1154 BUILD_DIR: release-builds-clang
1156 - job: configure-clang-7-gmxapi-release
1158 - job: build-clang-7-gmxapi-release
1175 - job: build-clang-8
1180 test-clang-8-release:
1184 stage: release-tests
1186 BUILD_DIR: release-builds-clang
1188 - job: configure-clang-8-release
1190 - job: build-clang-8-release