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
50 # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
51 - /root/venv/py3.7/bin/pip install pybind11
53 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
54 $CMAKE_COMPILER_SCRIPT
58 $CMAKE_PRECISION_OPTIONS
59 $CMAKE_BUILD_TYPE_OPTIONS
63 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
64 2>&1 | tee cmakeLog.log
65 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
66 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
69 name: docs-artifacts-$CI_COMMIT_REF_SLUG
75 .docs:configure:release:
78 - .gromacs:base:configure
79 - .before_script:default
80 - .rules:nightly-only-for-release
81 # TODO (#3480) this should be organized more like the current documentation.py script
82 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
83 stage: release-configure
86 KUBERNETES_CPU_LIMIT: 1
87 KUBERNETES_CPU_REQUEST: 1
88 KUBERNETES_MEMORY_REQUEST: 2Gi
89 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
90 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
91 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
92 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
93 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
94 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
95 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
96 RELEASE_BUILD_DIR: release-doc-builds
97 RELEASE_SOURCE: release-source-from-tarball
98 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
100 - if [[ $GROMACS_RELEASE == "true" ]] ; then
101 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
103 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
105 - echo $CMAKE_COMPILER_SCRIPT
106 - echo $CMAKE_EXTRA_OPTIONS
107 - echo $CMAKE_SIMD_OPTIONS
108 - echo $CMAKE_GPU_OPTIONS
109 - echo $CMAKE_MPI_OPTIONS
110 - echo $CMAKE_PRECISION_OPTIONS
111 - echo $CMAKE_BUILD_TYPE_OPTIONS
112 - echo $CMAKE_GMXAPI_OPTIONS
114 - VERSION=`cat version.json |
115 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
116 - if [[ $GROMACS_RELEASE != "true" ]] ; then
117 VERSION=$VERSION-dev ;
119 - REGTEST_COMPARE=`cat version.json |
120 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
121 - SOURCENAME=gromacs-$VERSION
122 - SOURCETARBALL=$SOURCENAME.tar.gz
123 - REGTESTNAME=regressiontests-$VERSION
124 - REGTESTTARBALL=$REGTESTNAME.tar.gz
125 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
126 - RELEASE_TARBALLS=release-tarballs
127 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
128 - mv $SOURCETARBALL $RELEASE_TARBALLS
129 - mv $REGTESTTARBALL $RELEASE_TARBALLS
130 - cd $RELEASE_TARBALLS
131 # We rename the source and regressiontest directories
132 # to have names for them that don't change for different versions.
133 - tar -xf $SOURCETARBALL
134 - mv $SOURCENAME ../$RELEASE_SOURCE
135 - tar -xf $REGTESTTARBALL
136 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
137 - rm $SOURCETARBALL $REGTESTTARBALL
139 - echo $CMAKE_COMPILER_SCRIPT
140 - echo $CMAKE_EXTRA_OPTIONS
141 - echo $CMAKE_SIMD_OPTIONS
142 - echo $CMAKE_GPU_OPTIONS
143 - echo $CMAKE_MPI_OPTIONS
144 - echo $CMAKE_PRECISION_OPTIONS
145 - echo $CMAKE_BUILD_TYPE_OPTIONS
146 - echo $CMAKE_GMXAPI_OPTIONS
147 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
148 echo "Cleaning up build directory" ;
149 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
151 echo "Preparing new build directory" ;
152 mkdir $RELEASE_BUILD_DIR ;
154 - cd $RELEASE_BUILD_DIR
155 - source /root/venv/py3.7/bin/activate
156 # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
157 - /root/venv/py3.7/bin/pip install pybind11
158 - cmake ../$RELEASE_SOURCE/
159 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
160 $CMAKE_COMPILER_SCRIPT
164 $CMAKE_PRECISION_OPTIONS
165 $CMAKE_BUILD_TYPE_OPTIONS
167 $CMAKE_GMXAPI_OPTIONS
169 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
170 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
171 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
172 2>&1 | tee cmakeLog.log
173 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
174 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
177 name: docs-artifacts-$CI_COMMIT_REF_SLUG
182 - $RELEASE_REGRESSIONTESTS
190 BUILD_DIR: build-docs
191 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
194 # TODO (#3480) this should be organized more like the current documentation.py script
195 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
198 # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
199 - /root/venv/py3.7/bin/pip install pybind11
200 - cmake --build . --target gmx -- -j8
203 name: docs-artifacts-$CI_COMMIT_REF_SLUG
212 - .gromacs:base:build
215 - .before_script:default
219 - job: docs:configure
221 BUILD_DIR: build-docs
223 # The manual build is built separately so that errors in converting
224 # Sphinx to LaTeX and compiling can always be found in the
225 # all-output.txt file, while avoiding many thousands of lines of spam
226 # from pdflatex for normal builds. This does reduce the available
227 # parallel utilization, and so increases the build time.
229 # TODO why are the doxygen and sphinx log files disappearing
230 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
234 - .gromacs:base:build
235 - .before_script:default
236 # TODO (#3480) this should be organized more like the current documentation.py script
237 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
240 KUBERNETES_CPU_LIMIT: 4
241 KUBERNETES_CPU_REQUEST: 2
242 KUBERNETES_MEMORY_REQUEST: 4Gi
245 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
246 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
247 # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
248 - /root/venv/py3.7/bin/pip install pybind11
249 - cmake --build . --target webpage -- -j4
250 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
251 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
252 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
253 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
254 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
255 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
258 name: docs-artifacts-$CI_COMMIT_REF_SLUG
263 - $BUILD_DIR/docs/html
264 - $BUILD_DIR/docs/manual/gromacs.log
265 - $BUILD_DIR/docs/manual/all-output.log
266 - $BUILD_DIR/docs/doxygen/doxygen-user.log
267 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
268 - $BUILD_DIR/docs/doxygen/doxygen-full.log
269 - $BUILD_DIR/docs/sphinx-html.log
281 BUILD_DIR: build-docs
285 - .docs:configure:release
286 - .rules:nightly-only-for-release
292 - regressiontests:package
293 - prepare-release-version
295 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_USE_SIMD_KERNELS=off
298 webpage:dependencies:
300 - .gromacs:base:build
304 - .before_script:default
305 - .rules:nightly-only-for-release
310 - job: webpage:configure
312 BUILD_DIR: release-doc-builds
314 webpage:build:release:
317 - .rules:nightly-only-for-release
318 stage: release-prepare-deploy
322 - webpage:dependencies
325 BUILD_DIR: release-doc-builds