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
27 KUBERNETES_CPU_LIMIT: 1
28 KUBERNETES_CPU_REQUEST: 1
29 KUBERNETES_MEMORY_LIMIT: 2Gi
30 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
31 CMAKE_EXTRA_OPTIONS: ""
32 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
33 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=OFF"
34 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
35 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
36 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
37 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
39 - if [[ ! -z $GROMACS_RELEASE && $GROMACS_RELEASE == "true" ]] ; then
40 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
42 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
44 - echo $CMAKE_COMPILER_SCRIPT
45 - echo $CMAKE_EXTRA_OPTIONS
46 - echo $CMAKE_SIMD_OPTIONS
47 - echo $CMAKE_GPU_OPTIONS
48 - echo $CMAKE_MPI_OPTIONS
49 - echo $CMAKE_PRECISION_OPTIONS
50 - echo $CMAKE_BUILD_TYPE_OPTIONS
51 - echo $CMAKE_GMXAPI_OPTIONS
53 - if [[ -d $BUILD_DIR ]] ; then
54 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
56 echo "Preparing new build directory" ;
61 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
62 $CMAKE_COMPILER_SCRIPT
66 $CMAKE_PRECISION_OPTIONS
67 $CMAKE_BUILD_TYPE_OPTIONS
71 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
72 2>&1 | tee cmakeLog.log
73 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
74 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
77 name: docs-artifacts-$CI_COMMIT_REF_SLUG
83 .configure-docs-release-template:
84 # Built by admin/dockerfiles/ci-docs-clang
85 # TODO this should be organized more like the current documentation.py script
86 image: gromacs/ci-docs-clang:master
87 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 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
100 RELEASE_BUILD_DIR: release-doc-builds
101 RELEASE_SOURCE: release-source-from-tarball
102 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
112 - if [[ $GROMACS_RELEASE == "true" ]] ; then
113 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
115 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
117 - echo $CMAKE_COMPILER_SCRIPT
118 - echo $CMAKE_EXTRA_OPTIONS
119 - echo $CMAKE_SIMD_OPTIONS
120 - echo $CMAKE_GPU_OPTIONS
121 - echo $CMAKE_MPI_OPTIONS
122 - echo $CMAKE_PRECISION_OPTIONS
123 - echo $CMAKE_BUILD_TYPE_OPTIONS
124 - echo $CMAKE_GMXAPI_OPTIONS
126 - VERSION=`cat version.json |
127 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
128 - if [[ $GROMACS_RELEASE != "true" ]] ; then
129 VERSION=$VERSION-dev ;
131 - REGTEST_COMPARE=`cat version.json |
132 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
133 - SOURCENAME=gromacs-$VERSION
134 - SOURCETARBALL=$SOURCENAME.tar.gz
135 - REGTESTNAME=regressiontests-$VERSION
136 - REGTESTTARBALL=$REGTESTNAME.tar.gz
137 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
138 - RELEASE_TARBALLS=release-tarballs
139 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
140 - mv $SOURCETARBALL $RELEASE_TARBALLS
141 - mv $REGTESTTARBALL $RELEASE_TARBALLS
142 - cd $RELEASE_TARBALLS
143 # We rename the source and regressiontest directories
144 # to have names for them that don't change for different versions.
145 - tar -xf $SOURCETARBALL
146 - mv $SOURCENAME ../$RELEASE_SOURCE
147 - tar -xf $REGTESTTARBALL
148 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
149 - rm $SOURCETARBALL $REGTESTTARBALL
151 - echo $CMAKE_COMPILER_SCRIPT
152 - echo $CMAKE_EXTRA_OPTIONS
153 - echo $CMAKE_SIMD_OPTIONS
154 - echo $CMAKE_GPU_OPTIONS
155 - echo $CMAKE_MPI_OPTIONS
156 - echo $CMAKE_PRECISION_OPTIONS
157 - echo $CMAKE_BUILD_TYPE_OPTIONS
158 - echo $CMAKE_GMXAPI_OPTIONS
159 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
160 echo "Cleaning up build directory" ;
161 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
163 echo "Preparing new build directory" ;
164 mkdir $RELEASE_BUILD_DIR ;
166 - cd $RELEASE_BUILD_DIR
167 - cmake ../$RELEASE_SOURCE/
168 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
169 $CMAKE_COMPILER_SCRIPT
173 $CMAKE_PRECISION_OPTIONS
174 $CMAKE_BUILD_TYPE_OPTIONS
176 $CMAKE_GMXAPI_OPTIONS
178 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
179 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
180 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
181 2>&1 | tee cmakeLog.log
182 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
183 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
186 name: docs-artifacts-$CI_COMMIT_REF_SLUG
191 - $RELEASE_REGRESSIONTESTS
196 - .gromacs:base:configure
197 - .configure-docs-template
198 - .documentation-before-script-template
200 .configure-docs-release:
202 - .gromacs:base:configure
203 - .configure-docs-release-template
204 - .documentation-before-script-template
214 BUILD_DIR: build-docs
215 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
220 configure-docs-gmxapi:
223 - .configure-gmxapi-template
228 BUILD_DIR: build-docs-gmxapi
229 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
234 .build-docs-binary-template:
235 # Built by admin/dockerfiles/ci-docs-clang
236 # TODO this should be organized more like the current documentation.py script
237 image: gromacs/ci-docs-clang:master
246 - cmake --build . --target gmx -- -j8
249 name: docs-artifacts-$CI_COMMIT_REF_SLUG
255 .build-docs-webpage-template:
256 # Built by admin/dockerfiles/ci-docs-clang
257 # TODO this should be organized more like the current documentation.py script
258 image: gromacs/ci-docs-clang:master
266 KUBERNETES_CPU_LIMIT: 4
267 KUBERNETES_CPU_REQUEST: 2
268 KUBERNETES_MEMORY_LIMIT: 4Gi
271 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
272 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
273 - cmake --build . --target webpage -- -j4
274 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
275 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
276 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
277 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
278 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
279 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
282 name: docs-artifacts-$CI_COMMIT_REF_SLUG
287 - $BUILD_DIR/docs/html
288 - $BUILD_DIR/docs/manual/gromacs.log
289 - $BUILD_DIR/docs/manual/all-output.log
290 - $BUILD_DIR/docs/doxygen/doxygen-user.log
291 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
292 - $BUILD_DIR/docs/doxygen/doxygen-full.log
293 - $BUILD_DIR/docs/sphinx-html.log
297 - .gromacs:base:build
301 - .build-docs-binary-template
302 - .documentation-before-script-template
306 - .gromacs:base:build
308 - .build-docs-webpage-template
309 - .documentation-before-script-template
318 - job: configure-docs
321 BUILD_DIR: build-docs
329 - .gmxapi-extra-installs
334 - job: configure-docs-gmxapi
337 BUILD_DIR: build-docs-gmxapi
343 # The manual build is built separately so that errors in converting
344 # Sphinx to LaTeX and compiling can always be found in the
345 # all-output.txt file, while avoiding many thousands of lines of spam
346 # from pdflatex for normal builds. This does reduce the available
347 # parallel utilization, and so increases the build time.
349 # TODO why are the doxygen and sphinx log files disappearing
350 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
353 - .build-docs-webpage
358 - job: run-check-source
361 BUILD_DIR: build-docs
368 - .build-docs-webpage
369 - .gmxapi-extra-installs
372 - job: build-docs-gmxapi
374 - job: run-check-source
377 BUILD_DIR: build-docs-gmxapi
384 - .build-docs-webpage
385 - .configure-gmxapi-template
386 stage: nightly-deploy
399 - job: webpage-gmxapi
402 BUILD_DIR: build-docs-gmxapi
404 - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
410 webpage-configure-release:
412 - .configure-docs-release
413 - .configure-gmxapi-template
423 - package-archive-release
424 - package-regressiontests-release
425 - prepare-release-version
427 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
430 webpage-binary-release:
433 - .gmxapi-extra-installs
436 - job: webpage-configure-release
439 BUILD_DIR: release-doc-builds
448 webpage-build-release:
450 - .build-docs-webpage
451 - .configure-gmxapi-template
453 - webpage-binary-release
454 - webpage-configure-release
455 stage: release-prepare-deploy
464 BUILD_DIR: release-doc-builds