1 # Build documentation and web page.
6 - .gromacs:base:configure
7 - .before_script:default
8 # TODO (#3480) this should be organized more like the current documentation.py script
9 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
10 stage: configure-build
13 KUBERNETES_CPU_LIMIT: 1
14 KUBERNETES_CPU_REQUEST: 1
15 KUBERNETES_MEMORY_REQUEST: 2Gi
16 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
17 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
18 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=OFF"
19 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
20 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
21 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
22 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
24 - if [[ ! -z $GROMACS_RELEASE && $GROMACS_RELEASE == "true" ]] ; then
25 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
27 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
29 - echo $CMAKE_COMPILER_SCRIPT
30 - echo $CMAKE_EXTRA_OPTIONS
31 - echo $CMAKE_SIMD_OPTIONS
32 - echo $CMAKE_GPU_OPTIONS
33 - echo $CMAKE_MPI_OPTIONS
34 - echo $CMAKE_PRECISION_OPTIONS
35 - echo $CMAKE_BUILD_TYPE_OPTIONS
36 - echo $CMAKE_GMXAPI_OPTIONS
38 - if [[ -d $BUILD_DIR ]] ; then
39 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
41 echo "Preparing new build directory" ;
45 # Running CMake with the venv activated should not be strictly necessary,
46 # but helps to find and cache self-consistent Python and Sphinx details
47 # without additional hinting. Once CMakeCache.txt exists, the later stages
48 # should work fine without reactivating the venv.
49 - source /root/venv/py3.7/bin/activate
51 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
52 $CMAKE_COMPILER_SCRIPT
56 $CMAKE_PRECISION_OPTIONS
57 $CMAKE_BUILD_TYPE_OPTIONS
61 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
62 2>&1 | tee cmakeLog.log
63 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
64 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
67 name: docs-artifacts-$CI_COMMIT_REF_SLUG
73 .docs:configure:release:
76 - .gromacs:base:configure
77 - .before_script:default
78 - .rules:nightly-only-for-release
79 # TODO (#3480) this should be organized more like the current documentation.py script
80 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
81 stage: release-configure
84 KUBERNETES_CPU_LIMIT: 1
85 KUBERNETES_CPU_REQUEST: 1
86 KUBERNETES_MEMORY_REQUEST: 2Gi
87 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
88 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
89 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
90 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
91 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
92 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
93 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
94 RELEASE_BUILD_DIR: release-doc-builds
95 RELEASE_SOURCE: release-source-from-tarball
96 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
98 - if [[ $GROMACS_RELEASE == "true" ]] ; then
99 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
101 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
103 - echo $CMAKE_COMPILER_SCRIPT
104 - echo $CMAKE_EXTRA_OPTIONS
105 - echo $CMAKE_SIMD_OPTIONS
106 - echo $CMAKE_GPU_OPTIONS
107 - echo $CMAKE_MPI_OPTIONS
108 - echo $CMAKE_PRECISION_OPTIONS
109 - echo $CMAKE_BUILD_TYPE_OPTIONS
110 - echo $CMAKE_GMXAPI_OPTIONS
112 - VERSION=`cat version.json |
113 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
114 - if [[ $GROMACS_RELEASE != "true" ]] ; then
115 VERSION=$VERSION-dev ;
117 - REGTEST_COMPARE=`cat version.json |
118 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
119 - SOURCENAME=gromacs-$VERSION
120 - SOURCETARBALL=$SOURCENAME.tar.gz
121 - REGTESTNAME=regressiontests-$VERSION
122 - REGTESTTARBALL=$REGTESTNAME.tar.gz
123 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
124 - RELEASE_TARBALLS=release-tarballs
125 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
126 - mv $SOURCETARBALL $RELEASE_TARBALLS
127 - mv $REGTESTTARBALL $RELEASE_TARBALLS
128 - cd $RELEASE_TARBALLS
129 # We rename the source and regressiontest directories
130 # to have names for them that don't change for different versions.
131 - tar -xf $SOURCETARBALL
132 - mv $SOURCENAME ../$RELEASE_SOURCE
133 - tar -xf $REGTESTTARBALL
134 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
135 - rm $SOURCETARBALL $REGTESTTARBALL
137 - echo $CMAKE_COMPILER_SCRIPT
138 - echo $CMAKE_EXTRA_OPTIONS
139 - echo $CMAKE_SIMD_OPTIONS
140 - echo $CMAKE_GPU_OPTIONS
141 - echo $CMAKE_MPI_OPTIONS
142 - echo $CMAKE_PRECISION_OPTIONS
143 - echo $CMAKE_BUILD_TYPE_OPTIONS
144 - echo $CMAKE_GMXAPI_OPTIONS
145 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
146 echo "Cleaning up build directory" ;
147 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
149 echo "Preparing new build directory" ;
150 mkdir $RELEASE_BUILD_DIR ;
152 - cd $RELEASE_BUILD_DIR
153 - source /root/venv/py3.7/bin/activate
154 - cmake ../$RELEASE_SOURCE/
155 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
156 $CMAKE_COMPILER_SCRIPT
160 $CMAKE_PRECISION_OPTIONS
161 $CMAKE_BUILD_TYPE_OPTIONS
163 $CMAKE_GMXAPI_OPTIONS
165 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
166 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
167 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
168 2>&1 | tee cmakeLog.log
169 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
170 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
173 name: docs-artifacts-$CI_COMMIT_REF_SLUG
178 - $RELEASE_REGRESSIONTESTS
186 BUILD_DIR: build-docs
187 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
190 # TODO (#3480) this should be organized more like the current documentation.py script
191 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
194 - cmake --build . --target gmx -- -j8
197 name: docs-artifacts-$CI_COMMIT_REF_SLUG
206 - .gromacs:base:build
209 - .before_script:default
213 - job: docs:configure
215 BUILD_DIR: build-docs
217 # The manual build is built separately so that errors in converting
218 # Sphinx to LaTeX and compiling can always be found in the
219 # all-output.txt file, while avoiding many thousands of lines of spam
220 # from pdflatex for normal builds. This does reduce the available
221 # parallel utilization, and so increases the build time.
223 # TODO why are the doxygen and sphinx log files disappearing
224 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
228 - .gromacs:base:build
229 - .before_script:default
230 # TODO (#3480) this should be organized more like the current documentation.py script
231 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
234 KUBERNETES_CPU_LIMIT: 4
235 KUBERNETES_CPU_REQUEST: 2
236 KUBERNETES_MEMORY_REQUEST: 4Gi
239 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
240 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
241 - cmake --build . --target webpage -- -j4
242 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
243 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
244 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
245 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
246 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
247 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
250 name: docs-artifacts-$CI_COMMIT_REF_SLUG
255 - $BUILD_DIR/docs/html
256 - $BUILD_DIR/docs/manual/gromacs.log
257 - $BUILD_DIR/docs/manual/all-output.log
258 - $BUILD_DIR/docs/doxygen/doxygen-user.log
259 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
260 - $BUILD_DIR/docs/doxygen/doxygen-full.log
261 - $BUILD_DIR/docs/sphinx-html.log
273 BUILD_DIR: build-docs
277 - .docs:configure:release
278 - .rules:nightly-only-for-release
284 - regressiontests:package
285 - prepare-release-version
287 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
290 webpage:dependencies:
292 - .gromacs:base:build
296 - .before_script:default
297 - .rules:nightly-only-for-release
302 - job: webpage:configure
304 BUILD_DIR: release-doc-builds
306 webpage:build:release:
309 - .rules:nightly-only-for-release
310 stage: release-prepare-deploy
314 - webpage:dependencies
317 BUILD_DIR: release-doc-builds