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: gromacs/ci-docs-llvm:master
10 stage: configure-build
13 KUBERNETES_CPU_LIMIT: 1
14 KUBERNETES_CPU_REQUEST: 1
15 KUBERNETES_MEMORY_LIMIT: 2Gi
16 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
17 CMAKE_EXTRA_OPTIONS: ""
18 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
19 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=OFF"
20 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
21 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
22 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
23 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
25 - if [[ ! -z $GROMACS_RELEASE && $GROMACS_RELEASE == "true" ]] ; then
26 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
28 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
30 - echo $CMAKE_COMPILER_SCRIPT
31 - echo $CMAKE_EXTRA_OPTIONS
32 - echo $CMAKE_SIMD_OPTIONS
33 - echo $CMAKE_GPU_OPTIONS
34 - echo $CMAKE_MPI_OPTIONS
35 - echo $CMAKE_PRECISION_OPTIONS
36 - echo $CMAKE_BUILD_TYPE_OPTIONS
37 - echo $CMAKE_GMXAPI_OPTIONS
39 - if [[ -d $BUILD_DIR ]] ; then
40 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
42 echo "Preparing new build directory" ;
47 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
48 $CMAKE_COMPILER_SCRIPT
52 $CMAKE_PRECISION_OPTIONS
53 $CMAKE_BUILD_TYPE_OPTIONS
57 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
58 2>&1 | tee cmakeLog.log
59 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
60 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
63 name: docs-artifacts-$CI_COMMIT_REF_SLUG
69 .docs:configure:release:
72 - .gromacs:base:configure
73 - .before_script:default
74 - .rules:nightly-only-for-release
75 # TODO (#3480) this should be organized more like the current documentation.py script
76 image: gromacs/ci-docs-llvm:master
77 stage: release-configure
80 KUBERNETES_CPU_LIMIT: 1
81 KUBERNETES_CPU_REQUEST: 1
82 KUBERNETES_MEMORY_LIMIT: 2Gi
83 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
84 CMAKE_EXTRA_OPTIONS: ""
85 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
86 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
87 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
88 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
89 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
90 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
91 RELEASE_BUILD_DIR: release-doc-builds
92 RELEASE_SOURCE: release-source-from-tarball
93 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
95 - if [[ $GROMACS_RELEASE == "true" ]] ; then
96 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
98 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
100 - echo $CMAKE_COMPILER_SCRIPT
101 - echo $CMAKE_EXTRA_OPTIONS
102 - echo $CMAKE_SIMD_OPTIONS
103 - echo $CMAKE_GPU_OPTIONS
104 - echo $CMAKE_MPI_OPTIONS
105 - echo $CMAKE_PRECISION_OPTIONS
106 - echo $CMAKE_BUILD_TYPE_OPTIONS
107 - echo $CMAKE_GMXAPI_OPTIONS
109 - VERSION=`cat version.json |
110 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
111 - if [[ $GROMACS_RELEASE != "true" ]] ; then
112 VERSION=$VERSION-dev ;
114 - REGTEST_COMPARE=`cat version.json |
115 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
116 - SOURCENAME=gromacs-$VERSION
117 - SOURCETARBALL=$SOURCENAME.tar.gz
118 - REGTESTNAME=regressiontests-$VERSION
119 - REGTESTTARBALL=$REGTESTNAME.tar.gz
120 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
121 - RELEASE_TARBALLS=release-tarballs
122 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
123 - mv $SOURCETARBALL $RELEASE_TARBALLS
124 - mv $REGTESTTARBALL $RELEASE_TARBALLS
125 - cd $RELEASE_TARBALLS
126 # We rename the source and regressiontest directories
127 # to have names for them that don't change for different versions.
128 - tar -xf $SOURCETARBALL
129 - mv $SOURCENAME ../$RELEASE_SOURCE
130 - tar -xf $REGTESTTARBALL
131 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
132 - rm $SOURCETARBALL $REGTESTTARBALL
134 - echo $CMAKE_COMPILER_SCRIPT
135 - echo $CMAKE_EXTRA_OPTIONS
136 - echo $CMAKE_SIMD_OPTIONS
137 - echo $CMAKE_GPU_OPTIONS
138 - echo $CMAKE_MPI_OPTIONS
139 - echo $CMAKE_PRECISION_OPTIONS
140 - echo $CMAKE_BUILD_TYPE_OPTIONS
141 - echo $CMAKE_GMXAPI_OPTIONS
142 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
143 echo "Cleaning up build directory" ;
144 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
146 echo "Preparing new build directory" ;
147 mkdir $RELEASE_BUILD_DIR ;
149 - cd $RELEASE_BUILD_DIR
150 - cmake ../$RELEASE_SOURCE/
151 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
152 $CMAKE_COMPILER_SCRIPT
156 $CMAKE_PRECISION_OPTIONS
157 $CMAKE_BUILD_TYPE_OPTIONS
159 $CMAKE_GMXAPI_OPTIONS
161 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
162 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
163 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
164 2>&1 | tee cmakeLog.log
165 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
166 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
169 name: docs-artifacts-$CI_COMMIT_REF_SLUG
174 - $RELEASE_REGRESSIONTESTS
183 BUILD_DIR: build-docs
184 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
187 # TODO (#3480) this should be organized more like the current documentation.py script
188 image: gromacs/ci-docs-llvm:master
191 - cmake --build . --target gmx -- -j8
194 name: docs-artifacts-$CI_COMMIT_REF_SLUG
203 - .gromacs:base:build
206 - .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: gromacs/ci-docs-llvm:master
232 KUBERNETES_CPU_LIMIT: 4
233 KUBERNETES_CPU_REQUEST: 2
234 KUBERNETES_MEMORY_LIMIT: 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
272 BUILD_DIR: build-docs
276 - .docs:configure:release
277 - .rules:nightly-only-for-release
281 - regressiontests:package
282 - prepare-release-version
284 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
287 webpage:dependencies:
289 - .gromacs:base:build
293 - .before_script:default
294 - .rules:nightly-only-for-release
297 - job: webpage:configure
299 BUILD_DIR: release-doc-builds
301 webpage:build:release:
304 - .rules:nightly-only-for-release
306 - webpage:dependencies
308 stage: release-prepare-deploy
310 BUILD_DIR: release-doc-builds