2020-12-17 10:03:54 -05:00
|
|
|
name: Validate PyPy e2e
|
2022-12-22 04:17:13 -05:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
on:
|
2020-12-17 10:03:54 -05:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
schedule:
|
|
|
|
- cron: 30 3 * * *
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup-pypy:
|
|
|
|
name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-04-12 13:59:38 -04:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest]
|
2020-12-17 10:03:54 -05:00
|
|
|
pypy:
|
2023-03-09 05:44:56 -05:00
|
|
|
- 'pypy-2.7'
|
|
|
|
- 'pypy-3.7'
|
|
|
|
- 'pypy3.9'
|
|
|
|
- 'pypy-2.7-v7.3.4'
|
|
|
|
- 'pypy-3.7-v7.3.5'
|
|
|
|
- 'pypy-3.7-v7.3.4'
|
|
|
|
- 'pypy-3.7-v7.3.x'
|
|
|
|
- 'pypy-3.7-v7.x'
|
|
|
|
- 'pypy-2.7-v7.3.4rc1'
|
|
|
|
- 'pypy-3.7-nightly'
|
|
|
|
- 'pypy3.8-v7.3.7'
|
2020-12-17 10:03:54 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-07-03 14:14:29 -04:00
|
|
|
uses: actions/checkout@v3
|
2023-03-09 05:44:56 -05:00
|
|
|
|
2020-12-17 10:03:54 -05:00
|
|
|
- name: setup-python ${{ matrix.pypy }}
|
2022-05-23 14:59:37 -04:00
|
|
|
id: setup-python
|
2020-12-17 10:03:54 -05:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.pypy }}
|
2022-05-23 14:59:37 -04:00
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
2020-12-17 10:03:54 -05:00
|
|
|
- name: PyPy and Python version
|
|
|
|
run: python --version
|
2023-03-09 05:44:56 -05:00
|
|
|
|
2020-12-17 10:03:54 -05:00
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2022-04-28 09:26:17 -04: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 09:20:53 -04:00
|
|
|
EXECUTABLE=${EXECUTABLE/pypy-/pypy} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
|
2022-04-28 09:26:17 -04:00
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
|
|
|
shell: bash
|
2022-06-29 11:00:51 -04:00
|
|
|
|
|
|
|
setup-pypy-noenv:
|
|
|
|
name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv)
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest]
|
|
|
|
pypy: ['pypy2.7', 'pypy3.7', 'pypy3.8', 'pypy3.9-nightly']
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- 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 10:54:04 -04:00
|
|
|
|
|
|
|
check-latest:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup PyPy and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: 'pypy-3.7-v7.3.x'
|
|
|
|
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: |
|
|
|
|
EXECUTABLE="pypy-3.7-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
|
2022-12-22 07:02:09 -05:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-pypy-multiple-versions:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup PyPy and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: |
|
2023-03-09 05:44:56 -05:00
|
|
|
pypy-3.7-v7.3.x
|
|
|
|
pypy3.8
|
2022-12-22 07:02:09 -05: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: |
|
|
|
|
EXECUTABLE="pypy-3.7-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
|
|
|
|
shell: bash
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
|
|
|
EXECUTABLE='pypy3.8'
|
|
|
|
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 05:44:56 -05:00
|
|
|
shell: bash
|