-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GraalPy support #694
Merged
Merged
Add GraalPy support #694
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ad7b7ba
Add support for graalpy
timfel f40a022
add graalpy test workflow
timfel 6db14b2
format, lint and build
timfel 928058c
symlink graalpy binaries names
timfel b695933
fix macos names for graalpy
timfel b271e81
Don't attempt to update pip for graalpy
msimacek fb29473
Remove test schedule
msimacek 08f6b91
Extract common getBinaryDirectory function for PyPy and GraalPy
msimacek 3d8a1eb
Clean up and format
msimacek 62fe528
Pass GitHub token to GraalPy queries
msimacek feb1894
Utilize pagination when querying GraalPy GitHub releases
msimacek 7673153
Build
msimacek 546edbc
Fix lint errors
msimacek 8c79e75
Deal with possible multiple artifacts for a single releases
msimacek cc7e956
Skip few GraalPy tests on windows - we don't have a windows release yet
msimacek 7f48d18
Fix GraalPy test on Mac OS
msimacek 5b60f8c
Build
msimacek 6713183
Skip one more GraalPy test on windows
msimacek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Validate GraalPy e2e | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
setup-graalpy: | ||
name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-20.04, ubuntu-latest] | ||
graalpy: | ||
- 'graalpy-23.0' | ||
- 'graalpy-22.3' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- 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: | ||
os: [macos-latest, ubuntu-20.04, ubuntu-latest] | ||
graalpy: ['graalpy23.0', 'graalpy22.3'] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- 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: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup GraalPy and check latest | ||
uses: ./ | ||
with: | ||
python-version: 'graalpy-23.x' | ||
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: | | ||
EXECUTABLE="graalpy-23.0" | ||
EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "graalpy-X.Y" -> "graalpyX.Y" to match executable name | ||
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe | ||
${EXECUTABLE} --version | ||
shell: bash |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GraalPy is available for Windows, too. Would it be an option to test against Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 23.0 there were no Windows binary releases. The upcoming 23.1 will have Windows releases, but they are very limited, things like native extensions do not work, yet. Tests for Windows will likely just not pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our plan is to have more complete Windows support for our 2024 release, so we'll have to do a follow up PR next year.