-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
10 changed files
with
196 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,89 @@ | ||
include "ci/shared"; | ||
|
||
# CI specific computations | ||
def compute_ci($x): | ||
def compute_ci_arch($x): | ||
["amd64"] | | ||
if | ||
$x.CUDA_VER > "11.2.2" and | ||
$x.LINUX_VER != "centos7" | ||
then | ||
. + ["arm64"] | ||
else | ||
. | ||
end | | ||
$x + {ARCHES: .}; | ||
|
||
def compute_image_name($x): | ||
compute_repo($x) as $repo | | ||
compute_tag_prefix($x) as $tag_prefix | | ||
"rapidsai/" + $repo + ":" + $tag_prefix + "cuda" + $x.CUDA_VER + "-" + $x.LINUX_VER + "-" + "py" + $x.PYTHON_VER | | ||
$x + {IMAGE_NAME: .}; | ||
|
||
($x.exclude // []) as $excludes | | ||
$x | del(.exclude) | | ||
keys_unsorted as $matrix_keys | | ||
to_entries | | ||
map(.value) | | ||
[ | ||
combinations | | ||
lists2dict($matrix_keys; .) | | ||
filter_excludes(.; $excludes) | | ||
compute_ci_arch(.) | | ||
compute_image_name(.) | ||
] | | ||
{include: .}; | ||
|
||
# Wheels specific computations | ||
def compute_wheels($x): | ||
def compute_wheels_arch($x): | ||
["amd64"] | | ||
if | ||
["ubuntu18.04", "centos7"] | index($x.LINUX_VER) != null | ||
then | ||
. | ||
else | ||
. + ["arm64"] | ||
end | | ||
$x + {ARCHES: .}; | ||
|
||
def compute_manylinux_version($x): | ||
if | ||
["ubuntu18.04", "ubuntu20.04"] | index($x.LINUX_VER) != null | ||
then | ||
"manylinux_2_31" | ||
else | ||
"manylinux_2_17" | ||
end | | ||
$x + {MANYLINUX_VER: .}; | ||
|
||
def compute_image_name($x): | ||
compute_repo($x) as $repo | | ||
compute_tag_prefix($x) as $tag_prefix | | ||
"rapidsai/" + $repo + ":" + $tag_prefix + "cuda" + $x.CUDA_VER + "-" + $x.LINUX_VER + "-" + "py" + $x.PYTHON_VER | | ||
$x + {IMAGE_NAME: .}; | ||
|
||
($x.exclude // []) as $excludes | | ||
$x | del(.exclude) | | ||
keys_unsorted as $matrix_keys | | ||
to_entries | | ||
map(.value) | | ||
[ | ||
combinations | | ||
lists2dict($matrix_keys; .) | | ||
filter_excludes(.; $excludes) | | ||
compute_wheels_arch(.) | | ||
compute_manylinux_version(.) | | ||
compute_image_name(.) | ||
] | | ||
{include: .}; | ||
|
||
# Main function to compute matrix | ||
def compute_matrix($type; $input): | ||
if $type == "ci" then | ||
compute_ci($input) | ||
elif $type == "wheels" then | ||
compute_wheels($input) | ||
else | ||
error("Unknown matrix type: " + $type) | ||
end; |
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 was deleted.
Oops, something went wrong.
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,30 @@ | ||
def compute_repo($x): | ||
if | ||
env.BUILD_TYPE == "pull-request" | ||
then | ||
"staging" | ||
else | ||
$x.IMAGE_REPO | ||
end; | ||
|
||
# Compute tag prefix | ||
def compute_tag_prefix($x): | ||
if | ||
env.BUILD_TYPE == "branch" | ||
then | ||
"" | ||
else | ||
$x.IMAGE_REPO + "-" + env.PR_NUM + "-" | ||
end; | ||
|
||
# Checks the current entry to see if it matches the given exclude | ||
def matches($entry; $exclude): | ||
all($exclude | to_entries | .[]; $entry[.key] == .value); | ||
|
||
# Checks the current entry to see if it matches any of the excludes. | ||
def filter_excludes($entry; $excludes): | ||
select(any($excludes[]; matches($entry; .)) | not); | ||
|
||
# Convert lists to dictionary | ||
def lists2dict($keys; $values): | ||
reduce range($keys | length) as $ind ({}; . + {($keys[$ind]): $values[$ind]}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.