mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-10 05:12:19 +02:00
Add e2e Testing for free threaded and Bump @action/cache from 4.0.0 to 4.0.3 (#1056)
* include freethread e2e testing and upgrade cache from 4.0.0 to 4.0.2 * include verify gil step and validated python version * Rename files * include ubuntu-arm runners for testing
This commit is contained in:
parent
19e4675e06
commit
8d9ed9ac5c
43 changed files with 1355 additions and 10660 deletions
164
.github/workflows/e2e-cache-freethreaded.yml
vendored
Normal file
164
.github/workflows/e2e-cache-freethreaded.yml
vendored
Normal file
|
@ -0,0 +1,164 @@
|
|||
name: e2e-cache freethread
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
python-pip-dependencies-caching:
|
||||
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
- name: Install dependencies
|
||||
run: pip install numpy pandas requests
|
||||
|
||||
python-pipenv-dependencies-caching:
|
||||
name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
id: cache-pipenv
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pipenv'
|
||||
- name: Install pipenv
|
||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||
- name: Install dependencies
|
||||
run: pipenv install requests
|
||||
|
||||
python-poetry-dependencies-caching:
|
||||
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13.0, 3.13.1, 3.13.2]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- name: Init pyproject.toml
|
||||
run: mv ./__tests__/data/pyproject.toml .
|
||||
- name: Setup Python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
freethreaded: true
|
||||
cache: 'poetry'
|
||||
- name: Install dependencies
|
||||
run: poetry install --no-root
|
||||
|
||||
python-pip-dependencies-caching-path:
|
||||
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: __tests__/data/requirements.txt
|
||||
- name: Install dependencies
|
||||
run: pip install numpy pandas requests
|
||||
|
||||
python-pipenv-dependencies-caching-path:
|
||||
name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
id: cache-pipenv
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pipenv'
|
||||
cache-dependency-path: '**/pipenv-requirements.txt'
|
||||
- name: Install pipenv
|
||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||
- name: Install dependencies
|
||||
run: pipenv install requests
|
119
.github/workflows/e2e-cache.yml
vendored
119
.github/workflows/e2e-cache.yml
vendored
|
@ -21,8 +21,30 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version:
|
||||
[
|
||||
'3.9',
|
||||
'pypy-3.9-v7.x',
|
||||
'3.10',
|
||||
'pypy-3.10-v7.x',
|
||||
'3.11',
|
||||
'pypy-3.11-v7.x',
|
||||
'3.12',
|
||||
'3.13'
|
||||
]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python-version: pypy-3.11-v7.x
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
|
@ -39,8 +61,25 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version:
|
||||
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04-arm
|
||||
python-version: pypy-3.11-v7.x
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
|
@ -75,8 +114,27 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version:
|
||||
[
|
||||
'3.9',
|
||||
'pypy-3.9-v7.x',
|
||||
'3.10',
|
||||
'pypy-3.10-v7.x',
|
||||
'3.11',
|
||||
'pypy-3.11-v7.x',
|
||||
'3.12',
|
||||
'3.13'
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install poetry
|
||||
|
@ -97,8 +155,30 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version:
|
||||
[
|
||||
'3.9',
|
||||
'pypy-3.9-v7.x',
|
||||
'3.10',
|
||||
'pypy-3.10-v7.x',
|
||||
'3.11',
|
||||
'pypy-3.11-v7.x',
|
||||
'3.12',
|
||||
'3.13'
|
||||
]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python-version: pypy-3.11-v7.x
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
|
@ -116,8 +196,27 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
windows-latest,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version:
|
||||
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04-arm
|
||||
python-version: pypy-3.10-v7.x
|
||||
- os: ubuntu-22.04-arm
|
||||
python-version: pypy-3.11-v7.x
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
|
|
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
|
@ -22,7 +22,9 @@ jobs:
|
|||
ubuntu-20.04,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm,
|
||||
macos-latest,
|
||||
macos-13
|
||||
]
|
||||
|
|
22
.github/workflows/test-graalpy.yml
vendored
22
.github/workflows/test-graalpy.yml
vendored
|
@ -18,7 +18,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
graalpy:
|
||||
- 'graalpy-22.3'
|
||||
- 'graalpy-23.0'
|
||||
|
@ -65,7 +74,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1']
|
||||
|
||||
steps:
|
||||
|
|
58
.github/workflows/test-pypy.yml
vendored
58
.github/workflows/test-pypy.yml
vendored
|
@ -21,7 +21,16 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
pypy:
|
||||
- 'pypy-2.7'
|
||||
- 'pypy-3.10'
|
||||
|
@ -34,6 +43,7 @@ jobs:
|
|||
- 'pypy-2.7-v7.3.12rc1'
|
||||
- 'pypy-3.10-nightly'
|
||||
- 'pypy3.10-v7.3.17'
|
||||
- 'pypy3.11-v7.3.19'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -86,7 +96,7 @@ jobs:
|
|||
- ubuntu-24.04
|
||||
- ubuntu-22.04-arm
|
||||
- ubuntu-24.04-arm
|
||||
pypy: ['pypy-2.7', 'pypy-3.10']
|
||||
pypy: ['pypy-2.7', 'pypy-3.10', 'pypy-3.11']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -129,8 +139,17 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly']
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly', 'pypy3.11']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -154,13 +173,23 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PyPy and check latest
|
||||
uses: ./
|
||||
with:
|
||||
python-version: 'pypy-3.10-v7.3.x'
|
||||
python-version: 'pypy-3.11-v7.3.x'
|
||||
check-latest: true
|
||||
- name: PyPy and Python version
|
||||
run: python --version
|
||||
|
@ -176,7 +205,7 @@ jobs:
|
|||
|
||||
- name: Assert expected binaries (or symlinks) are present
|
||||
run: |
|
||||
EXECUTABLE="pypy-3.10-v7.3.x"
|
||||
EXECUTABLE="pypy-3.11-v7.3.x"
|
||||
EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
||||
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
||||
${EXECUTABLE} --version
|
||||
|
@ -187,13 +216,24 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PyPy and check latest
|
||||
uses: ./
|
||||
with:
|
||||
python-version: |
|
||||
pypy-3.11-v7.3.x
|
||||
pypy-3.10-v7.3.x
|
||||
pypy3.9
|
||||
check-latest: true
|
||||
|
@ -211,7 +251,7 @@ jobs:
|
|||
|
||||
- name: Assert expected binaries (or symlinks) are present
|
||||
run: |
|
||||
EXECUTABLE="pypy-3.10-v7.3.x"
|
||||
EXECUTABLE="pypy-3.11-v7.3.x"
|
||||
EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
||||
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
||||
${EXECUTABLE} --version
|
||||
|
|
486
.github/workflows/test-python-freethreaded.yml
vendored
Normal file
486
.github/workflows/test-python-freethreaded.yml
vendored
Normal file
|
@ -0,0 +1,486 @@
|
|||
name: Validate Python e2e freethread
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
schedule:
|
||||
- cron: 30 3 * * *
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
setup-versions-from-manifest:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-from-file:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: build-version-file ${{ matrix.python }}
|
||||
run: echo ${{ matrix.python }} > .python-version
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version-file: .python-version
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-from-file-without-parameter:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file without parameter
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: build-version-file ${{ matrix.python }}
|
||||
run: echo ${{ matrix.python }} > .python-version
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-from-standard-pyproject-file:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0, 3.13.1, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: build-version-file ${{ matrix.python }}
|
||||
run: |
|
||||
echo '[project]
|
||||
requires-python = "${{ matrix.python }}"
|
||||
' > pyproject.toml
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version-file: pyproject.toml
|
||||
freethreaded: true
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-from-poetry-pyproject-file:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0, 3.13.1, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: build-version-file ${{ matrix.python }}
|
||||
run: |
|
||||
echo '[tool.poetry.dependencies]
|
||||
python = "${{ matrix.python }}"
|
||||
' > pyproject.toml
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version-file: pyproject.toml
|
||||
freethreaded: true
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-from-tool-versions-file:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0t, 3.13.1t, 3.13.2t, 3.14t-dev]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: build-tool-versions-file ${{ matrix.python }}
|
||||
run: |
|
||||
echo "python ${{ matrix.python }}" > .tool-versions
|
||||
|
||||
- name: setup-python using .tool-versions ${{ matrix.python }}
|
||||
id: setup-python-tool-versions
|
||||
uses: ./
|
||||
with:
|
||||
python-version-file: .tool-versions
|
||||
|
||||
setup-pre-release-version-from-manifest:
|
||||
name: Setup 3.14.0-alpha.6 ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python 3.14.0-alpha.6
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: '3.14.0-alpha.6'
|
||||
freethreaded: true
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-dev-version:
|
||||
name: Setup 3.14t-dev ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python 3.14t-dev
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: '3.14t-dev'
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Validate version
|
||||
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
||||
shell: bash
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-prerelease-version:
|
||||
name: Setup 3.14t ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python 3.14t
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: '3.14t'
|
||||
allow-prereleases: true
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
|
||||
- name: Validate version
|
||||
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
||||
shell: bash
|
||||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-noenv:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} (noenv)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0t, 3.13.1t, 3.13.2t]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
update-environment: false
|
||||
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
- name: Run simple code
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
||||
|
||||
check-latest:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: [3.13t, 3.14t-dev]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python and check latest
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
check-latest: true
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
setup-python-multiple-python-versions:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python and check latest
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: |
|
||||
3.13.1t
|
||||
3.13.2t
|
||||
3.14t-dev
|
||||
- name: Verify Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -VVV
|
||||
|
||||
setup-versions-with-freethread-input:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} using freethread input parameter
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.1, 3.13.2, 3.14-dev, 3.14.0-alpha.6]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
freethreaded: true
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
shell: bash
|
||||
- name: Validate GIL
|
||||
run: python ./__tests__/verify-freethreaded.py
|
98
.github/workflows/test-python.yml
vendored
98
.github/workflows/test-python.yml
vendored
|
@ -26,10 +26,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -69,10 +71,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -115,10 +119,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -159,10 +165,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.0]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -208,10 +216,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -257,10 +267,12 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: [3.13.0, 3.14-dev, pypy3.11-7.3.18, graalpy-24.1.2]
|
||||
python: [pypy3.11-7.3.18, graalpy-24.1.2, 3.13.2, 3.14-dev]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python: graalpy-24.1.2
|
||||
|
@ -279,7 +291,7 @@ jobs:
|
|||
python-version-file: .tool-versions
|
||||
|
||||
setup-pre-release-version-from-manifest:
|
||||
name: Setup 3.14.0-alpha.1 ${{ matrix.os }}
|
||||
name: Setup 3.14.0-alpha.6 ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -290,18 +302,20 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-python 3.14.0-alpha.1
|
||||
- name: setup-python 3.14.0-alpha.6
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: '3.14.0-alpha.1'
|
||||
python-version: '3.14.0-alpha.6'
|
||||
|
||||
- name: Check python-path
|
||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||
|
@ -310,8 +324,8 @@ jobs:
|
|||
- name: Validate version
|
||||
run: |
|
||||
$pythonVersion = (python --version)
|
||||
if ("Python 3.14.0a1" -ne "$pythonVersion"){
|
||||
Write-Host "The current version is $pythonVersion; expected version is 3.14.0a1"
|
||||
if ("Python 3.14.0a6" -ne "$pythonVersion"){
|
||||
Write-Host "The current version is $pythonVersion; expected version is 3.14.0a6"
|
||||
exit 1
|
||||
}
|
||||
$pythonVersion
|
||||
|
@ -326,7 +340,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -354,7 +377,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -389,8 +421,10 @@ jobs:
|
|||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
ubuntu-latest
|
||||
ubuntu-latest,
|
||||
ubuntu-24.04-arm
|
||||
]
|
||||
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
||||
steps:
|
||||
|
@ -415,7 +449,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -439,7 +482,16 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
ubuntu-latest,
|
||||
macos-13
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python and check latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue