2020-12-17 16:03:54 +01:00
|
|
|
name: Validate PyPy e2e
|
2022-12-22 10:17:13 +01:00
|
|
|
|
2023-03-09 11:44:56 +01:00
|
|
|
on:
|
2020-12-17 16:03:54 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
schedule:
|
|
|
|
- cron: 30 3 * * *
|
2024-06-27 20:18:32 +02:00
|
|
|
workflow_dispatch:
|
2020-12-17 16:03:54 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup-pypy:
|
|
|
|
name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 15:38:22 +02:00
|
|
|
os:
|
|
|
|
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
2020-12-17 16:03:54 +01:00
|
|
|
pypy:
|
2023-03-09 11:44:56 +01:00
|
|
|
- 'pypy-2.7'
|
2024-06-27 20:18:32 +02:00
|
|
|
- 'pypy-3.10'
|
2023-03-09 11:44:56 +01:00
|
|
|
- 'pypy3.9'
|
2024-10-24 15:38:22 +02:00
|
|
|
- 'pypy-2.7-v7.3.17'
|
|
|
|
- 'pypy-3.10-v7.3.17'
|
|
|
|
- 'pypy-3.10-v7.3.16'
|
2024-06-27 20:18:32 +02:00
|
|
|
- 'pypy-3.10-v7.3.x'
|
|
|
|
- 'pypy-3.10-v7.x'
|
|
|
|
- 'pypy-2.7-v7.3.12rc1'
|
|
|
|
- 'pypy-3.10-nightly'
|
2024-10-24 15:38:22 +02:00
|
|
|
- 'pypy3.10-v7.3.17'
|
2020-12-17 16:03:54 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 11:16:06 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-03-09 11:44:56 +01:00
|
|
|
|
2020-12-17 16:03:54 +01:00
|
|
|
- name: setup-python ${{ matrix.pypy }}
|
2022-05-23 20:59:37 +02:00
|
|
|
id: setup-python
|
2020-12-17 16:03:54 +01:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.pypy }}
|
2022-05-23 20:59:37 +02:00
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
2020-12-17 16:03:54 +01:00
|
|
|
- name: PyPy and Python version
|
|
|
|
run: python --version
|
2023-03-09 11:44:56 +01:00
|
|
|
|
2020-12-17 16:03:54 +01:00
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2022-04-28 15:26:17 +02:00
|
|
|
|
|
|
|
- name: Assert PyPy is running
|
|
|
|
run: |
|
|
|
|
import platform
|
|
|
|
assert platform.python_implementation().lower() == "pypy"
|
|
|
|
shell: python
|
|
|
|
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
|
|
|
EXECUTABLE=${{ matrix.pypy }}
|
2022-05-18 15:20:53 +02:00
|
|
|
EXECUTABLE=${EXECUTABLE/pypy-/pypy} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
2022-04-28 15:26:17 +02:00
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
|
|
|
shell: bash
|
2022-06-29 17:00:51 +02:00
|
|
|
|
|
|
|
setup-pypy-noenv:
|
|
|
|
name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv)
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 15:38:22 +02:00
|
|
|
os:
|
|
|
|
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
2024-06-27 20:18:32 +02:00
|
|
|
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly']
|
2022-06-29 17:00:51 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 11:16:06 +01:00
|
|
|
uses: actions/checkout@v4
|
2022-06-29 17:00:51 +02:00
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.pypy }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.pypy }}
|
|
|
|
update-environment: false
|
|
|
|
|
|
|
|
- name: PyPy and Python version
|
|
|
|
run: ${{ steps.setup-python.outputs.python-path }} --version
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
2022-07-25 16:54:04 +02:00
|
|
|
|
|
|
|
check-latest:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 15:38:22 +02:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2022-07-25 16:54:04 +02:00
|
|
|
steps:
|
2023-11-08 11:16:06 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-25 16:54:04 +02:00
|
|
|
- name: Setup PyPy and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-06-27 20:18:32 +02:00
|
|
|
python-version: 'pypy-3.10-v7.3.x'
|
2022-07-25 16:54:04 +02:00
|
|
|
check-latest: true
|
|
|
|
- name: PyPy and Python version
|
|
|
|
run: python --version
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
- name: Assert PyPy is running
|
|
|
|
run: |
|
|
|
|
import platform
|
|
|
|
assert platform.python_implementation().lower() == "pypy"
|
|
|
|
shell: python
|
|
|
|
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
2024-06-27 20:18:32 +02:00
|
|
|
EXECUTABLE="pypy-3.10-v7.3.x"
|
2022-07-25 16:54:04 +02:00
|
|
|
EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
2022-12-22 13:02:09 +01:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-pypy-multiple-versions:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 15:38:22 +02:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2022-12-22 13:02:09 +01:00
|
|
|
steps:
|
2023-11-08 11:16:06 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-22 13:02:09 +01:00
|
|
|
- name: Setup PyPy and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: |
|
2024-06-27 20:18:32 +02:00
|
|
|
pypy-3.10-v7.3.x
|
|
|
|
pypy3.9
|
2022-12-22 13:02:09 +01:00
|
|
|
check-latest: true
|
|
|
|
- name: PyPy and Python version
|
|
|
|
run: python --version
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
- name: Assert PyPy is running
|
|
|
|
run: |
|
|
|
|
import platform
|
|
|
|
assert platform.python_implementation().lower() == "pypy"
|
|
|
|
shell: python
|
|
|
|
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
2024-06-27 20:18:32 +02:00
|
|
|
EXECUTABLE="pypy-3.10-v7.3.x"
|
2022-12-22 13:02:09 +01:00
|
|
|
EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
|
|
|
shell: bash
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
2024-06-27 20:18:32 +02:00
|
|
|
EXECUTABLE='pypy3.9'
|
2022-12-22 13:02:09 +01:00
|
|
|
EXECUTABLE=${EXECUTABLE/pypy-/pypy} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
2023-03-09 11:44:56 +01:00
|
|
|
shell: bash
|