1 # Mix-in job definitions.
3 # Centralized definitions of common job parameter values.
7 KUBERNETES_CPU_LIMIT: 8
8 KUBERNETES_CPU_REQUEST: 4
9 KUBERNETES_MEMORY_LIMIT: 8Gi
10 KUBERNETES_EXTENDED_RESOURCE_NAME: ""
11 KUBERNETES_EXTENDED_RESOURCE_LIMIT: 0
12 CACHE_FALLBACK_KEY: "$CI_JOB_NAME-$CI_JOB_STAGE-master"
15 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=ON"
16 # TODO: Get these from updated Docker images.
18 # Our generic before_script to install dependencies and prepare the ccache directory.
19 .before_script:default:
22 - export CCACHE_BASEDIR=${PWD}
23 - export CCACHE_DIR=${PWD}/ccache
25 # Jobs that run for new commits and pipelines triggered by schedules or
26 # through the web interface, unless GROMACS_RELEASE is set. Excluded from
27 # extra pipelines generated by merge request events.
28 # Includes non-gromacs projects. Note that jobs using this rule are
29 # eligible to run on non-gromacs project infrastructure, and should therefore
30 # override the default *tag* parameter to exclude tags specific to the GROMACS
31 # GitLab Runner infrastructure. I.e. in the job definition, set `tags: []`
34 - if: '$GROMACS_RELEASE'
36 - if: '$CI_PIPELINE_SOURCE == "web"'
38 - if: '$CI_PIPELINE_SOURCE == "push"'
40 - if: '$CI_PIPELINE_SOURCE == "schedule"'
42 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
45 # Jobs that run for merge requests and schedules, but not when GROMACS_RELEASE
46 # is set. Excludes non-gromacs projects.
47 .rules:merge-requests:
49 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
51 - if: '$GROMACS_RELEASE'
53 - if: '$CI_PIPELINE_SOURCE == "web"'
55 - if: '$CI_PIPELINE_SOURCE == "push"'
57 - if: '$CI_PIPELINE_SOURCE == "schedule"'
59 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
62 # Rule to run a job only in nightly release-preparation pipelines.
63 # Checks if the GROMACS_RELEASE variable was set (typically through the GitLab web interface).
64 # Excludes merge_requests and non-gromacs projects.
65 # TODO: Update to *rules* syntax.
66 .rules:nightly-only-for-release:
68 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
70 - if: '$GROMACS_RELEASE && $CI_PIPELINE_SOURCE == "web"'
72 - if: '$GROMACS_RELEASE && $CI_PIPELINE_SOURCE == "schedule"'
75 # Jobs that run on schedules, but not for merge requests or when GROMACS_RELEASE
76 # is set. Excludes non-gromacs projects.
77 .rules:nightly-not-for-release:
79 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
81 - if: '$GROMACS_RELEASE'
83 - if: '$CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "schedule"'
86 # Behavioral templates
88 # Use a persistent compiler cache to speed up rebuilds for a single job.
91 key: "$CI_JOB_NAME-$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
99 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
100 CMAKE_GPU_OPTIONS: -DGMX_GPU=ON -DGMX_USE_CUDA=ON
104 CMAKE_MPI_OPTIONS: "-DGMX_MPI=ON"
108 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
109 CMAKE_GPU_OPTIONS: -DGMX_GPU=ON -DGMX_USE_OPENCL=ON
111 # Base definition for using gcc.
114 CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=gcc-$COMPILER_MAJOR_VERSION -DCMAKE_CXX_COMPILER=g++-$COMPILER_MAJOR_VERSION
117 - export CCACHE_BASEDIR=${PWD}
118 - export CCACHE_DIR=${PWD}/ccache
120 # Base definition for using clang.
123 CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=clang-$COMPILER_MAJOR_VERSION -DCMAKE_CXX_COMPILER=clang++-$COMPILER_MAJOR_VERSION
126 - export CCACHE_BASEDIR=${PWD}
127 - export CCACHE_DIR=${PWD}/ccache
128 - export ASAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer