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=`sed -n -e '/GMX_VERSION_STRING\b/ s/.*"\(.*\)")/\1/p' VersionInfo-partial.cmake.cmakein`
113 - if [[ $GROMACS_RELEASE != "true" ]] ; then
114 VERSION=$VERSION-dev ;
116 - REGTEST_COMPARE=`sed -n -e '/REGRESSIONTEST_MD5SUM/ s/.*"\(.*\)")/\1/p' VersionInfo-partial.cmake.cmakein`
117 - SOURCENAME=gromacs-$VERSION
118 - SOURCETARBALL=$SOURCENAME.tar.gz
119 - REGTESTNAME=regressiontests-$VERSION
120 - REGTESTTARBALL=$REGTESTNAME.tar.gz
121 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
122 - RELEASE_TARBALLS=release-tarballs
123 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
124 - mv $SOURCETARBALL $RELEASE_TARBALLS
125 - mv $REGTESTTARBALL $RELEASE_TARBALLS
126 - cd $RELEASE_TARBALLS
127 # We rename the source and regressiontest directories
128 # to have names for them that don't change for different versions.
129 - tar -xf $SOURCETARBALL
130 - mv $SOURCENAME ../$RELEASE_SOURCE
131 - tar -xf $REGTESTTARBALL
132 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
133 - rm $SOURCETARBALL $REGTESTTARBALL
135 - echo $CMAKE_COMPILER_SCRIPT
136 - echo $CMAKE_EXTRA_OPTIONS
137 - echo $CMAKE_SIMD_OPTIONS
138 - echo $CMAKE_GPU_OPTIONS
139 - echo $CMAKE_MPI_OPTIONS
140 - echo $CMAKE_PRECISION_OPTIONS
141 - echo $CMAKE_BUILD_TYPE_OPTIONS
142 - echo $CMAKE_GMXAPI_OPTIONS
143 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
144 echo "Cleaning up build directory" ;
145 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
147 echo "Preparing new build directory" ;
148 mkdir $RELEASE_BUILD_DIR ;
150 - cd $RELEASE_BUILD_DIR
151 - source /root/venv/py3.7/bin/activate
152 - cmake ../$RELEASE_SOURCE/
153 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
154 $CMAKE_COMPILER_SCRIPT
158 $CMAKE_PRECISION_OPTIONS
159 $CMAKE_BUILD_TYPE_OPTIONS
161 $CMAKE_GMXAPI_OPTIONS
163 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
164 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
165 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
166 2>&1 | tee cmakeLog.log
167 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
168 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
171 name: docs-artifacts-$CI_COMMIT_REF_SLUG
176 - $RELEASE_REGRESSIONTESTS
184 BUILD_DIR: build-docs
185 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
188 # TODO (#3480) this should be organized more like the current documentation.py script
189 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
192 - cmake --build . --target gmx -- -j8
195 name: docs-artifacts-$CI_COMMIT_REF_SLUG
204 - .gromacs:base:build
207 - .before_script:default
211 - job: docs:configure
213 BUILD_DIR: build-docs
215 # The manual build is built separately so that errors in converting
216 # Sphinx to LaTeX and compiling can always be found in the
217 # all-output.txt file, while avoiding many thousands of lines of spam
218 # from pdflatex for normal builds. This does reduce the available
219 # parallel utilization, and so increases the build time.
221 # TODO why are the doxygen and sphinx log files disappearing
222 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
226 - .gromacs:base:build
227 - .before_script:default
228 # TODO (#3480) this should be organized more like the current documentation.py script
229 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
232 KUBERNETES_CPU_LIMIT: 4
233 KUBERNETES_CPU_REQUEST: 2
234 KUBERNETES_MEMORY_REQUEST: 4Gi
237 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
238 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
239 - cmake --build . --target webpage -- -j4
240 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
241 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
242 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
243 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
244 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
245 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
248 name: docs-artifacts-$CI_COMMIT_REF_SLUG
253 - $BUILD_DIR/docs/html
254 - $BUILD_DIR/docs/manual/gromacs.log
255 - $BUILD_DIR/docs/manual/all-output.log
256 - $BUILD_DIR/docs/doxygen/doxygen-user.log
257 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
258 - $BUILD_DIR/docs/doxygen/doxygen-full.log
259 - $BUILD_DIR/docs/sphinx-html.log
271 BUILD_DIR: build-docs
275 - .docs:configure:release
276 - .rules:nightly-only-for-release
282 - regressiontests:package
283 - prepare-release-version
285 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
288 webpage:dependencies:
290 - .gromacs:base:build
294 - .before_script:default
295 - .rules:nightly-only-for-release
300 - job: webpage:configure
302 BUILD_DIR: release-doc-builds
304 webpage:build:release:
307 - .rules:nightly-only-for-release
308 stage: release-prepare-deploy
312 - webpage:dependencies
315 BUILD_DIR: release-doc-builds