Skip to content

Commit

Permalink
build: test nightly nogil on 3.13 and 3.14 also
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jun 6, 2024
1 parent 7130aea commit ed22639
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/python-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concurrency:

jobs:
tests:
name: "${{ matrix.python-version }} on ${{ matrix.os-short }}"
name: "${{ matrix.python-version }}${{ matrix.nogil && ' nogil' || '' }} on ${{ matrix.os-short }}"
runs-on: "${{ matrix.os }}"
# If it doesn't finish in an hour, it's not going to. Don't spin for six
# hours needlessly.
Expand Down Expand Up @@ -63,21 +63,43 @@ jobs:
- "pypy-3.8-nightly"
- "pypy-3.9-nightly"
- "pypy-3.10-nightly"
nogil:
- false
# nogil fails for now. hugovk says it's because:
# > pip hasn't vendored the new version of packaging yet.
# > it should be in 24.1, due some time this month.
- true
include:
- python-version: "pypy-3.10-nightly"
os: "windows-latest"
os-short: "windows"
- python-version: "pypy-3.10-nightly"
os: "windows-latest"
os-short: "windows"
exclude:
- python-version: "3.12-dev"
nogil: true
- python-version: "pypy-3.8-nightly"
nogil: true
- python-version: "pypy-3.9-nightly"
nogil: true
- python-version: "pypy-3.10-nightly"
nogil: true

fail-fast: false

steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"

- name: "Set PYTHON_GIL"
if: "${{ matrix.nogil }}"
run: |
echo "PYTHON_GIL=0" >> $GITHUB_ENV
- name: "Install ${{ matrix.python-version }} with deadsnakes"
uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494
if: "!startsWith(matrix.python-version, 'pypy-')"
with:
python-version: "${{ matrix.python-version }}"
nogil: "${{ matrix.nogil || false }}"

- name: "Install ${{ matrix.python-version }} with setup-python"
uses: "actions/setup-python@v5"
Expand All @@ -90,6 +112,7 @@ jobs:
set -xe
python -VV
python -m site
python -c "import sys; print('GIL:', getattr(sys, '_is_gil_enabled', lambda: True)())"
python -m coverage debug sys
python -m coverage debug pybehave
env
Expand Down
1 change: 1 addition & 0 deletions coverage/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ def plugin_info(plugins: list[Any]) -> list[str]:
("python", sys.version.replace("\n", "")),
("platform", platform.platform()),
("implementation", platform.python_implementation()),
("gil_enabled", getattr(sys, '_is_gil_enabled', lambda: True)()),
("executable", sys.executable),
("def_encoding", sys.getdefaultencoding()),
("fs_encoding", sys.getfilesystemencoding()),
Expand Down

0 comments on commit ed22639

Please sign in to comment.