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
12 COMPILER_MAJOR_VERSION: 9
13 BUILD_DIR: build-clang-tidy
14 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
16 clang-tidy:configure-schedule:
18 - .gromacs:base:configure
20 - .rules:nightly-not-for-release
21 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
25 COMPILER_MAJOR_VERSION: 9
26 BUILD_DIR: build-clang-tidy
27 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
34 - .rules:nightly-not-for-release
36 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
38 - job: clang-tidy:configure-schedule
40 BUILD_DIR: build-clang-tidy
49 image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
52 - job: clang-tidy:configure-push
54 COMPILER_MAJOR_VERSION: 9
55 BUILD_DIR: build-clang-tidy
56 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
57 KUBERNETES_CPU_LIMIT: 4
58 KUBERNETES_CPU_REQUEST: 2
59 KUBERNETES_MEMORY_LIMIT: 4Gi
61 # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
62 # See discussion at https://gitlab.com/gromacs/gromacs/-/merge_requests/67
63 - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
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 -iq "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:master
82 COMPILER_MAJOR_VERSION: 7
83 KUBERNETES_CPU_LIMIT: 1
84 KUBERNETES_CPU_REQUEST: 1
85 KUBERNETES_MEMORY_LIMIT: 2Gi
86 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
88 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
89 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
90 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
91 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
104 image: gromacs/ci-docs-llvm:master
107 KUBERNETES_CPU_LIMIT: 1
108 KUBERNETES_CPU_REQUEST: 1
109 KUBERNETES_MEMORY_LIMIT: 2Gi
111 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
112 - grep -iq "copyright year" copyright.log | tee years.log || true
113 - grep -iq "copyright header" copyright.log | tee headers.log || true
114 - if [[ -s years.log || -s headers.log ]] ; then
115 echo "Copyright information needs updating" ;
129 - .before_script:default
138 KUBERNETES_CPU_LIMIT: 1
139 KUBERNETES_CPU_REQUEST: 1
140 KUBERNETES_MEMORY_LIMIT: 2Gi
141 BUILD_DIR: build-docs
144 - cmake --build . --target check-source
145 - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
146 - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
147 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
149 name: docs-artifacts-$CI_COMMIT_REF_SLUG
153 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
154 - $BUILD_DIR/docs/doxygen/check-source.log
159 - .rules:nightly-not-for-release
164 KUBERNETES_CPU_LIMIT: 1
165 KUBERNETES_CPU_REQUEST: 1
166 KUBERNETES_MEMORY_LIMIT: 2Gi
167 BUILD_DIR: build-docs
170 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
171 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
175 junit: $BUILD_DIR/linkchecker-out.xml