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 --fork-point FETCH_HEAD HEAD`)
59 - 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
60 - grep -iq "found code issues" clang-tidy.log | tee code-lint.txt || true
61 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
74 image: gromacs/ci-docs-llvm:2020
77 COMPILER_MAJOR_VERSION: 7
78 KUBERNETES_CPU_LIMIT: 1
79 KUBERNETES_CPU_REQUEST: 1
80 KUBERNETES_MEMORY_LIMIT: 2Gi
81 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
83 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
84 - CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION admin/clang-format.sh check --rev=$REV --warnings=clang-format.log
85 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
86 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
99 image: gromacs/ci-docs-llvm:2020
102 KUBERNETES_CPU_LIMIT: 1
103 KUBERNETES_CPU_REQUEST: 1
104 KUBERNETES_MEMORY_LIMIT: 2Gi
106 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
107 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
108 - grep -iq "copyright year" copyright.log | tee years.log || true
109 - grep -iq "copyright header" copyright.log | tee headers.log || true
110 - if [[ -s years.log || -s headers.log ]] ; then
111 echo "Copyright information needs updating" ;
125 - .before_script:default
134 KUBERNETES_CPU_LIMIT: 1
135 KUBERNETES_CPU_REQUEST: 1
136 KUBERNETES_MEMORY_LIMIT: 2Gi
137 BUILD_DIR: build-docs
140 - cmake --build . --target check-source
141 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
142 - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
143 - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true
144 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
146 name: docs-artifacts-$CI_COMMIT_REF_SLUG
150 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
151 - $BUILD_DIR/docs/doxygen/check-source.log
156 - .rules:nightly-not-for-release
161 KUBERNETES_CPU_LIMIT: 1
162 KUBERNETES_CPU_REQUEST: 1
163 KUBERNETES_MEMORY_LIMIT: 2Gi
164 BUILD_DIR: build-docs
167 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
168 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
172 junit: $BUILD_DIR/linkchecker-out.xml