diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68d62abd035..2a4db0e9ece 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,10 @@ on: type: boolean default: false +env: + NOX_DEFAULT_VENV_BACKEND: uv + UV_PYTHON: ${{ inputs.python-version }} + jobs: build: continue-on-error: ${{ endsWith(inputs.python-version, '-dev') || contains(fromJSON('["3.7", "3.8"]'), inputs.python-version) || contains(fromJSON('["beta", "nightly"]'), inputs.rust) }} @@ -48,8 +52,7 @@ jobs: # PyPy can have FFI changes within Python versions, which creates pain in CI check-latest: ${{ startsWith(inputs.python-version, 'pypy') }} - - name: Install nox - run: python -m pip install --upgrade pip && pip install nox + - uses: astral-sh/setup-uv@v6 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@master @@ -90,7 +93,7 @@ jobs: - if: inputs.rust == inputs.MSRV name: Prepare MSRV package versions - run: nox -s set-msrv-package-versions + run: uvx nox -s set-msrv-package-versions - if: inputs.rust != 'stable' name: Ignore changed error messages when using trybuild @@ -112,7 +115,7 @@ jobs: - name: Run pyo3-ffi-check # pypy 3.9 on windows is not PEP 3123 compliant, nor is graalpy if: ${{ endsWith(inputs.python-version, '-dev') || (steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy') && !(inputs.python-version == 'pypy3.9' && contains(inputs.os, 'windows'))) }} - run: nox -s ffi-check + run: uvx nox -s ffi-check - if: ${{ github.event_name != 'merge_group' }} name: Install cargo-llvm-cov @@ -122,17 +125,17 @@ jobs: name: Prepare coverage environment run: | cargo llvm-cov clean --workspace --profraw-only - nox -s set-coverage-env + uvx nox -s set-coverage-env - name: Build docs - run: nox -s docs + run: uvx nox -s docs - name: Run Rust tests - run: nox -s test-rust + run: uvx nox -s test-rust - name: Test python examples and tests shell: bash - run: nox -s test-py + run: uvx nox -s test-py env: CARGO_TARGET_DIR: ${{ github.workspace }}/target