1 # Repository cleanliness. Source tidiness, linting, and policy compliance.
5 - .gromacs:base:configure
7 - .rules:not-for-release
12 BUILD_DIR: build-clang-tidy
13 CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON
14 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
15 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
16 # TODO: Enable GMX_PYTHON_PACKAGE for clang-tidy when dependencies are in Docker image.
24 - .rules:not-for-release
29 - job: clang-tidy:configure
32 BUILD_DIR: build-clang-tidy
33 EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION
40 - .rules:not-for-release
48 KUBERNETES_CPU_LIMIT: 1
49 KUBERNETES_CPU_REQUEST: 1
50 KUBERNETES_MEMORY_LIMIT: 2Gi
51 EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
53 - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
54 - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
55 - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
56 - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
68 - .rules:not-for-release
76 KUBERNETES_CPU_LIMIT: 1
77 KUBERNETES_CPU_REQUEST: 1
78 KUBERNETES_MEMORY_LIMIT: 2Gi
80 - admin/copyright.sh check --rev=HEAD^ --warnings=copyright.log
81 - grep -iq "copyright year" copyright.log | tee years.log || true
82 - grep -iq "copyright header" copyright.log | tee headers.log || true
83 - if [[ -s years.log || -s headers.log ]] ; then
84 echo "Copyright information needs updating" ;
98 - .before_script:default
99 - .rules:not-for-release
108 KUBERNETES_CPU_LIMIT: 1
109 KUBERNETES_CPU_REQUEST: 1
110 KUBERNETES_MEMORY_LIMIT: 2Gi
111 BUILD_DIR: build-docs
114 - cmake --build . --target check-source
115 - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
116 - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
117 - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
119 name: docs-artifacts-$CI_COMMIT_REF_SLUG
123 - $BUILD_DIR/docs/doxygen/doxygen-xml.log
124 - $BUILD_DIR/docs/doxygen/check-source.log
129 - .rules:nightly-not-for-release
134 KUBERNETES_CPU_LIMIT: 1
135 KUBERNETES_CPU_REQUEST: 1
136 KUBERNETES_MEMORY_LIMIT: 2Gi
137 BUILD_DIR: build-docs
140 - linkchecker docs/html/index.html -f ../docs/linkcheckerrc -Fxml --ignore-url html-full
141 --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
145 junit: $BUILD_DIR/linkchecker-out.xml