.regressiontests-extends-template:
extends:
- - .no-cache-template
- .variables:default
+ cache: {}
prepare-regressiontests:
extends:
- .configure-extends-template
- .configure-docs-release-template
- .documentation-before-script-template
+ cache: {}
configure-docs:
extends:
.build-docs-binary:
extends:
- .build-extends-template
- - .build-cache-template
+ - .use-ccache
- .build-docs-binary-template
- .documentation-before-script-template
extends:
- .binary-build-template
- .variables:default
- - .no-cache-template
- .build-docs-webpage-template
- .documentation-before-script-template
extends:
- .configure-docs-release
- .configure-gmxapi-template
- - .no-cache-template
+ cache: {}
only:
refs:
- web
+# Mix-in job definitions.
+
+# Centralized definitions of common job parameter values.
+
.variables:default:
variables:
KUBERNETES_CPU_LIMIT: 8
BUILD_DIR: build
INSTALL_DIR: install
-.build-cache-template:
+# Behavioral templates
+
+# Use a persistent compiler cache to speed up rebuilds for a single job.
+.use-ccache:
cache:
key: "$CI_JOB_NAME-$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths:
- ccache/
-.pull-cache-template:
- cache:
- key: "$CI_JOB_NAME-$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
- # Read but don't update the cache
- policy: pull
-
-.no-cache-template:
- cache: {}
-
.gmxapi-extra-installs:
variables:
run-clang-format:
extends:
- .binary-build-template
- - .no-cache-template
- .variables:default
- .clang-before-script-template
- .build-clang-template
- .clang7-template
+ cache: {}
stage: source-check
when: always
needs:
run-copyright-check:
extends:
- .binary-build-template
- - .no-cache-template
- .variables:default
- .clang-before-script-template
- .build-clang-template
- .clang7-template
+ cache: {}
stage: source-check
when: always
needs:
run-check-source:
extends:
- - .no-cache-template
- .variables:default
- .build-docs-binary-template
- .documentation-before-script-template
+ cache: {}
stage: source-check
needs:
- job: simple-build
simple-build:
extends:
- .simple-build-template
- - .build-cache-template
+ - .use-ccache
- .variables:default
- .gcc-before-script-template
- .build-gcc-template
.configure-extends-template:
extends:
- .configure-build-template
- - .no-cache-template
- .variables:default
+ cache: {}
.configure-release-extends-template:
extends:
- .configure-build-release-template
- - .no-cache-template
- .variables:default
+ cache: {}
# Templates for configuration stage
.configure-gcc:
configure-gcc-7-release:
extends:
- .configure-gcc-release
- - .no-cache-template
- .gcc7-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 7
RELEASE_BUILD_DIR: release-builds-gcc
configure-gcc-7-double-release:
extends:
- .configure-gcc-release
- - .no-cache-template
- .gcc7-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 7
CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
extends:
- .configure-gcc-release
- .configure-gmxapi-template
- - .no-cache-template
- .gcc7-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 7
RELEASE_BUILD_DIR: release-builds-gcc
configure-gcc-8-release:
extends:
- .configure-gcc-release
- - .no-cache-template
- .gcc8-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 8
RELEASE_BUILD_DIR: release-builds-gcc
configure-clang-7-release:
extends:
- .configure-clang-release
- - .no-cache-template
- .clang7-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 7
RELEASE_BUILD_DIR: release-builds-clang
extends:
- .configure-clang-release
- .configure-gmxapi-template
- - .no-cache-template
- .clang7-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 7
RELEASE_BUILD_DIR: release-builds-clang
configure-clang-8-release:
extends:
- .configure-clang-release
- - .no-cache-template
- .clang8-template
+ cache: {}
variables:
COMPILER_MAJOR_VERSION: 8
RELEASE_BUILD_DIR: release-builds-clang
.build-extends-template:
extends:
- .binary-build-template
- - .build-cache-template
+ - .use-ccache
- .variables:default
.build-gcc:
.test-extends-template:
extends:
- .test-base-template
- - .pull-cache-template
- .test-script-template
- .variables:default
Avoid using *before-script* directly, and be cautious
about nested *extends* overriding multiple *before_script* definitions.
+ cache
+ There is no global default, but jobs that build software will likely
+ set *cache*. To explicitly unset *cache* directives, specify a job
+ parameter of ``cache: {}``.
+ Refer to `GitLab docs <https://docs.gitlab.com/ee/ci/yaml/#cache>`__
+ for details. In particular, note the details of cache identity according
+ to `cache:key <https://docs.gitlab.com/ee/ci/yaml/#cachekey>`__
+
image
Part of the tool chain configuration. Instead of setting *image*
directly, *extend* a *.use_<toolchain>* template from
Refer to `GitLab <https://docs.gitlab.com/ee/ci/yaml/#variables>`__
for details of the merging behavior. Refer to :ref:`variables` for local usage.
+Global templates
+~~~~~~~~~~~~~~~~
+
In addition to the templates in the main job definition files,
common "mix-in" functionality and behavioral templates are defined in
:file:`admin/gitlab-ci/global.gitlab-ci.yml`.
+Jobs beginning with ``.use-`` provide mix-in behavior, such as boilerplate for
+jobs using a particular tool chain.
+
+Jobs beginning with a `parameter <https://docs.gitlab.com/ee/ci/yaml>`__
+name allow parameters to be set in a single place for common job characteristics.
+If providing more than a default parameter value, the job name should be suffixed
+by a meaningful descriptor and documented within
+:file:`admin/gitlab-ci/global.gitlab-ci.yml`
+
.. _variables:
Variables