1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
3 clang-tidy:configure-push:
5 - .gromacs:base:configure
8 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
11 COMPILER_MAJOR_VERSION: 9
12 BUILD_DIR: build-clang-tidy
13 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
15 clang-tidy:configure-schedule:
17 - .gromacs:base:configure
19 - .rules:nightly-not-for-release
20 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
23 COMPILER_MAJOR_VERSION: 9
24 BUILD_DIR: build-clang-tidy
25 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
32 - .rules:nightly-not-for-release
34 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
36 - job: clang-tidy:configure-schedule
38 BUILD_DIR: build-clang-tidy
46 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
49 - job: clang-tidy:configure-push
51 COMPILER_MAJOR_VERSION: 9
52 BUILD_DIR: build-clang-tidy
53 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
54 KUBERNETES_CPU_LIMIT: 4
55 KUBERNETES_CPU_REQUEST: 2
56 KUBERNETES_MEMORY_LIMIT: 4Gi
58 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
59 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
60 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
61 - if [[ "$REV" == "$HEAD_REV" ]] ; then
64 - echo "Revision used for branch point is $REV"
66 - RUN_CLANG_TIDY=run-clang-tidy-$COMPILER_MAJOR_VERSION bash admin/clang-tidy.sh check --parallel=$KUBERNETES_CPU_LIMIT --warnings=clang-tidy.log --rev=$REV -B=$BUILD_DIR
67 - grep -i "found code issues" clang-tidy.log | tee code-lint.txt || true
68 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
81 image: gromacs/ci-docs-llvm:master
84 COMPILER_MAJOR_VERSION: 7
85 KUBERNETES_CPU_LIMIT: 1
86 KUBERNETES_CPU_REQUEST: 1
87 KUBERNETES_MEMORY_LIMIT: 2Gi
88 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
90 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
91 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
92 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
93 - if [[ "$REV" == "$HEAD_REV" ]] ; then
96 - echo "Revision used for branch point is $REV"
98 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
99 - grep -i "needs formatting" clang-format.log | tee formatting.txt || true
100 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
113 image: gromacs/ci-docs-llvm:master
116 KUBERNETES_CPU_LIMIT: 1
117 KUBERNETES_CPU_REQUEST: 1
118 KUBERNETES_MEMORY_LIMIT: 2Gi
120 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
121 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
122 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
123 - if [[ "$REV" == "$HEAD_REV" ]] ; then
126 - echo "Revision used for branch point is $REV"
128 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
129 - grep -i "copyright year" copyright.log | tee years.log || true
130 - grep -i "copyright header" copyright.log | tee headers.log || true
131 - if [[ -s years.log || -s headers.log ]] ; then
132 echo "Copyright information needs updating" ;
146 - .before_script:default
155 KUBERNETES_CPU_LIMIT: 1
156 KUBERNETES_CPU_REQUEST: 1
157 KUBERNETES_MEMORY_LIMIT: 2Gi
158 BUILD_DIR: build-docs
161 - cmake --build . --target check-source
162 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
163 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
164 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
165 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
167 name: docs-artifacts-$CI_COMMIT_REF_SLUG
171 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
172 - $BUILD_DIR/docs/doxygen/check-source.log
177 - .rules:nightly-not-for-release
182 KUBERNETES_CPU_LIMIT: 1
183 KUBERNETES_CPU_REQUEST: 1
184 KUBERNETES_MEMORY_LIMIT: 2Gi
185 BUILD_DIR: build-docs
188 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
189 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
193 junit: $BUILD_DIR/linkchecker-out.xml