1 # Build documentation and web page.
2 .documentation-before-script-template:
8 - time apt-get -qq update
9 - time apt-get -qqy --no-install-suggests --no-install-recommends install
12 - export CCACHE_BASEDIR=${PWD}
13 - export CCACHE_DIR=${PWD}/ccache
15 .configure-docs-template:
16 # Built by admin/dockerfiles/ci-docs-clang
17 # TODO this should be organized more like the current documentation.py script
18 image: gromacs/ci-docs-clang:master
19 stage: configure-build
21 KUBERNETES_CPU_LIMIT: 1
22 KUBERNETES_CPU_REQUEST: 1
23 KUBERNETES_MEMORY_LIMIT: 2Gi
24 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
25 CMAKE_EXTRA_OPTIONS: ""
26 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
27 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=OFF"
28 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
29 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
30 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
31 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
34 - if [[ ! -z $GROMACS_RELEASE && $GROMACS_RELEASE == "true" ]] ; then
35 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
37 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
39 - echo $CMAKE_COMPILER_SCRIPT
40 - echo $CMAKE_EXTRA_OPTIONS
41 - echo $CMAKE_SIMD_OPTIONS
42 - echo $CMAKE_GPU_OPTIONS
43 - echo $CMAKE_MPI_OPTIONS
44 - echo $CMAKE_PRECISION_OPTIONS
45 - echo $CMAKE_BUILD_TYPE_OPTIONS
46 - echo $CMAKE_GMXAPI_OPTIONS
48 - if [[ -d $BUILD_DIR ]] ; then
49 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
51 echo "Preparing new build directory" ;
56 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
57 $CMAKE_COMPILER_SCRIPT
61 $CMAKE_PRECISION_OPTIONS
62 $CMAKE_BUILD_TYPE_OPTIONS
66 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
67 2>&1 | tee cmakeLog.log
68 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
69 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
72 name: docs-artifacts-$CI_COMMIT_REF_SLUG
78 .configure-docs-release-template:
79 # Built by admin/dockerfiles/ci-docs-clang
80 # TODO this should be organized more like the current documentation.py script
81 image: gromacs/ci-docs-clang:master
82 stage: release-configure
84 KUBERNETES_CPU_LIMIT: 1
85 KUBERNETES_CPU_REQUEST: 1
86 KUBERNETES_MEMORY_LIMIT: 2Gi
87 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
88 CMAKE_EXTRA_OPTIONS: ""
89 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
90 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
91 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
92 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
93 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
94 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
95 RELEASE_BUILD_DIR: release-doc-builds
96 RELEASE_SOURCE: release-source-from-tarball
97 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
107 - if [[ $GROMACS_RELEASE == "true" ]] ; then
108 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
110 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
112 - echo $CMAKE_COMPILER_SCRIPT
113 - echo $CMAKE_EXTRA_OPTIONS
114 - echo $CMAKE_SIMD_OPTIONS
115 - echo $CMAKE_GPU_OPTIONS
116 - echo $CMAKE_MPI_OPTIONS
117 - echo $CMAKE_PRECISION_OPTIONS
118 - echo $CMAKE_BUILD_TYPE_OPTIONS
119 - echo $CMAKE_GMXAPI_OPTIONS
121 - VERSION=`cat version.json |
122 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
123 - if [[ $GROMACS_RELEASE != "true" ]] ; then
124 VERSION=$VERSION-dev ;
126 - REGTEST_COMPARE=`cat version.json |
127 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
128 - SOURCENAME=gromacs-$VERSION
129 - SOURCETARBALL=$SOURCENAME.tar.gz
130 - REGTESTNAME=regressiontests-$VERSION
131 - REGTESTTARBALL=$REGTESTNAME.tar.gz
132 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
133 - RELEASE_TARBALLS=release-tarballs
134 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
135 - mv $SOURCETARBALL $RELEASE_TARBALLS
136 - mv $REGTESTTARBALL $RELEASE_TARBALLS
137 - cd $RELEASE_TARBALLS
138 # We rename the source and regressiontest directories
139 # to have names for them that don't change for different versions.
140 - tar -xf $SOURCETARBALL
141 - mv $SOURCENAME ../$RELEASE_SOURCE
142 - tar -xf $REGTESTTARBALL
143 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
144 - rm $SOURCETARBALL $REGTESTTARBALL
146 - echo $CMAKE_COMPILER_SCRIPT
147 - echo $CMAKE_EXTRA_OPTIONS
148 - echo $CMAKE_SIMD_OPTIONS
149 - echo $CMAKE_GPU_OPTIONS
150 - echo $CMAKE_MPI_OPTIONS
151 - echo $CMAKE_PRECISION_OPTIONS
152 - echo $CMAKE_BUILD_TYPE_OPTIONS
153 - echo $CMAKE_GMXAPI_OPTIONS
154 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
155 echo "Cleaning up build directory" ;
156 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
158 echo "Preparing new build directory" ;
159 mkdir $RELEASE_BUILD_DIR ;
161 - cd $RELEASE_BUILD_DIR
162 - cmake ../$RELEASE_SOURCE/
163 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
164 $CMAKE_COMPILER_SCRIPT
168 $CMAKE_PRECISION_OPTIONS
169 $CMAKE_BUILD_TYPE_OPTIONS
171 $CMAKE_GMXAPI_OPTIONS
173 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
174 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
175 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
176 2>&1 | tee cmakeLog.log
177 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
178 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
181 name: docs-artifacts-$CI_COMMIT_REF_SLUG
186 - $RELEASE_REGRESSIONTESTS
191 - .configure-extends-template
192 - .configure-docs-template
193 - .documentation-before-script-template
195 .configure-docs-release:
197 - .configure-extends-template
198 - .configure-docs-release-template
199 - .documentation-before-script-template
208 BUILD_DIR: build-docs
209 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
214 configure-docs-gmxapi:
217 - .configure-gmxapi-template
222 BUILD_DIR: build-docs-gmxapi
223 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
228 .build-docs-binary-template:
229 # Built by admin/dockerfiles/ci-docs-clang
230 # TODO this should be organized more like the current documentation.py script
231 image: gromacs/ci-docs-clang:master
234 - cmake --build . --target gmx -- -j8
237 name: docs-artifacts-$CI_COMMIT_REF_SLUG
243 .build-docs-webpage-template:
244 # Built by admin/dockerfiles/ci-docs-clang
245 # TODO this should be organized more like the current documentation.py script
246 image: gromacs/ci-docs-clang:master
248 KUBERNETES_CPU_LIMIT: 4
249 KUBERNETES_CPU_REQUEST: 2
250 KUBERNETES_MEMORY_LIMIT: 4Gi
253 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
254 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
255 - cmake --build . --target webpage -- -j4
256 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
257 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
258 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
259 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
260 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
261 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
264 name: docs-artifacts-$CI_COMMIT_REF_SLUG
269 - $BUILD_DIR/docs/html
270 - $BUILD_DIR/docs/manual/gromacs.log
271 - $BUILD_DIR/docs/manual/all-output.log
272 - $BUILD_DIR/docs/doxygen/doxygen-user.log
273 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
274 - $BUILD_DIR/docs/doxygen/doxygen-full.log
275 - $BUILD_DIR/docs/sphinx-html.log
279 - .build-extends-template
280 - .build-cache-template
281 - .build-docs-binary-template
282 - .documentation-before-script-template
286 - .binary-build-template
289 - .build-docs-webpage-template
290 - .documentation-before-script-template
299 - job: configure-docs
302 BUILD_DIR: build-docs
310 - .gmxapi-extra-installs
315 - job: configure-docs-gmxapi
318 BUILD_DIR: build-docs-gmxapi
324 # The manual build is built separately so that errors in converting
325 # Sphinx to LaTeX and compiling can always be found in the
326 # all-output.txt file, while avoiding many thousands of lines of spam
327 # from pdflatex for normal builds. This does reduce the available
328 # parallel utilization, and so increases the build time.
330 # TODO why are the doxygen and sphinx log files disappearing
331 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
334 - .build-docs-webpage
339 - job: run-check-source
342 BUILD_DIR: build-docs
349 - .build-docs-webpage
350 - .gmxapi-extra-installs
353 - job: build-docs-gmxapi
355 - job: run-check-source
358 BUILD_DIR: build-docs-gmxapi
365 - .build-docs-webpage
366 - .configure-gmxapi-template
367 stage: nightly-deploy
379 - job: webpage-gmxapi
382 BUILD_DIR: build-docs-gmxapi
384 - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
390 webpage-configure-release:
392 - .configure-docs-release
393 - .configure-gmxapi-template
403 - package-archive-release
404 - package-regressiontests-release
405 - prepare-release-version
407 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
410 webpage-binary-release:
413 - .gmxapi-extra-installs
416 - job: webpage-configure-release
419 BUILD_DIR: release-doc-builds
428 webpage-build-release:
430 - .build-docs-webpage
431 - .configure-gmxapi-template
433 - webpage-binary-release
434 - webpage-configure-release
435 stage: release-prepare-deploy
444 BUILD_DIR: release-doc-builds