2023-10-10 12:59:54 +00:00
|
|
|
name: Validate GraalPy e2e
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2024-06-27 18:18:32 +00:00
|
|
|
workflow_dispatch:
|
2023-10-10 12:59:54 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup-graalpy:
|
|
|
|
name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 13:38:22 +00:00
|
|
|
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
2023-10-10 12:59:54 +00:00
|
|
|
graalpy:
|
|
|
|
- 'graalpy-22.3'
|
2024-10-24 13:38:22 +00:00
|
|
|
- 'graalpy-23.0'
|
|
|
|
- 'graalpy-23.1'
|
|
|
|
- 'graalpy-24.1'
|
2023-10-10 12:59:54 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 10:16:06 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-10-10 12:59:54 +00:00
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.graalpy }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.graalpy }}
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: GraalPy and Python version
|
|
|
|
run: python --version
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
- name: Assert GraalPy is running
|
|
|
|
run: |
|
|
|
|
import platform
|
|
|
|
assert platform.python_implementation().lower() == "graalvm"
|
|
|
|
shell: python
|
|
|
|
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
|
|
|
EXECUTABLE=${{ matrix.graalpy }}
|
|
|
|
EXECUTABLE=${EXECUTABLE/graalpy-/graalpy} # remove the first '-' in "graalpy-X.Y" -> "graalpyX.Y" to match executable name
|
|
|
|
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
|
|
|
${EXECUTABLE} --version
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-graalpy-noenv:
|
|
|
|
name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }} (noenv)
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 13:38:22 +00:00
|
|
|
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
|
|
|
graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1']
|
2023-10-10 12:59:54 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 10:16:06 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-10-10 12:59:54 +00:00
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.graalpy }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.graalpy }}
|
|
|
|
update-environment: false
|
|
|
|
|
|
|
|
- name: GraalPy 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))'
|
|
|
|
|
|
|
|
check-latest:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 13:38:22 +00:00
|
|
|
os: [ubuntu-latest, macos-latest, macos-13]
|
2023-10-10 12:59:54 +00:00
|
|
|
steps:
|
2023-11-08 10:16:06 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-10 12:59:54 +00:00
|
|
|
- name: Setup GraalPy and check latest
|
|
|
|
uses: ./
|
2023-10-16 09:57:32 +00:00
|
|
|
id: graalpy
|
2023-10-10 12:59:54 +00:00
|
|
|
with:
|
2024-10-24 13:38:22 +00:00
|
|
|
python-version: 'graalpy-24.x'
|
2023-10-10 12:59:54 +00:00
|
|
|
check-latest: true
|
|
|
|
- name: GraalPy and Python version
|
|
|
|
run: python --version
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
- name: Assert GraalPy is running
|
|
|
|
run: |
|
|
|
|
import platform
|
|
|
|
assert platform.python_implementation().lower() == "graalvm"
|
|
|
|
shell: python
|
|
|
|
|
|
|
|
- name: Assert expected binaries (or symlinks) are present
|
|
|
|
run: |
|
2023-10-16 09:57:32 +00:00
|
|
|
EXECUTABLE='${{ steps.graalpy.outputs.python-version }}'
|
|
|
|
EXECUTABLE="${EXECUTABLE%.*}"
|
2023-10-10 12:59:54 +00:00
|
|
|
${EXECUTABLE} --version
|
|
|
|
shell: bash
|