Skip to content

Commit 727ef59

Browse files
committed
Derive reusable artifact platforms from test matrix
1 parent fba3b4d commit 727ef59

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,20 @@ jobs:
195195
if ! python_versions=$(yq -r '.jobs.build.strategy.matrix."python-version"[]' .github/workflows/build-wheel.yml); then
196196
unavailable
197197
fi
198-
if [[ -z "${python_versions}" ]]; then
198+
if ! platforms=$(yq -r '.platforms[]' ci/test-matrix.yml); then
199+
unavailable
200+
fi
201+
if [[ -z "${python_versions}" || -z "${platforms}" ]]; then
199202
unavailable
200203
fi
201204
while IFS= read -r python_version; do
202205
python=${python_version//./}
203-
for platform in linux-64 linux-aarch64 win-64; do
206+
while IFS= read -r platform; do
204207
binding="cuda-bindings-python${python}-cuda${cuda_version}-${platform}-${merge_base}"
205208
core="cuda-core-python${python}-${platform}-${merge_base}"
206209
has_artifact "$binding" || missing+=("$binding")
207210
has_artifact "$core" || missing+=("$core")
208-
done
211+
done <<< "${platforms}"
209212
done <<< "${python_versions}"
210213
211214
if (( ${#missing[@]} != 0 )); then

‎ci/test-matrix.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
# ENV: { CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM: '1' }
3333
# ENV: { MODE: 'nightly-pytorch', TORCH_VER: '2.12.1', TORCH_CUDA: 'cu126' }
3434

35+
# Host platforms that produce wheel artifacts in the main CI workflow.
36+
platforms:
37+
- linux-64
38+
- linux-aarch64
39+
- win-64
40+
3541
linux:
3642
pull-request:
3743
# linux-64

0 commit comments

Comments
 (0)