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
10 COMPILER_MAJOR_VERSION: 8
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.11.4-llvm-8-openmpi:2020
21 COMPILER_MAJOR_VERSION: 8
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.11.4-llvm-8-openmpi:2020
34 - job: clang-tidy:configure-schedule
36 BUILD_DIR: build-clang-tidy
44 image: gromacs/cmake-3.11.4-llvm-8-openmpi:2020
46 - job: clang-tidy:configure-push
48 COMPILER_MAJOR_VERSION: 8
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 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
58 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
59 - if [[ "$REV" == "$HEAD_REV" ]] ; then
62 - echo "Revision used for branch point is $REV"
64 - 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
65 - grep -i "found code issues" clang-tidy.log | tee code-lint.txt || true
66 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
79 image: gromacs/ci-docs-llvm:2020
81 COMPILER_MAJOR_VERSION: 7
82 KUBERNETES_CPU_LIMIT: 1
83 KUBERNETES_CPU_REQUEST: 1
84 KUBERNETES_MEMORY_REQUEST: 2Gi
85 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
87 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && 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:2020
111 KUBERNETES_CPU_LIMIT: 1
112 KUBERNETES_CPU_REQUEST: 1
113 KUBERNETES_MEMORY_REQUEST: 2Gi
115 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2020 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
116 - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
117 - if [[ "$REV" == "$HEAD_REV" ]] ; then
120 - echo "Revision used for branch point is $REV"
122 - admin/copyright.sh check --rev=$REV --warnings=copyright.log
123 - grep -i "copyright year" copyright.log | tee years.log || true
124 - grep -i "copyright header" copyright.log | tee headers.log || true
125 - if [[ -s years.log || -s headers.log ]] ; then
126 echo "Copyright information needs updating" ;
140 - .before_script:default
148 KUBERNETES_CPU_LIMIT: 1
149 KUBERNETES_CPU_REQUEST: 1
150 KUBERNETES_MEMORY_REQUEST: 2Gi
151 BUILD_DIR: build-docs
154 - cmake --build . --target check-source
155 - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
156 - awk '/warning:.*includes/,/unnecessarily|^$/' docs/doxygen/check-source.log | tee -a 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 - grep -i "unused cycle suppression" docs/doxygen/check-source.log | tee -a doxygenError.txt || true
160 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
162 name: docs-artifacts-$CI_COMMIT_REF_SLUG
166 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
167 - $BUILD_DIR/docs/doxygen/check-source.log
172 - .rules:nightly-not-for-release
177 KUBERNETES_CPU_LIMIT: 1
178 KUBERNETES_CPU_REQUEST: 1
179 KUBERNETES_MEMORY_REQUEST: 2Gi
180 BUILD_DIR: build-docs
183 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
184 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
188 junit: $BUILD_DIR/linkchecker-out.xml