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
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/cmake-3.15.7-llvm-9-openmpi:master
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/cmake-3.15.7-llvm-9-openmpi:master
36 - job: clang-tidy:configure-schedule
38 BUILD_DIR: build-clang-tidy
46 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
49 - job: clang-tidy:configure-push
51 COMPILER_MAJOR_VERSION: 9
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 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
59 # See discussion at https://gitlab.com/gromacs/gromacs/-/merge_requests/67
60 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base --fork-point FETCH_HEAD HEAD`)
61 - 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
62 - grep -iq "found code issues" clang-tidy.log | tee code-lint.txt || true
63 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
76 image: gromacs/ci-docs-llvm:master
79 COMPILER_MAJOR_VERSION: 7
80 KUBERNETES_CPU_LIMIT: 1
81 KUBERNETES_CPU_REQUEST: 1
82 KUBERNETES_MEMORY_LIMIT: 2Gi
83 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
85 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
86 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
87 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
88 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
101 image: gromacs/ci-docs-llvm:master
104 KUBERNETES_CPU_LIMIT: 1
105 KUBERNETES_CPU_REQUEST: 1
106 KUBERNETES_MEMORY_LIMIT: 2Gi
108 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
109 - grep -iq "copyright year" copyright.log | tee years.log || true
110 - grep -iq "copyright header" copyright.log | tee headers.log || true
111 - if [[ -s years.log || -s headers.log ]] ; then
112 echo "Copyright information needs updating" ;
126 - .before_script:default
135 KUBERNETES_CPU_LIMIT: 1
136 KUBERNETES_CPU_REQUEST: 1
137 KUBERNETES_MEMORY_LIMIT: 2Gi
138 BUILD_DIR: build-docs
141 - cmake --build . --target check-source
142 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
143 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
144 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
145 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
147 name: docs-artifacts-$CI_COMMIT_REF_SLUG
151 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
152 - $BUILD_DIR/docs/doxygen/check-source.log
157 - .rules:nightly-not-for-release
162 KUBERNETES_CPU_LIMIT: 1
163 KUBERNETES_CPU_REQUEST: 1
164 KUBERNETES_MEMORY_LIMIT: 2Gi
165 BUILD_DIR: build-docs
168 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
169 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
173 junit: $BUILD_DIR/linkchecker-out.xml