Skip to content

Commit dfdf260

Browse files
kkraus14cursoragent
andcommitted
Activate venv via GITHUB_PATH in build-wheel
Add .venv/bin and .venv/Scripts to GITHUB_PATH in the Create venv step so the venv is activated for all subsequent steps. Removes the per-step PATH export hack from the Cython test build steps. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3e32125 commit dfdf260

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build-wheel.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,12 @@ jobs:
327327
328328
# Create a fresh venv for the matrix Python (differs from the 3.12 used
329329
# during the build phase above).
330-
- name: Create venv
331-
run: uv venv
330+
- name: Create and activate venv
331+
run: |
332+
uv venv
333+
echo "${GITHUB_WORKSPACE}/.venv/bin" >> $GITHUB_PATH
334+
echo "${GITHUB_WORKSPACE}/.venv/Scripts" >> $GITHUB_PATH
335+
echo "VIRTUAL_ENV=${GITHUB_WORKSPACE}/.venv" >> $GITHUB_ENV
332336
333337
- name: Install test deps and wheels for Cython tests
334338
run: |
@@ -341,7 +345,6 @@ jobs:
341345
342346
- name: Build cuda.bindings Cython tests
343347
run: |
344-
export PATH="${GITHUB_WORKSPACE}/.venv/bin:${GITHUB_WORKSPACE}/.venv/Scripts:${PATH}"
345348
pushd ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}
346349
bash build_tests.sh
347350
popd
@@ -355,7 +358,6 @@ jobs:
355358

356359
- name: Build cuda.core Cython tests
357360
run: |
358-
export PATH="${GITHUB_WORKSPACE}/.venv/bin:${GITHUB_WORKSPACE}/.venv/Scripts:${PATH}"
359361
pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
360362
bash build_tests.sh
361363
popd

0 commit comments

Comments
 (0)