1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
3 clang-tidy:configure-push:
5 - .gromacs:base:configure
8 image: gromacs/cmake-3.11.4-llvm-8-openmpi:2020
11 COMPILER_MAJOR_VERSION: 8
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.11.4-llvm-8-openmpi:2020
23 COMPILER_MAJOR_VERSION: 8
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.11.4-llvm-8-openmpi:2020
36 - job: clang-tidy:configure-schedule
38 BUILD_DIR: build-clang-tidy
46 image: gromacs/cmake-3.11.4-llvm-8-openmpi:2020
49 - job: clang-tidy:configure-push
51 COMPILER_MAJOR_VERSION: 8
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 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && 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:2020
83 COMPILER_MAJOR_VERSION: 7
84 KUBERNETES_CPU_LIMIT: 1
85 KUBERNETES_CPU_REQUEST: 1
86 KUBERNETES_MEMORY_LIMIT: 2Gi
87 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
89 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && 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:2020
114 KUBERNETES_CPU_LIMIT: 1
115 KUBERNETES_CPU_REQUEST: 1
116 KUBERNETES_MEMORY_LIMIT: 2Gi
118 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && 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
152 KUBERNETES_CPU_LIMIT: 1
153 KUBERNETES_CPU_REQUEST: 1
154 KUBERNETES_MEMORY_LIMIT: 2Gi
155 BUILD_DIR: build-docs
158 - cmake --build . --target check-source
159 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee 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 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
164 name: docs-artifacts-$CI_COMMIT_REF_SLUG
168 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
169 - $BUILD_DIR/docs/doxygen/check-source.log
174 - .rules:nightly-not-for-release
179 KUBERNETES_CPU_LIMIT: 1
180 KUBERNETES_CPU_REQUEST: 1
181 KUBERNETES_MEMORY_LIMIT: 2Gi
182 BUILD_DIR: build-docs
185 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
186 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
190 junit: $BUILD_DIR/linkchecker-out.xml