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:2020
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"
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" ;
46 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
47 $CMAKE_COMPILER_SCRIPT
51 $CMAKE_PRECISION_OPTIONS
52 $CMAKE_BUILD_TYPE_OPTIONS
56 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
57 2>&1 | tee cmakeLog.log
58 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
59 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
62 name: docs-artifacts-$CI_COMMIT_REF_SLUG
68 .docs:configure:release:
71 - .gromacs:base:configure
72 - .before_script:default
73 - .rules:nightly-only-for-release
74 # TODO (#3480) this should be organized more like the current documentation.py script
75 image: gromacs/ci-docs-llvm:2020
76 stage: release-configure
79 KUBERNETES_CPU_LIMIT: 1
80 KUBERNETES_CPU_REQUEST: 1
81 KUBERNETES_MEMORY_LIMIT: 2Gi
82 CMAKE_COMPILER_SCRIPT: "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7"
83 CMAKE_EXTRA_OPTIONS: ""
84 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
85 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
86 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
87 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
88 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
89 RELEASE_BUILD_DIR: release-doc-builds
90 RELEASE_SOURCE: release-source-from-tarball
91 RELEASE_REGRESSIONTESTS: release-regressiontests-from-tarball
93 - if [[ $GROMACS_RELEASE == "true" ]] ; then
94 REL_OPTION="-DGMX_BUILD_TARBALL=ON" ;
96 REL_OPTION="-DGMX_BUILD_TARBALL=OFF" ;
98 - echo $CMAKE_COMPILER_SCRIPT
99 - echo $CMAKE_EXTRA_OPTIONS
100 - echo $CMAKE_SIMD_OPTIONS
101 - echo $CMAKE_GPU_OPTIONS
102 - echo $CMAKE_MPI_OPTIONS
103 - echo $CMAKE_PRECISION_OPTIONS
104 - echo $CMAKE_BUILD_TYPE_OPTIONS
105 - echo $CMAKE_GMXAPI_OPTIONS
107 - VERSION=`cat version.json |
108 python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
109 - if [[ $GROMACS_RELEASE != "true" ]] ; then
110 VERSION=$VERSION-dev ;
112 - REGTEST_COMPARE=`cat version.json |
113 python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
114 - SOURCENAME=gromacs-$VERSION
115 - SOURCETARBALL=$SOURCENAME.tar.gz
116 - REGTESTNAME=regressiontests-$VERSION
117 - REGTESTTARBALL=$REGTESTNAME.tar.gz
118 - SOURCE_MD5SUM=`md5sum $SOURCETARBALL | awk '{print $1}'`
119 - RELEASE_TARBALLS=release-tarballs
120 - rm -rf $RELEASE_TARBALLS $RELEASE_SOURCE $RELEASE_REGRESSIONTESTS && mkdir $RELEASE_TARBALLS
121 - mv $SOURCETARBALL $RELEASE_TARBALLS
122 - mv $REGTESTTARBALL $RELEASE_TARBALLS
123 - cd $RELEASE_TARBALLS
124 # We rename the source and regressiontest directories
125 # to have names for them that don't change for different versions.
126 - tar -xf $SOURCETARBALL
127 - mv $SOURCENAME ../$RELEASE_SOURCE
128 - tar -xf $REGTESTTARBALL
129 - mv $REGTESTNAME ../$RELEASE_REGRESSIONTESTS
130 - rm $SOURCETARBALL $REGTESTTARBALL
132 - echo $CMAKE_COMPILER_SCRIPT
133 - echo $CMAKE_EXTRA_OPTIONS
134 - echo $CMAKE_SIMD_OPTIONS
135 - echo $CMAKE_GPU_OPTIONS
136 - echo $CMAKE_MPI_OPTIONS
137 - echo $CMAKE_PRECISION_OPTIONS
138 - echo $CMAKE_BUILD_TYPE_OPTIONS
139 - echo $CMAKE_GMXAPI_OPTIONS
140 - if [[ -d $RELEASE_BUILD_DIR ]] ; then
141 echo "Cleaning up build directory" ;
142 rm -rf $RELEASE_BUILD_DIR && mkdir $RELEASE_BUILD_DIR ;
144 echo "Preparing new build directory" ;
145 mkdir $RELEASE_BUILD_DIR ;
147 - cd $RELEASE_BUILD_DIR
148 - cmake ../$RELEASE_SOURCE/
149 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
150 $CMAKE_COMPILER_SCRIPT
154 $CMAKE_PRECISION_OPTIONS
155 $CMAKE_BUILD_TYPE_OPTIONS
157 $CMAKE_GMXAPI_OPTIONS
159 "-DSOURCE_MD5SUM=$SOURCE_MD5SUM"
160 "-DREGRESSIONTEST_PATH=../$RELEASE_REGRESSIONTESTS"
161 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
162 2>&1 | tee cmakeLog.log
163 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
164 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
167 name: docs-artifacts-$CI_COMMIT_REF_SLUG
172 - $RELEASE_REGRESSIONTESTS
181 BUILD_DIR: build-docs
182 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
185 # TODO (#3480) this should be organized more like the current documentation.py script
186 image: gromacs/ci-docs-llvm:2020
189 - cmake --build . --target gmx -- -j8
192 name: docs-artifacts-$CI_COMMIT_REF_SLUG
201 - .gromacs:base:build
204 - .before_script:default
209 - job: docs:configure
211 BUILD_DIR: build-docs
213 # The manual build is built separately so that errors in converting
214 # Sphinx to LaTeX and compiling can always be found in the
215 # all-output.txt file, while avoiding many thousands of lines of spam
216 # from pdflatex for normal builds. This does reduce the available
217 # parallel utilization, and so increases the build time.
219 # TODO why are the doxygen and sphinx log files disappearing
220 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
224 - .gromacs:base:build
225 - .before_script:default
226 # TODO (#3480) this should be organized more like the current documentation.py script
227 image: gromacs/ci-docs-llvm:2020
230 KUBERNETES_CPU_LIMIT: 4
231 KUBERNETES_CPU_REQUEST: 2
232 KUBERNETES_MEMORY_LIMIT: 4Gi
235 - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
236 | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
237 - cmake --build . --target webpage -- -j4
238 - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
239 - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
240 - grep -i "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.log || true
241 - if [ -s pythonErrors.log ] ; then echo "Found Python Errors during build"; exit 1; fi
242 - if [ -s sphinxErrors.log ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxErrors.log; exit 1; fi
243 - if [ -s sphinxDiagnostics.log ] ; then echo "Found diagnostic warnings during Sphinx documentation build"; cat sphinxDiagnostics.log; exit 1; fi
246 name: docs-artifacts-$CI_COMMIT_REF_SLUG
251 - $BUILD_DIR/docs/html
252 - $BUILD_DIR/docs/manual/gromacs.log
253 - $BUILD_DIR/docs/manual/all-output.log
254 - $BUILD_DIR/docs/doxygen/doxygen-user.log
255 - $BUILD_DIR/docs/doxygen/doxygen-lib.log
256 - $BUILD_DIR/docs/doxygen/doxygen-full.log
257 - $BUILD_DIR/docs/sphinx-html.log
270 BUILD_DIR: build-docs
274 - .docs:configure:release
275 - .rules:nightly-only-for-release
279 - regressiontests:package
280 - prepare-release-version
282 CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
285 webpage:dependencies:
287 - .gromacs:base:build
291 - .before_script:default
292 - .rules:nightly-only-for-release
295 - job: webpage:configure
297 BUILD_DIR: release-doc-builds
299 webpage:build:release:
302 - .rules:nightly-only-for-release
304 - webpage:dependencies
306 stage: release-prepare-deploy
308 BUILD_DIR: release-doc-builds