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_REQUEST: 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: ""
17 # Our generic before_script to install dependencies and prepare the ccache directory.
18 .before_script:default:
21 - export CCACHE_BASEDIR=${PWD}
22 - export CCACHE_DIR=${PWD}/ccache
24 # Jobs that run for new commits and pipelines triggered by schedules or
25 # through the web interface, unless GROMACS_RELEASE is set. Excluded from
26 # extra pipelines generated by merge request events.
27 # Includes non-gromacs projects. Note that jobs using this rule are
28 # eligible to run on non-gromacs project infrastructure, and should therefore
29 # override the default *tag* parameter to exclude tags specific to the GROMACS
30 # GitLab Runner infrastructure. I.e. in the job definition, set `tags: []`
33 - if: '$GROMACS_RELEASE'
35 - if: '$CI_PIPELINE_SOURCE == "web"'
37 - if: '$CI_PIPELINE_SOURCE == "push"'
39 - if: '$CI_PIPELINE_SOURCE == "schedule"'
41 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
44 # Jobs that run for merge requests and schedules, but not when GROMACS_RELEASE
45 # is set. Excludes non-gromacs projects.
46 .rules:merge-requests:
48 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
50 - if: '$GROMACS_RELEASE'
52 - if: '$CI_PIPELINE_SOURCE == "web"'
54 - if: '$CI_PIPELINE_SOURCE == "push"'
56 - if: '$CI_PIPELINE_SOURCE == "schedule"'
58 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
61 # Rule to run a job only in nightly release-preparation pipelines.
62 # Checks if the GROMACS_RELEASE variable was set (typically through the GitLab web interface).
63 # Excludes merge_requests and non-gromacs projects.
64 # TODO: Update to *rules* syntax.
65 .rules:nightly-only-for-release:
67 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
69 - if: '$GROMACS_RELEASE && $CI_PIPELINE_SOURCE == "web"'
71 - if: '$GROMACS_RELEASE && $CI_PIPELINE_SOURCE == "schedule"'
74 # Jobs that run on schedules, but not for merge requests or when GROMACS_RELEASE
75 # is set. Excludes non-gromacs projects.
76 .rules:nightly-not-for-release:
78 - if: '$CI_PROJECT_NAMESPACE != "gromacs"'
80 - if: '$GROMACS_RELEASE'
82 - if: '$CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "schedule"'
85 # Behavioral templates
87 # Use a persistent compiler cache to speed up rebuilds for a single job.
90 key: "$CI_JOB_NAME-$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
98 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
99 CMAKE_GPU_OPTIONS: -DGMX_GPU=ON -DGMX_USE_CUDA=ON
103 CMAKE_MPI_OPTIONS: "-DGMX_MPI=ON"
107 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
108 CMAKE_GPU_OPTIONS: -DGMX_GPU=ON -DGMX_USE_OPENCL=ON
110 # Base definition for using gcc.
113 CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=gcc-$COMPILER_MAJOR_VERSION -DCMAKE_CXX_COMPILER=g++-$COMPILER_MAJOR_VERSION
116 - export CCACHE_BASEDIR=${PWD}
117 - export CCACHE_DIR=${PWD}/ccache
119 # Base definition for using clang.
122 CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=clang-$COMPILER_MAJOR_VERSION -DCMAKE_CXX_COMPILER=clang++-$COMPILER_MAJOR_VERSION
125 - export CCACHE_BASEDIR=${PWD}
126 - export CCACHE_DIR=${PWD}/ccache
127 - export ASAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer