1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
3 clang-tidy:configure-push:
5 - .gromacs:base:configure
8 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
10 CMAKE: /usr/local/cmake-3.16.3/bin/cmake
11 COMPILER_MAJOR_VERSION: 11
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: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
22 CMAKE: /usr/local/cmake-3.16.3/bin/cmake
23 COMPILER_MAJOR_VERSION: 11
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
27 clang-tidy:configure-schedule-cuda:
29 - .gromacs:base:configure
32 - .rules:nightly-not-for-release
33 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
36 COMPILER_MAJOR_VERSION: 11
37 BUILD_DIR: build-clang-tidy
38 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DGMX_CLANG_CUDA=ON
45 - .rules:nightly-not-for-release
47 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
49 - job: clang-tidy:configure-schedule
51 CMAKE: /usr/local/cmake-3.16.3/bin/cmake
52 BUILD_DIR: build-clang-tidy
54 clang-tidy:build-cuda:
59 - .rules:nightly-not-for-release
61 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
63 - job: clang-tidy:configure-schedule-cuda
66 BUILD_DIR: build-clang-tidy
74 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
76 - job: clang-tidy:configure-push
78 CMAKE: /usr/local/cmake-3.16.3/bin/cmake
79 COMPILER_MAJOR_VERSION: 11
80 BUILD_DIR: build-clang-tidy
81 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
82 KUBERNETES_CPU_LIMIT: 4
83 KUBERNETES_CPU_REQUEST: 2
84 KUBERNETES_MEMORY_REQUEST: 4Gi
86 # Make sure that a Python interpreter can be found for `/bin/env python`
87 - test -x /usr/bin/python || update-alternatives --install /usr/bin/python python /usr/bin/python3 1
88 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
89 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
90 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
91 - if [[ "$REV" == "$HEAD_REV" ]] ; then
94 - echo "Revision used for branch point is $REV"
96 - 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
97 - grep -i "found code issues|warnings" clang-tidy.log | tee code-lint.txt || true
98 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
111 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
113 COMPILER_MAJOR_VERSION: 11
114 KUBERNETES_CPU_LIMIT: 1
115 KUBERNETES_CPU_REQUEST: 1
116 KUBERNETES_MEMORY_REQUEST: 2Gi
117 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
119 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
120 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
121 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
122 - if [[ "$REV" == "$HEAD_REV" ]] ; then
125 - echo "Revision used for branch point is $REV"
127 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
128 - grep -i "needs formatting" clang-format.log | tee formatting.txt || true
129 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
142 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-11-cuda-11.4.1
144 KUBERNETES_CPU_LIMIT: 1
145 KUBERNETES_CPU_REQUEST: 1
146 KUBERNETES_MEMORY_REQUEST: 2Gi
148 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
149 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
150 - if [[ "$REV" == "$HEAD_REV" ]] ; then
153 - echo "Revision used for branch point is $REV"
155 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
156 - grep -i "copyright year" copyright.log | tee years.log || true
157 - grep -i "copyright header" copyright.log | tee headers.log || true
158 - if [[ -s years.log || -s headers.log ]] ; then
159 echo "Copyright information needs updating" ;
173 - .before_script:default
181 KUBERNETES_CPU_LIMIT: 1
182 KUBERNETES_CPU_REQUEST: 1
183 KUBERNETES_MEMORY_REQUEST: 2Gi
184 BUILD_DIR: build-docs
186 - CMAKE=${CMAKE:-$(which cmake)}
190 - $CMAKE --build . --target check-source
191 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
192 - awk '/warning:.*includes/,/unnecessarily|^$/' docs/doxygen/check-source.log | tee -a doxygenError.txt || true
193 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
194 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
195 - grep -i "unused cycle suppression" docs/doxygen/check-source.log | tee -a doxygenError.txt || true
196 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
198 name: docs-artifacts-$CI_COMMIT_REF_SLUG
202 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
203 - $BUILD_DIR/docs/doxygen/check-source.log
208 - .rules:nightly-not-for-release
213 KUBERNETES_CPU_LIMIT: 1
214 KUBERNETES_CPU_REQUEST: 1
215 KUBERNETES_MEMORY_REQUEST: 2Gi
216 BUILD_DIR: build-docs
219 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
220 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
224 junit: $BUILD_DIR/linkchecker-out.xml