Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
Loading