1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
5 - .gromacs:base:configure
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
13 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
14 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
15 # TODO: Enable GMX_PYTHON_PACKAGE for clang-tidy when dependencies are in Docker image.
30 - job: clang-tidy:configure
33 BUILD_DIR: build-clang-tidy
34 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
51 KUBERNETES_CPU_LIMIT: 1
52 KUBERNETES_CPU_REQUEST: 1
53 KUBERNETES_MEMORY_LIMIT: 2Gi
54 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
59 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
60 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
61 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
62 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
81 KUBERNETES_CPU_LIMIT: 1
82 KUBERNETES_CPU_REQUEST: 1
83 KUBERNETES_MEMORY_LIMIT: 2Gi
88 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
89 - grep -iq "copyright year" copyright.log | tee years.log || true
90 - grep -iq "copyright header" copyright.log | tee headers.log || true
91 - if [[ -s years.log || -s headers.log ]] ; then
92 echo "Copyright information needs updating" ;
106 - .before_script:default
115 KUBERNETES_CPU_LIMIT: 1
116 KUBERNETES_CPU_REQUEST: 1
117 KUBERNETES_MEMORY_LIMIT: 2Gi
118 BUILD_DIR: build-docs
124 - cmake --build . --target check-source
125 - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
126 - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
127 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
129 name: docs-artifacts-$CI_COMMIT_REF_SLUG
133 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
134 - $BUILD_DIR/docs/doxygen/check-source.log
151 KUBERNETES_CPU_LIMIT: 1
152 KUBERNETES_CPU_REQUEST: 1
153 KUBERNETES_MEMORY_LIMIT: 2Gi
154 BUILD_DIR: build-docs
157 - linkchecker docs/html/index.html -f ../docs/linkcheckerrc -Fxml --ignore-url html-full
158 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
162 junit: $BUILD_DIR/linkchecker-out.xml