1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
3 clang-tidy:configure-push:
5 - .gromacs:base:configure
8 image: gromacs/ci-ubuntu-18.04-llvm-9
10 CMAKE: /usr/local/cmake-3.15.7/bin/cmake
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/ci-ubuntu-18.04-llvm-9
22 CMAKE: /usr/local/cmake-3.15.7/bin/cmake
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/ci-ubuntu-18.04-llvm-9
36 - job: clang-tidy:configure-schedule
38 CMAKE: /usr/local/cmake-3.15.7/bin/cmake
39 BUILD_DIR: build-clang-tidy
47 image: gromacs/ci-ubuntu-18.04-llvm-9
49 - job: clang-tidy:configure-push
51 CMAKE: /usr/local/cmake-3.15.7/bin/cmake
52 COMPILER_MAJOR_VERSION: 9
53 BUILD_DIR: build-clang-tidy
54 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
55 KUBERNETES_CPU_LIMIT: 4
56 KUBERNETES_CPU_REQUEST: 2
57 KUBERNETES_MEMORY_REQUEST: 4Gi
59 # Make sure that a Python interpreter can be found for `/bin/env python`
60 - test -x /usr/bin/python || update-alternatives --install /usr/bin/python python /usr/bin/python3 1
61 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
62 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2021 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
63 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
64 - if [[ "$REV" == "$HEAD_REV" ]] ; then
67 - echo "Revision used for branch point is $REV"
69 - 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
70 - grep -i "found code issues" clang-tidy.log | tee code-lint.txt || true
71 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
84 image: gromacs/ci-ubuntu-18.04-llvm-7-docs
86 COMPILER_MAJOR_VERSION: 7
87 KUBERNETES_CPU_LIMIT: 1
88 KUBERNETES_CPU_REQUEST: 1
89 KUBERNETES_MEMORY_REQUEST: 2Gi
90 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
92 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2021 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
93 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
94 - if [[ "$REV" == "$HEAD_REV" ]] ; then
97 - echo "Revision used for branch point is $REV"
99 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
100 - grep -i "needs formatting" clang-format.log | tee formatting.txt || true
101 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
114 image: gromacs/ci-ubuntu-18.04-llvm-7-docs
116 KUBERNETES_CPU_LIMIT: 1
117 KUBERNETES_CPU_REQUEST: 1
118 KUBERNETES_MEMORY_REQUEST: 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
154 KUBERNETES_CPU_LIMIT: 1
155 KUBERNETES_CPU_REQUEST: 1
156 KUBERNETES_MEMORY_REQUEST: 2Gi
157 BUILD_DIR: build-docs
159 - CMAKE=${CMAKE:-$(which cmake)}
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 '/warning:.*includes/,/unnecessarily|^$/' docs/doxygen/check-source.log | tee -a doxygenError.txt || true
164 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
165 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
166 - grep -i "unused cycle suppression" docs/doxygen/check-source.log | tee -a doxygenError.txt || true
167 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
169 name: docs-artifacts-$CI_COMMIT_REF_SLUG
173 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
174 - $BUILD_DIR/docs/doxygen/check-source.log
179 - .rules:nightly-not-for-release
184 KUBERNETES_CPU_LIMIT: 1
185 KUBERNETES_CPU_REQUEST: 1
186 KUBERNETES_MEMORY_REQUEST: 2Gi
187 BUILD_DIR: build-docs
190 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
191 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
195 junit: $BUILD_DIR/linkchecker-out.xml