1
1
on :
2
2
workflow_call :
3
- inputs :
4
- host-platform :
5
- type : string
6
- required : true
7
- python-version :
8
- type : string
9
- required : true
10
- cuda-version :
11
- type : string
12
- required : true
13
3
14
4
jobs :
15
5
build :
16
- name : Build (${{ inputs.host-platform }}, Python "${{ inputs.python-version }}")
6
+ strategy :
7
+ fail-fast : false
8
+ matrix :
9
+ # TODO: align host-platform names with conda convention
10
+ host-platform :
11
+ - linux-x64
12
+ - linux-aarch64
13
+ - win-x64
14
+ python-version :
15
+ - " 3.13"
16
+ - " 3.12"
17
+ - " 3.11"
18
+ - " 3.10"
19
+ - " 3.9"
20
+ cuda-version :
21
+ # Note: this is for build-time only; the test-time matrix needs to be
22
+ # defined separately.
23
+ - " 12.6.2"
24
+ name : Build (${{ matrix.host-platform }}, Python "${{ matrix.python-version }}")
17
25
if : ${{ github.repository_owner == 'nvidia' }}
18
26
permissions :
19
27
id-token : write # This is required for configure-aws-credentials
20
28
contents : read # This is required for actions/checkout
21
- runs-on : ${{ (inputs .host-platform == 'linux-x64' && 'linux-amd64-cpu8') ||
22
- (inputs .host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||
23
- (inputs .host-platform == 'win-x64' && 'windows-2019') }}
24
- # (inputs .host-platform == 'win-x64' && 'windows-amd64-cpu8') }}
29
+ runs-on : ${{ (matrix .host-platform == 'linux-x64' && 'linux-amd64-cpu8') ||
30
+ (matrix .host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||
31
+ (matrix .host-platform == 'win-x64' && 'windows-2019') }}
32
+ # (matrix .host-platform == 'win-x64' && 'windows-amd64-cpu8') }}
25
33
outputs :
26
34
CUDA_CORE_ARTIFACT_NAME : ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACT_NAME }}
27
35
CUDA_CORE_ARTIFACTS_DIR : ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACTS_DIR }}
@@ -35,34 +43,34 @@ jobs:
35
43
36
44
# WAR: setup-python is not relocatable...
37
45
# see https://github.com/actions/setup-python/issues/871
38
- - name : Set up Python ${{ inputs .python-version }}
39
- if : ${{ startsWith(inputs .host-platform, 'linux') }}
46
+ - name : Set up Python ${{ matrix .python-version }}
47
+ if : ${{ startsWith(matrix .host-platform, 'linux') }}
40
48
id : setup-python
41
49
uses : actions/setup-python@v5
42
50
with :
43
51
python-version : " 3.12"
44
52
45
53
- name : Set up MSVC
46
- if : ${{ startsWith(inputs .host-platform, 'win') }}
54
+ if : ${{ startsWith(matrix .host-platform, 'win') }}
47
55
uses : ilammy/msvc-dev-cmd@v1
48
56
49
57
- name : Set environment variables
50
58
shell : bash --noprofile --norc -xeuo pipefail {0}
51
59
run : |
52
- PYTHON_VERSION_FORMATTED=$(echo '${{ inputs .python-version }}' | tr -d '.')
53
- if [[ "${{ inputs .host-platform }}" == linux* ]]; then
60
+ PYTHON_VERSION_FORMATTED=$(echo '${{ matrix .python-version }}' | tr -d '.')
61
+ if [[ "${{ matrix .host-platform }}" == linux* ]]; then
54
62
CIBW_BUILD="cp${PYTHON_VERSION_FORMATTED}-manylinux*"
55
63
REPO_DIR=$(pwd)
56
- elif [[ "${{ inputs .host-platform }}" == win* ]]; then
64
+ elif [[ "${{ matrix .host-platform }}" == win* ]]; then
57
65
CIBW_BUILD="cp${PYTHON_VERSION_FORMATTED}-win_amd64"
58
66
PWD=$(pwd)
59
67
REPO_DIR=$(cygpath -w $PWD)
60
68
fi
61
69
62
70
echo "PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV
63
- echo "CUDA_CORE_ARTIFACT_NAME=cuda-core-python${PYTHON_VERSION_FORMATTED}-${{ inputs .host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
71
+ echo "CUDA_CORE_ARTIFACT_NAME=cuda-core-python${PYTHON_VERSION_FORMATTED}-${{ matrix .host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
64
72
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
65
- echo "CUDA_BINDINGS_ARTIFACT_NAME=cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs .cuda-version }}-${{ inputs .host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
73
+ echo "CUDA_BINDINGS_ARTIFACT_NAME=cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ matrix .cuda-version }}-${{ matrix .host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
66
74
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
67
75
echo "CIBW_BUILD=${CIBW_BUILD}" >> $GITHUB_ENV
68
76
84
92
- name : List the cuda.core artifacts directory
85
93
shell : bash --noprofile --norc -xeuo pipefail {0}
86
94
run : |
87
- if [[ "${{ inputs .host-platform }}" == win* ]]; then
95
+ if [[ "${{ matrix .host-platform }}" == win* ]]; then
88
96
export CHOWN=chown
89
97
else
90
98
export CHOWN="sudo chown"
@@ -110,8 +118,8 @@ jobs:
110
118
uses : ./.github/actions/fetch_ctk
111
119
continue-on-error : false
112
120
with :
113
- host-platform : ${{ inputs .host-platform }}
114
- cuda-version : ${{ inputs .cuda-version }}
121
+ host-platform : ${{ matrix .host-platform }}
122
+ cuda-version : ${{ matrix .cuda-version }}
115
123
fail-on-ctk-cache-miss : false
116
124
117
125
- name : Build cuda.bindings wheel
@@ -134,7 +142,7 @@ jobs:
134
142
- name : List the cuda.bindings artifacts directory
135
143
shell : bash --noprofile --norc -xeuo pipefail {0}
136
144
run : |
137
- if [[ "${{ inputs .host-platform }}" == win* ]]; then
145
+ if [[ "${{ matrix .host-platform }}" == win* ]]; then
138
146
export CHOWN=chown
139
147
else
140
148
export CHOWN="sudo chown"
@@ -165,16 +173,34 @@ jobs:
165
173
echo "CUDA_BINDINGS_ARTIFACTS_DIR=${CUDA_BINDINGS_ARTIFACTS_DIR}" >> $GITHUB_OUTPUT
166
174
167
175
test :
168
- # TODO: improve the name once a separate test matrix is defined
169
- name : Test (CUDA ${{ inputs.cuda-version }})
176
+ strategy :
177
+ fail-fast : false
178
+ matrix :
179
+ # TODO: align host-platform names with conda convention
180
+ host-platform :
181
+ - linux-x64
182
+ - linux-aarch64
183
+ - win-x64
184
+ python-version :
185
+ - " 3.13"
186
+ - " 3.12"
187
+ - " 3.11"
188
+ - " 3.10"
189
+ - " 3.9"
190
+ cuda-version :
191
+ # Note: this is for test-time only.
192
+ - " 12.6.2"
193
+ - " 12.0.1"
194
+ - " 11.8.0"
195
+ name : Test (${{ matrix.host-platform }}, CUDA ${{ matrix.cuda-version }}, Python "${{ matrix.python-version }}")
170
196
# TODO: enable testing once win-64 GPU runners are up
171
197
if : ${{ (github.repository_owner == 'nvidia') &&
172
- startsWith(inputs .host-platform, 'linux') }}
198
+ startsWith(matrix .host-platform, 'linux') }}
173
199
permissions :
174
200
id-token : write # This is required for configure-aws-credentials
175
201
contents : read # This is required for actions/checkout
176
- runs-on : ${{ (inputs .host-platform == 'linux-x64' && 'linux-amd64-gpu-v100-latest-1') ||
177
- (inputs .host-platform == 'linux-aarch64' && 'linux-arm64-gpu-a100-latest-1') }}
202
+ runs-on : ${{ (matrix .host-platform == 'linux-x64' && 'linux-amd64-gpu-v100-latest-1') ||
203
+ (matrix .host-platform == 'linux-aarch64' && 'linux-arm64-gpu-a100-latest-1') }}
178
204
# Our self-hosted runners require a container
179
205
# TODO: use a different (nvidia?) container
180
206
container :
@@ -227,10 +253,10 @@ jobs:
227
253
pwd
228
254
ls -lahR $CUDA_CORE_ARTIFACTS_DIR
229
255
230
- - name : Set up Python ${{ inputs .python-version }}
256
+ - name : Set up Python ${{ matrix .python-version }}
231
257
uses : actions/setup-python@v5
232
258
with :
233
- python-version : ${{ inputs .python-version }}
259
+ python-version : ${{ matrix .python-version }}
234
260
235
261
# The cache action needs this
236
262
- name : Install zstd
@@ -243,8 +269,8 @@ jobs:
243
269
uses : ./.github/actions/fetch_ctk
244
270
continue-on-error : false
245
271
with :
246
- host-platform : ${{ inputs .host-platform }}
247
- cuda-version : ${{ inputs .cuda-version }}
272
+ host-platform : ${{ matrix .host-platform }}
273
+ cuda-version : ${{ matrix .cuda-version }}
248
274
fail-on-ctk-cache-miss : true
249
275
250
276
- name : Run test / analysis
0 commit comments