Skip to content

Commit 61813fa

Browse files
committed
Recompute the job outputs in test instead of reusing
the build/test matrices now mismatch, so it's no longer safe to keep the one-to-one relation
1 parent 478acff commit 61813fa

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

.github/actions/fetch_ctk/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ inputs:
99
cuda-version:
1010
required: true
1111
type: string
12-
fail-on-ctk-cache-miss:
13-
required: true
14-
type: boolean
1512

1613
runs:
1714
using: composite
@@ -29,7 +26,7 @@ runs:
2926
with:
3027
key: ${{ env.CTK_CACHE_KEY }}
3128
path: ./${{ env.CTK_CACHE_FILENAME }}
32-
fail-on-cache-miss: ${{ inputs.fail-on-ctk-cache-miss }}
29+
fail-on-cache-miss: false
3330

3431
- name: Get CUDA components
3532
if: ${{ steps.ctk-get-cache.outputs.cache-hit != 'true' }}

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ jobs:
2929
(matrix.host-platform == 'win-x64' && 'windows-2019') }}
3030
# (matrix.host-platform == 'win-x64' && 'windows-amd64-cpu8') }}
3131
outputs:
32-
CUDA_CORE_ARTIFACT_NAME: ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACT_NAME }}
33-
CUDA_CORE_ARTIFACTS_DIR: ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACTS_DIR }}
34-
CUDA_BINDINGS_ARTIFACT_NAME: ${{ steps.pass_env.outputs.CUDA_BINDINGS_ARTIFACT_NAME }}
35-
CUDA_BINDINGS_ARTIFACTS_DIR: ${{ steps.pass_env.outputs.CUDA_BINDINGS_ARTIFACTS_DIR }}
32+
BUILD_CTK_VER: ${{ steps.pass_env.outputs.CUDA_VERSION }}
3633
steps:
3734
- name: Checkout ${{ github.event.repository.name }}
3835
uses: actions/checkout@v4
@@ -118,7 +115,6 @@ jobs:
118115
with:
119116
host-platform: ${{ matrix.host-platform }}
120117
cuda-version: ${{ matrix.cuda-version }}
121-
fail-on-ctk-cache-miss: false
122118

123119
- name: Build cuda.bindings wheel
124120
uses: pypa/[email protected]
@@ -165,10 +161,7 @@ jobs:
165161
- name: Pass environment variables to the next runner
166162
id: pass_env
167163
run: |
168-
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_NAME}" >> $GITHUB_OUTPUT
169-
echo "CUDA_CORE_ARTIFACTS_DIR=${CUDA_CORE_ARTIFACTS_DIR}" >> $GITHUB_OUTPUT
170-
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_NAME}" >> $GITHUB_OUTPUT
171-
echo "CUDA_BINDINGS_ARTIFACTS_DIR=${CUDA_BINDINGS_ARTIFACTS_DIR}" >> $GITHUB_OUTPUT
164+
echo "CUDA_VERSION=${{ matrix.cuda-version }}" >> $GITHUB_OUTPUT
172165
173166
test:
174167
strategy:
@@ -217,14 +210,22 @@ jobs:
217210
with:
218211
fetch-depth: 0
219212

220-
- name: Set up test environment
213+
- name: Set environment variables
221214
shell: bash --noprofile --norc -xeuo pipefail {0}
222215
run: |
216+
PYTHON_VERSION_FORMATTED=$(echo '${{ matrix.python-version }}' | tr -d '.')
217+
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
218+
REPO_DIR=$(pwd)
219+
elif [[ "${{ matrix.host-platform }}" == win* ]]; then
220+
PWD=$(pwd)
221+
REPO_DIR=$(cygpath -w $PWD)
222+
fi
223+
223224
# make outputs from the previous job as env vars
224-
echo "CUDA_CORE_ARTIFACT_NAME=${{ needs.build.outputs.CUDA_CORE_ARTIFACT_NAME }}" >> $GITHUB_ENV
225-
echo "CUDA_CORE_ARTIFACTS_DIR=${{ needs.build.outputs.CUDA_CORE_ARTIFACTS_DIR }}" >> $GITHUB_ENV
226-
echo "CUDA_BINDINGS_ARTIFACT_NAME=${{ needs.build.outputs.CUDA_BINDINGS_ARTIFACT_NAME }}" >> $GITHUB_ENV
227-
echo "CUDA_BINDINGS_ARTIFACTS_DIR=${{ needs.build.outputs.CUDA_BINDINGS_ARTIFACTS_DIR }}" >> $GITHUB_ENV
225+
echo "CUDA_CORE_ARTIFACT_NAME=cuda-core-python${PYTHON_VERSION_FORMATTED}-${{ matrix.host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
226+
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
227+
echo "CUDA_BINDINGS_ARTIFACT_NAME=cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ needs.build.outputs.BUILD_CTK_VER }}-${{ matrix.host-platform }}-${{ github.sha }}" >> $GITHUB_ENV
228+
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
228229
229230
- name: Download bindings build artifacts
230231
uses: actions/download-artifact@v4
@@ -268,7 +269,6 @@ jobs:
268269
with:
269270
host-platform: ${{ matrix.host-platform }}
270271
cuda-version: ${{ matrix.cuda-version }}
271-
fail-on-ctk-cache-miss: true
272272

273273
- name: Run test / analysis
274274
shell: bash --noprofile --norc -xeuo pipefail {0}

0 commit comments

Comments
 (0)