1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
5 - .gromacs:base:configure
7 - .rules:not-for-release
10 BUILD_DIR: build-clang-tidy
11 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
12 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
13 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
14 # TODO: Enable GMX_PYTHON_PACKAGE for clang-tidy when dependencies are in Docker image.
22 - .rules:nightly-not-for-release
25 - job: clang-tidy:configure
27 BUILD_DIR: build-clang-tidy
28 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
36 - .rules:not-for-release
39 - job: clang-tidy:configure
41 BUILD_DIR: build-clang-tidy
42 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
43 KUBERNETES_CPU_LIMIT: 4
44 KUBERNETES_CPU_REQUEST: 2
45 KUBERNETES_MEMORY_LIMIT: 4Gi
47 - RUN_CLANG_TIDY=run-clang-tidy-$COMPILER_MAJOR_VERSION bash admin/clang-tidy.sh check --parallel=$KUBERNETES_CPU_LIMIT --warnings=clang-tidy.log --rev=origin/master -B=$BUILD_DIR
48 - grep -iq "found code issues" clang-tidy.log | tee code-lint.txt || true
49 - if [ -s code-lint.txt ] ; then echo "clang-tidy.sh found issues"; exit 1; fi
65 KUBERNETES_CPU_LIMIT: 1
66 KUBERNETES_CPU_REQUEST: 1
67 KUBERNETES_MEMORY_LIMIT: 2Gi
68 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
70 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
71 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
72 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
73 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
89 KUBERNETES_CPU_LIMIT: 1
90 KUBERNETES_CPU_REQUEST: 1
91 KUBERNETES_MEMORY_LIMIT: 2Gi
93 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
94 - grep -iq "copyright year" copyright.log | tee years.log || true
95 - grep -iq "copyright header" copyright.log | tee headers.log || true
96 - if [[ -s years.log || -s headers.log ]] ; then
97 echo "Copyright information needs updating" ;
111 - .before_script:default
112 - .rules:not-for-release
119 KUBERNETES_CPU_LIMIT: 1
120 KUBERNETES_CPU_REQUEST: 1
121 KUBERNETES_MEMORY_LIMIT: 2Gi
122 BUILD_DIR: build-docs
125 - cmake --build . --target check-source
126 - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
127 - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
128 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
130 name: docs-artifacts-$CI_COMMIT_REF_SLUG
134 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
135 - $BUILD_DIR/docs/doxygen/check-source.log
140 - .rules:nightly-not-for-release
145 KUBERNETES_CPU_LIMIT: 1
146 KUBERNETES_CPU_REQUEST: 1
147 KUBERNETES_MEMORY_LIMIT: 2Gi
148 BUILD_DIR: build-docs
151 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
152 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
156 junit: $BUILD_DIR/linkchecker-out.xml