@@ -31,52 +31,29 @@ concurrency:
3131
3232jobs :
3333 tests :
34- name : " ${{ matrix.python-version }}${{ matrix.nogil && ' nogil' || '' }} on ${{ matrix.os-short }} "
34+ name : " ${{ matrix.python-version }}"
3535 runs-on : " ${{ matrix.os }}"
3636 # If it doesn't finish in an hour, it's not going to. Don't spin for six
3737 # hours needlessly.
3838 timeout-minutes : 60
3939
4040 env :
41- TOX_GH_MAJOR_MINOR : " ${{ matrix.python-version }}${{ matrix.nogil && 't' || '' }} "
41+ TOX_GH_MAJOR_MINOR : " ${{ matrix.python-version }}"
4242
4343 strategy :
4444 matrix :
4545 os :
46- # Choose a recent Ubuntu that deadsnakes still builds all the versions for.
47- # For example, deadsnakes doesn't provide 3.10 nightly for 22.04 (jammy)
48- # because jammy ships 3.10, and deadsnakes doesn't want to clobber it.
49- # https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly/+packages
50- # https://github.com/deadsnakes/issues/issues/234
51- # See https://github.com/deadsnakes/nightly for the source of the nightly
52- # builds.
53- # bionic: 18, focal: 20, jammy: 22, noble: 24
54- - " ubuntu-22.04"
55- os-short :
56- - " ubuntu"
46+ - " ubuntu-latest"
5747 python-version :
5848 # When changing this list, be sure to check the [gh] list in
5949 # tox.ini so that tox will run properly. PYVERSIONS
60- # Available versions:
61- # https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly/+packages
6250 - " 3.12"
6351 - " 3.13"
52+ - " 3.13t"
6453 - " 3.14"
54+ - " 3.14t"
6555 - " 3.15"
66- # https://github.com/actions/setup-python#available-versions-of-pypy
67- - " pypy-3.11"
68- nogil :
69- - false
70- - true
71- # include:
72- # - python-version: "pypy-3.11"
73- # os: "windows-latest"
74- # os-short: "windows"
75- exclude :
76- - python-version : " 3.12"
77- nogil : true
78- - python-version : " pypy-3.11"
79- nogil : true
56+ - " 3.15t"
8057
8158 fail-fast : false
8259
@@ -86,18 +63,28 @@ jobs:
8663 with :
8764 persist-credentials : false
8865
89- - name : " Install ${{ matrix.python-version }} with deadsnakes"
90- uses : deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
91- if : " !startsWith(matrix.python-version, 'pypy-')"
92- with :
93- python-version : " ${{ matrix.python-version }}-dev"
94- nogil : " ${{ matrix.nogil || false }}"
66+ - name : " Install system dependencies"
67+ run : |
68+ sudo sed -i.bak 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
69+ sudo apt-get update
70+ sudo apt-get build-dep -y python3
9571
96- - name : " Install ${{ matrix.python-version }} with setup-python"
97- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
98- if : " startsWith(matrix.python-version, 'pypy-')"
99- with :
100- python-version : " ${{ matrix.python-version }}-nightly"
72+ - name : " Install pyenv"
73+ run : |
74+ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
75+
76+ - name : " Build Python ${{ matrix.python-version }}-dev"
77+ env :
78+ PYVER : " ${{ matrix.python-version }}-dev"
79+ # PYTHON_CONFIGURE_OPTS: "--enable-shared --disable-test-modules"
80+ run : |
81+ set -xe
82+ export PYENV_ROOT="$HOME/.pyenv"
83+ export PATH="$PYENV_ROOT/bin:$PATH"
84+ echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
85+ pyenv install $PYVER -v
86+ pyenv global $PYVER
87+ pyenv rehash
10188
10289 - name : " Show diagnostic info"
10390 run : |
@@ -110,21 +97,15 @@ jobs:
11097 python -m coverage debug pybehave
11198 env | sort
11299
113- - name : " Check build recency"
114- shell : python
100+ - name : " Check the Python version"
101+ env :
102+ EXPECTED : " ${{ matrix.python-version }}"
115103 run : |
116- import platform
117- from datetime import datetime
118- for fmt in ["%b %d %Y %H:%M:%S", "%b %d %Y"]:
119- try:
120- built = datetime.strptime(platform.python_build()[1], fmt)
121- except ValueError:
122- continue
123- days = (datetime.now() - built).days
124- impl = platform.python_implementation()
125- recency = 7 if (impl == "CPython") else 21
126- print(f"Days since {impl} was built: {days}, need within {recency}")
127- assert days <= recency
104+ python -c "
105+ import sys
106+ assert sys.version.startswith('$EXPECTED'.strip('t'))
107+ assert getattr(sys, '_is_gil_enabled', lambda: True)() == (not '$EXPECTED'.endswith('t'))
108+ "
128109
129110 - name : " Install dependencies"
130111 run : |
0 commit comments