CI: allow multiple matches to combine tags (#32290)
Currently "spack ci generate" chooses the first matching entry in gitlab-ci:mappings to fill attributes for a generated build-job, requiring that the entire configuration matrix is listed out explicitly. This unfortunately causes significant problems in environments with large configuration spaces, for example the environment in #31598 (spack.yaml) supports 5 operating systems, 3 architectures and 130 packages with explicit size requirements, resulting in 1300 lines of configuration YAML. This patch adds a configuraiton option to the gitlab-ci schema called "match_behavior"; when it is set to "merge", all matching entries are applied in order to the final build-job, allowing a few entries to cover an entire matrix of configurations. The default for "match_behavior" is "first", which behaves as before this commit (only the runner attributes of the first match are used). In addition, match entries may now include a "remove-attributes" configuration, which allows matches to remove tags that have been aggregated by prior matches. This only makes sense to use with "match_behavior:merge". You can combine "runner-attributes" with "remove-attributes" to effectively override prior tags.
This commit is contained in:

committed by
GitHub

parent
898c0b45fb
commit
10491e98a8
@@ -252,6 +252,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -253,6 +253,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -159,6 +159,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -171,6 +171,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -45,6 +45,7 @@ spack:
|
||||
name: "ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18"
|
||||
entrypoint: [ "" ]
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- cmake
|
||||
|
@@ -55,6 +55,7 @@ spack:
|
||||
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
|
||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||
- spack -d ci rebuild
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -51,6 +51,7 @@ spack:
|
||||
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match: ['os=monterey']
|
||||
runner-attributes:
|
||||
|
@@ -221,6 +221,7 @@ spack:
|
||||
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
|
||||
- spack -d ci rebuild
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- cuda
|
||||
|
@@ -282,6 +282,7 @@ spack:
|
||||
|
||||
image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2022-07-01
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- hipblas
|
||||
|
@@ -261,6 +261,7 @@ spack:
|
||||
broken-tests-packages:
|
||||
- gptune
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- hipblas
|
||||
|
@@ -97,6 +97,7 @@ spack:
|
||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -100,6 +100,7 @@ spack:
|
||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -103,6 +103,7 @@ spack:
|
||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -67,6 +67,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -72,6 +72,7 @@ spack:
|
||||
- spack -d ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
|
||||
image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2022-03-21", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- llvm
|
||||
|
@@ -72,6 +72,7 @@ spack:
|
||||
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
|
||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||
- spack -d ci rebuild
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- lbann
|
||||
|
@@ -74,6 +74,7 @@ spack:
|
||||
- spack -d ci rebuild
|
||||
|
||||
image: { "name": "ghcr.io/spack/tutorial-ubuntu-18.04:v2021-11-02", "entrypoint": [""] }
|
||||
match_behavior: first
|
||||
mappings:
|
||||
- match:
|
||||
- cmake
|
||||
|
Reference in New Issue
Block a user