Skip to content

Commit

Permalink
Add CI job for free-threaded build
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Aug 6, 2024
1 parent a654993 commit b763c5a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,36 @@ jobs:
echo PYO3_CONFIG_FILE=$PYO3_CONFIG_FILE >> $GITHUB_ENV
- run: python3 -m nox -s test

test-free-threaded:
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
needs: [fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}
- uses: dtolnay/rust-toolchain
with:
components: rust-src
# TODO: replace with setup-python when there is support
- uses: deadsnakes/[email protected]
with:
python-version: '3.13-dev'
nogil: true
- run: python3 -m sysconfig
- run: python3 -m pip install --upgrade pip && pip install nox
- name: Run nox sessions that should pass
env:
UNSAFE_PYO3_BUILD_FREE_THREADED: 1
run: nox -s ffi-check clippy docs rustfmt ruff
- name: Run PyO3 tests with free-threaded Python (can fail)
# TODO fix the test crashes so we can unset this
continue-on-error: true
env:
UNSAFE_PYO3_BUILD_FREE_THREADED: 1
run: nox -s test

test-version-limits:
needs: [fmt]
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -627,6 +657,7 @@ jobs:
- coverage
- emscripten
- test-debug
- test-free-threaded
- test-version-limits
- check-feature-powerset
- test-cross-compilation
Expand Down

0 comments on commit b763c5a

Please sign in to comment.