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_LIMIT: 4Gi
55 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
56 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
57 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
58 - if [[ "$REV" == "$HEAD_REV" ]] ; then
61 - echo "Revision used for branch point is $REV"
63 - 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
64 - grep -i "found code issues" clang-tidy.log | tee code-lint.txt || true
65 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
78 image: gromacs/ci-docs-llvm:master
80 COMPILER_MAJOR_VERSION: 7
81 KUBERNETES_CPU_LIMIT: 1
82 KUBERNETES_CPU_REQUEST: 1
83 KUBERNETES_MEMORY_LIMIT: 2Gi
84 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
86 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
87 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
88 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
89 - if [[ "$REV" == "$HEAD_REV" ]] ; then
92 - echo "Revision used for branch point is $REV"
94 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
95 - grep -i "needs formatting" clang-format.log | tee formatting.txt || true
96 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
109 image: gromacs/ci-docs-llvm:master
111 KUBERNETES_CPU_LIMIT: 1
112 KUBERNETES_CPU_REQUEST: 1
113 KUBERNETES_MEMORY_LIMIT: 2Gi
115 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
116 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
117 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
118 - if [[ "$REV" == "$HEAD_REV" ]] ; then
121 - echo "Revision used for branch point is $REV"
123 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
124 - grep -i "copyright year" copyright.log | tee years.log || true
125 - grep -i "copyright header" copyright.log | tee headers.log || true
126 - if [[ -s years.log || -s headers.log ]] ; then
127 echo "Copyright information needs updating" ;
141 - .before_script:default
149 KUBERNETES_CPU_LIMIT: 1
150 KUBERNETES_CPU_REQUEST: 1
151 KUBERNETES_MEMORY_LIMIT: 2Gi
152 BUILD_DIR: build-docs
155 - cmake --build . --target check-source
156 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
157 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
158 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
159 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
161 name: docs-artifacts-$CI_COMMIT_REF_SLUG
165 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
166 - $BUILD_DIR/docs/doxygen/check-source.log
171 - .rules:nightly-not-for-release
176 KUBERNETES_CPU_LIMIT: 1
177 KUBERNETES_CPU_REQUEST: 1
178 KUBERNETES_MEMORY_LIMIT: 2Gi
179 BUILD_DIR: build-docs
182 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
183 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
187 junit: $BUILD_DIR/linkchecker-out.xml