Skip to content

Commit 4323f61

Browse files
committed
add test jobs against CUDA wheels
1 parent 5015410 commit 4323f61

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

.github/workflows/build-and-test.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ jobs:
198198
- "12.6.2"
199199
- "12.0.1"
200200
- "11.8.0"
201+
local-ctk:
202+
- 1 # use mini CTK
203+
- 0 # use CTK wheels
201204
runner:
202205
- default
203206
include:
@@ -214,12 +217,13 @@ jobs:
214217
- build
215218
secrets: inherit
216219
uses:
217-
./.github/workflows/test_local_ctk.yml
220+
./.github/workflows/test-wheel.yml
218221
with:
219222
host-platform: ${{ matrix.host-platform }}
220223
python-version: ${{ matrix.python-version }}
221-
build_ctk_ver: ${{ needs.build.outputs.BUILD_CTK_VER }}
224+
build-ctk-ver: ${{ needs.build.outputs.BUILD_CTK_VER }}
222225
cuda-version: ${{ matrix.cuda-version }}
226+
local-ctk: ${{ matrix.local-ctk}}
223227
runner: ${{ matrix.runner }}
224228

225229
doc:
@@ -236,4 +240,4 @@ jobs:
236240
uses:
237241
./.github/workflows/build-docs.yml
238242
with:
239-
build_ctk_ver: ${{ needs.build.outputs.BUILD_CTK_VER }}
243+
build-ctk-ver: ${{ needs.build.outputs.BUILD_CTK_VER }}

.github/workflows/build-docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "CI: Build and update docs"
33
on:
44
workflow_call:
55
inputs:
6-
build_ctk_ver:
6+
build-ctk-ver:
77
type: string
88
required: true
99

@@ -53,7 +53,7 @@ jobs:
5353
continue-on-error: false
5454
with:
5555
host-platform: linux-64
56-
cuda-version: ${{ inputs.build_ctk_ver }}
56+
cuda-version: ${{ inputs.build-ctk-ver }}
5757

5858
- name: Set environment variables
5959
run: |
@@ -65,7 +65,7 @@ jobs:
6565
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
6666
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
6767
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
68-
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build_ctk_ver }}-linux-64"
68+
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build-ctk-ver }}-linux-64"
6969
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
7070
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
7171
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV

.github/workflows/test_local_ctk.yml renamed to .github/workflows/test-wheel.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "CI: Test against local CTK"
1+
name: "CI: Test wheels"
22

33
on:
44
workflow_call:
@@ -9,12 +9,15 @@ on:
99
python-version:
1010
type: string
1111
required: true
12-
build_ctk_ver:
12+
build-ctk-ver:
1313
type: string
1414
required: true
1515
cuda-version:
1616
type: string
1717
required: true
18+
local-ctk:
19+
type: string
20+
required: true
1821
runner:
1922
type: string
2023
required: true
@@ -55,7 +58,7 @@ jobs:
5558
REPO_DIR=$(cygpath -w $PWD)
5659
fi
5760
58-
BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ inputs.build_ctk_ver }})"
61+
BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ inputs.build-ctk-ver }})"
5962
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"
6063
if [[ $BUILD_CUDA_MAJOR != $TEST_CUDA_MAJOR ]]; then
6164
SKIP_CUDA_BINDINGS_TEST=1
@@ -69,7 +72,7 @@ jobs:
6972
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
7073
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
7174
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
72-
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build_ctk_ver }}-${{ inputs.host-platform }}"
75+
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build-ctk-ver }}-${{ inputs.host-platform }}"
7376
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
7477
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
7578
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
@@ -138,6 +141,7 @@ jobs:
138141
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"
139142

140143
- name: Set up mini CTK
144+
if: ${{ inputs.local-ctk == '1' }}
141145
uses: ./.github/actions/fetch_ctk
142146
continue-on-error: false
143147
with:
@@ -150,7 +154,11 @@ jobs:
150154
ls $CUDA_PATH
151155
152156
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
153-
pip install *.whl
157+
if [[ "${{ inputs.local-ctk }}" == 1 ]]; then
158+
pip install *.whl
159+
else
160+
pip install $(ls *.whl)[all]
161+
fi
154162
popd
155163
156164
pushd ./cuda_bindings
@@ -171,7 +179,11 @@ jobs:
171179
# If mismatch: cuda.bindings is installed from the backport branch.
172180
if [[ "${SKIP_CUDA_BINDINGS_TEST}" == 1 ]]; then
173181
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
174-
pip install *.whl
182+
if [[ "${{ inputs.local-ctk }}" == 1 ]]; then
183+
pip install *.whl
184+
else
185+
pip install $(ls *.whl)[all]
186+
fi
175187
popd
176188
fi
177189
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"

0 commit comments

Comments
 (0)