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
10 COMPILER_MAJOR_VERSION: 9
11 BUILD_DIR: build-clang-tidy
12 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
14 clang-tidy:configure-schedule:
16 - .gromacs:base:configure
18 - .rules:nightly-not-for-release
19 image: gromacs/cmake-3.15.7-llvm-9-openmpi-master
21 COMPILER_MAJOR_VERSION: 9
22 BUILD_DIR: build-clang-tidy
23 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
30 - .rules:nightly-not-for-release
32 image: gromacs/cmake-3.15.7-llvm-9-openmpi-master
34 - job: clang-tidy:configure-schedule
36 BUILD_DIR: build-clang-tidy
44 image: gromacs/cmake-3.15.7-llvm-9-openmpi-master
46 - job: clang-tidy:configure-push
48 COMPILER_MAJOR_VERSION: 9
49 BUILD_DIR: build-clang-tidy
50 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
51 KUBERNETES_CPU_LIMIT: 4
52 KUBERNETES_CPU_REQUEST: 2
53 KUBERNETES_MEMORY_REQUEST: 4Gi
55 # Make sure that a Python interpreter can be found for `/bin/env python`
56 - test -x /usr/bin/python || update-alternatives --install /usr/bin/python python /usr/bin/python3 1
57 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
58 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
59 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
60 - if [[ "$REV" == "$HEAD_REV" ]] ; then
63 - echo "Revision used for branch point is $REV"
65 - 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
66 - grep -i "found code issues" clang-tidy.log | tee code-lint.txt || true
67 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
80 image: gromacs/ci-docs-llvm-master
82 COMPILER_MAJOR_VERSION: 7
83 KUBERNETES_CPU_LIMIT: 1
84 KUBERNETES_CPU_REQUEST: 1
85 KUBERNETES_MEMORY_REQUEST: 2Gi
86 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
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 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
97 - grep -i "needs formatting" clang-format.log | tee formatting.txt || true
98 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
111 image: gromacs/ci-docs-llvm-master
113 KUBERNETES_CPU_LIMIT: 1
114 KUBERNETES_CPU_REQUEST: 1
115 KUBERNETES_MEMORY_REQUEST: 2Gi
117 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
118 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
119 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
120 - if [[ "$REV" == "$HEAD_REV" ]] ; then
123 - echo "Revision used for branch point is $REV"
125 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
126 - grep -i "copyright year" copyright.log | tee years.log || true
127 - grep -i "copyright header" copyright.log | tee headers.log || true
128 - if [[ -s years.log || -s headers.log ]] ; then
129 echo "Copyright information needs updating" ;
143 - .before_script:default
151 KUBERNETES_CPU_LIMIT: 1
152 KUBERNETES_CPU_REQUEST: 1
153 KUBERNETES_MEMORY_REQUEST: 2Gi
154 BUILD_DIR: build-docs
157 - cmake --build . --target check-source
158 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
159 - awk '/warning:.*includes/,/unnecessarily|^$/' docs/doxygen/check-source.log | tee -a doxygenError.txt || true
160 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
161 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
162 - grep -i "unused cycle suppression" docs/doxygen/check-source.log | tee -a doxygenError.txt || true
163 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
165 name: docs-artifacts-$CI_COMMIT_REF_SLUG
169 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
170 - $BUILD_DIR/docs/doxygen/check-source.log
175 - .rules:nightly-not-for-release
180 KUBERNETES_CPU_LIMIT: 1
181 KUBERNETES_CPU_REQUEST: 1
182 KUBERNETES_MEMORY_REQUEST: 2Gi
183 BUILD_DIR: build-docs
186 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
187 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
191 junit: $BUILD_DIR/linkchecker-out.xml