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:not-for-release
25 - job: clang-tidy:configure
28 BUILD_DIR: build-clang-tidy
29 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
40 KUBERNETES_CPU_LIMIT: 1
41 KUBERNETES_CPU_REQUEST: 1
42 KUBERNETES_MEMORY_LIMIT: 2Gi
43 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
45 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
46 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
47 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
48 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
64 KUBERNETES_CPU_LIMIT: 1
65 KUBERNETES_CPU_REQUEST: 1
66 KUBERNETES_MEMORY_LIMIT: 2Gi
68 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
69 - grep -iq "copyright year" copyright.log | tee years.log || true
70 - grep -iq "copyright header" copyright.log | tee headers.log || true
71 - if [[ -s years.log || -s headers.log ]] ; then
72 echo "Copyright information needs updating" ;
86 - .before_script:default
87 - .rules:not-for-release
94 KUBERNETES_CPU_LIMIT: 1
95 KUBERNETES_CPU_REQUEST: 1
96 KUBERNETES_MEMORY_LIMIT: 2Gi
100 - cmake --build . --target check-source
101 - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
102 - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
103 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
105 name: docs-artifacts-$CI_COMMIT_REF_SLUG
109 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
110 - $BUILD_DIR/docs/doxygen/check-source.log
115 - .rules:nightly-not-for-release
120 KUBERNETES_CPU_LIMIT: 1
121 KUBERNETES_CPU_REQUEST: 1
122 KUBERNETES_MEMORY_LIMIT: 2Gi
123 BUILD_DIR: build-docs
126 - linkchecker docs/html/index.html -f $CI_PROJECT_DIR/docs/linkcheckerrc -Fxml --ignore-url html-full
127 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
131 junit: $BUILD_DIR/linkchecker-out.xml