Skip to content

Commit 7d357f9

Browse files
gforsythbdice
andauthored
Add option for pure-conda: cuda_major (#462)
Co-authored-by: Bradley Dice <[email protected]>
1 parent c211b51 commit 7d357f9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/conda-python-build.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ on:
6262
artifacts from other private repos, which repo tokens do not have access to.
6363
pure-conda:
6464
required: false
65-
type: boolean
66-
default: false
65+
type: string
66+
default: "false"
6767
description: |
68-
"One of [true, false], true if the conda package is not dependent on
69-
operating system, Python minor version, CPU architecture, or CUDA
70-
version"
68+
"One of [true, false, cuda_major]. 'true' if the conda package is not
69+
dependent on operating system, Python minor version, CPU architecture,
70+
or CUDA version. 'cuda_major' if the package is not dependent on
71+
operating system, Python minor version, or CPU architecture, but is
72+
dependent on CUDA major version."
7173
7274
defaults:
7375
run:
@@ -131,8 +133,8 @@ jobs:
131133
# When pure-conda is true and matrix_filter is default, override to build one conda package with amd64, latest CUDA_VER, and the latest PY_VER
132134
if [ "${PURE_CONDA}" = "true" ] && [ "${MATRIX_FILTER}" = "." ]; then
133135
MATRIX_FILTER="map(select(.ARCH == \"amd64\")) | sort_by(.CUDA_VER, .PY_VER) | [last]"
134-
else
135-
MATRIX_FILTER="${MATRIX_FILTER}"
136+
elif [ "${PURE_CONDA}" = "cuda_major" ] && [ "${MATRIX_FILTER}" = "." ]; then
137+
MATRIX_FILTER="map(select(.ARCH == \"amd64\")) | group_by(.CUDA_VER|split(\".\")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(\".\")|map(tonumber)), (.CUDA_VER|split(\".\")|map(tonumber))]))"
136138
fi
137139
138140
MATRIX="$(
@@ -219,7 +221,8 @@ jobs:
219221
- name: Python build
220222
id: python-build
221223
run: |
222-
source $INPUTS_SCRIPT
224+
# shellcheck disable=SC1090
225+
source "${INPUTS_SCRIPT}"
223226
224227
# Capture RAPIDS_PACKAGE_NAME if set by the build script
225228
if [[ -n "${RAPIDS_PACKAGE_NAME:-}" ]]; then

.github/workflows/wheels-build.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ jobs:
162162
# When pure-wheel is true and matrix_filter is default, override to build one wheel per CUDA version with amd64 and the latest PY_VER
163163
if [ "${PURE_WHEEL}" = "true" ] && [ "${MATRIX_FILTER}" = "." ]; then
164164
MATRIX_FILTER="map(select(.ARCH == \"amd64\")) | group_by(.CUDA_VER) | map(max_by(.PY_VER | split(\".\") | map(tonumber)))"
165-
else
166-
MATRIX_FILTER="${MATRIX_FILTER}"
167165
fi
168166
169167
MATRIX="$(
@@ -271,7 +269,8 @@ jobs:
271269
- name: Build and repair the wheel
272270
id: build-wheel
273271
run: |
274-
source $INPUTS_SCRIPT
272+
# shellcheck disable=SC1090
273+
source "${INPUTS_SCRIPT}"
275274
276275
# Capture RAPIDS_PACKAGE_NAME if set by the build script
277276
if [[ -n "${RAPIDS_PACKAGE_NAME:-}" ]]; then

0 commit comments

Comments
 (0)