-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13bbc25
commit fc0281c
Showing
11 changed files
with
104 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Checks the current entry to see if it matches the given exclude | ||
def matches($entry; $exclude): | ||
all($exclude | to_entries | .[]; $entry[.key] == .value); | ||
|
||
def filter_excludes($entry; $excludes): | ||
select(any($excludes[]; matches($entry; .)) | not); | ||
|
||
def lists2dict($keys; $values): | ||
reduce range($keys | length) as $ind ({}; . + {($keys[$ind]): $values[$ind]}); | ||
|
||
def add_config($entry; $config): | ||
$entry + $config[$entry.ENV]; | ||
|
||
def compute_matrix($matrix; $config): | ||
($matrix.exclude // []) as $excludes | | ||
$matrix | del(.exclude) | | ||
keys_unsorted as $matrix_keys | | ||
to_entries | | ||
map(.value) | | ||
[ | ||
combinations | | ||
lists2dict($matrix_keys; .) | | ||
filter_excludes(.; $excludes) | | ||
add_config(.; $config) | ||
] | | ||
{include: .}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# This script computes the matrix for the GHAs matrix job. The values in | ||
# config.yaml are injected into each matrix entry according to its `ENV` key. | ||
|
||
yq -o json \ | ||
eval-all \ | ||
'{"matrix": select(filename == "matrix.yaml")} + {"config": select(filename == "config.yaml")}' \ | ||
matrix.yaml config.yaml | \ | ||
jq -c 'include "ci/compute-matrix"; compute_matrix(.matrix; .config)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
aws: | ||
domain: arc-eks | ||
packer_source: amazon-ebs | ||
premise: | ||
domain: arc-nvks | ||
packer_source: qemu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
locals { | ||
timestamp = regex_replace(timestamp(), "[- TZ:]", "") | ||
driver_major_version = var.variant == "cpu" ? null : "${split(".", var.driver_version)[0]}" | ||
variant = var.driver_version == "" ? "cpu" : "gpu" | ||
driver_major_version = local.variant == "cpu" ? null : "${split(".", var.driver_version)[0]}" | ||
instance_type = var.arch == "amd64" ? "m7i.large" : "m7g.large" | ||
helpers_directory = "/home/runner/helpers" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
// os = "linux" | ||
runner_version = "2.311.0" | ||
// skip_create_ami = true | ||
// variant = "gpu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters