1 # Build documentation and web page.
2 .documentation-before-script-template:
5 - time apt-get -qq update
6 - time apt-get -qqy --no-install-suggests --no-install-recommends install
9 - export CCACHE_BASEDIR=${PWD}
10 - export CCACHE_DIR=${PWD}/ccache
12 .configure-docs-template:
13 # Built by admin/dockerfiles/ci-docs-clang
14 # TODO this should be organized more like the current documentation.py script
15 image: gromacs/ci-docs-clang:master
16 stage: configure-build
26 KUBERNETES_CPU_LIMIT: 1
27 KUBERNETES_CPU_REQUEST: 1
28 KUBERNETES_MEMORY_LIMIT: 2Gi
29 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
30 CMAKE_EXTRA_OPTIONS: ""
31 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
32 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=OFF"
33 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
34 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
35 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
37 - if [[ ! -z $GROMACS_RELEASE && $GROMACS_RELEASE == "true" ]] ; then
38 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
40 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
42 - echo $CMAKE_COMPILER_SCRIPT
43 - echo $CMAKE_EXTRA_OPTIONS
44 - echo $CMAKE_SIMD_OPTIONS
45 - echo $CMAKE_GPU_OPTIONS
46 - echo $CMAKE_MPI_OPTIONS
47 - echo $CMAKE_PRECISION_OPTIONS
48 - echo $CMAKE_BUILD_TYPE_OPTIONS
49 - echo $CMAKE_GMXAPI_OPTIONS
51 - if [[ -d $BUILD_DIR ]] ; then
52 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
54 echo "Preparing new build directory" ;
59 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
60 $CMAKE_COMPILER_SCRIPT
64 $CMAKE_PRECISION_OPTIONS
65 $CMAKE_BUILD_TYPE_OPTIONS
69 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
70 2>&1 | tee cmakeLog.log
71 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
72 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
75 name: docs-artifacts-$CI_COMMIT_REF_SLUG
81 .configure-docs-release-template:
82 # Built by admin/dockerfiles/ci-docs-clang
83 # TODO this should be organized more like the current documentation.py script
84 image: gromacs/ci-docs-clang:master
85 stage: release-configure
89 KUBERNETES_CPU_LIMIT: 1
90 KUBERNETES_CPU_REQUEST: 1
91 KUBERNETES_MEMORY_LIMIT: 2Gi
92 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
93 CMAKE_EXTRA_OPTIONS: ""
94 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
95 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
96 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
97 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
98 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
99 RELEASE_BUILD_DIR: release-doc-builds
100 RELEASE_SOURCE: release-source-from-tarball
101 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
111 - if [[ $GROMACS_RELEASE == "true" ]] ; then
112 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
114 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
116 - echo $CMAKE_COMPILER_SCRIPT
117 - echo $CMAKE_EXTRA_OPTIONS
118 - echo $CMAKE_SIMD_OPTIONS
119 - echo $CMAKE_GPU_OPTIONS
120 - echo $CMAKE_MPI_OPTIONS
121 - echo $CMAKE_PRECISION_OPTIONS
122 - echo $CMAKE_BUILD_TYPE_OPTIONS
123 - echo $CMAKE_GMXAPI_OPTIONS
125 - VERSION=`cat version.json |
126 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
127 - if [[ $GROMACS_RELEASE != "true" ]] ; then
128 VERSION=$VERSION-dev ;
130 - REGTEST_COMPARE=`cat version.json |
131 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
132 - SOURCENAME=gromacs-$VERSION
133 - SOURCETARBALL=$SOURCENAME.tar.gz
134 - REGTESTNAME=regressiontests-$VERSION
135 - REGTESTTARBALL=$REGTESTNAME.tar.gz
136 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
137 - RELEASE_TARBALLS=release-tarballs
138 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
139 - mv $SOURCETARBALL $RELEASE_TARBALLS
140 - mv $REGTESTTARBALL $RELEASE_TARBALLS
141 - cd $RELEASE_TARBALLS
142 # We rename the source and regressiontest directories
143 # to have names for them that don't change for different versions.
144 - tar -xf $SOURCETARBALL
145 - mv $SOURCENAME ../$RELEASE_SOURCE
146 - tar -xf $REGTESTTARBALL
147 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
148 - rm $SOURCETARBALL $REGTESTTARBALL
150 - echo $CMAKE_COMPILER_SCRIPT
151 - echo $CMAKE_EXTRA_OPTIONS
152 - echo $CMAKE_SIMD_OPTIONS
153 - echo $CMAKE_GPU_OPTIONS
154 - echo $CMAKE_MPI_OPTIONS
155 - echo $CMAKE_PRECISION_OPTIONS
156 - echo $CMAKE_BUILD_TYPE_OPTIONS
157 - echo $CMAKE_GMXAPI_OPTIONS
158 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
159 echo "Cleaning up build directory" ;
160 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
162 echo "Preparing new build directory" ;
163 mkdir $RELEASE_BUILD_DIR ;
165 - cd $RELEASE_BUILD_DIR
166 - cmake ../$RELEASE_SOURCE/
167 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
168 $CMAKE_COMPILER_SCRIPT
172 $CMAKE_PRECISION_OPTIONS
173 $CMAKE_BUILD_TYPE_OPTIONS
175 $CMAKE_GMXAPI_OPTIONS
177 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
178 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
179 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
180 2>&1 | tee cmakeLog.log
181 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
182 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
185 name: docs-artifacts-$CI_COMMIT_REF_SLUG
190 - $RELEASE_REGRESSIONTESTS
195 - .gromacs:base:configure
196 - .configure-docs-template
197 - .documentation-before-script-template
199 .configure-docs-release:
201 - .gromacs:base:configure
202 - .configure-docs-release-template
203 - .documentation-before-script-template
213 BUILD_DIR: build-docs
214 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
219 .build-docs-binary-template:
220 # Built by admin/dockerfiles/ci-docs-clang
221 # TODO this should be organized more like the current documentation.py script
222 image: gromacs/ci-docs-clang:master
231 - cmake --build . --target gmx -- -j8
234 name: docs-artifacts-$CI_COMMIT_REF_SLUG
240 .build-docs-webpage-template:
241 # Built by admin/dockerfiles/ci-docs-clang
242 # TODO this should be organized more like the current documentation.py script
243 image: gromacs/ci-docs-clang:master
251 KUBERNETES_CPU_LIMIT: 4
252 KUBERNETES_CPU_REQUEST: 2
253 KUBERNETES_MEMORY_LIMIT: 4Gi
256 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
257 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
258 - cmake --build . --target webpage -- -j4
259 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
260 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
261 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
262 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
263 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
264 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
267 name: docs-artifacts-$CI_COMMIT_REF_SLUG
272 - $BUILD_DIR/docs/html
273 - $BUILD_DIR/docs/manual/gromacs.log
274 - $BUILD_DIR/docs/manual/all-output.log
275 - $BUILD_DIR/docs/doxygen/doxygen-user.log
276 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
277 - $BUILD_DIR/docs/doxygen/doxygen-full.log
278 - $BUILD_DIR/docs/sphinx-html.log
282 - .gromacs:base:build
286 - .build-docs-binary-template
287 - .documentation-before-script-template
291 - .gromacs:base:build
293 - .build-docs-webpage-template
294 - .documentation-before-script-template
303 - job: configure-docs
306 BUILD_DIR: build-docs
311 # The manual build is built separately so that errors in converting
312 # Sphinx to LaTeX and compiling can always be found in the
313 # all-output.txt file, while avoiding many thousands of lines of spam
314 # from pdflatex for normal builds. This does reduce the available
315 # parallel utilization, and so increases the build time.
317 # TODO why are the doxygen and sphinx log files disappearing
318 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
321 - .build-docs-webpage
326 - job: run-check-source
329 BUILD_DIR: build-docs
336 - .build-docs-webpage
337 stage: nightly-deploy
353 BUILD_DIR: build-docs
355 - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
361 webpage-configure-release:
363 - .configure-docs-release
373 - package-archive-release
374 - package-regressiontests-release
375 - prepare-release-version
377 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
380 webpage-binary-release:
385 - job: webpage-configure-release
388 BUILD_DIR: release-doc-builds
397 webpage-build-release:
399 - .build-docs-webpage
401 - webpage-binary-release
402 - webpage-configure-release
403 stage: release-prepare-deploy
412 BUILD_DIR: release-doc-builds