| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3467d92 commit 5f2af21
12 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,116 @@ | |||
| 1 | + name: Validate GraalPy e2e | ||
| 2 | + | ||
| 3 | + on: | ||
| 4 | + push: | ||
| 5 | + branches: | ||
| 6 | + - main | ||
| 7 | + paths-ignore: | ||
| 8 | + - '**.md' | ||
| 9 | + pull_request: | ||
| 10 | + paths-ignore: | ||
| 11 | + - '**.md' | ||
| 12 | + | ||
| 13 | + jobs: | ||
| 14 | + setup-graalpy: | ||
| 15 | + name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }} | ||
| 16 | + runs-on: ${{ matrix.os }} | ||
| 17 | + strategy: | ||
| 18 | + fail-fast: false | ||
| 19 | + matrix: | ||
| 20 | + os: [macos-latest, ubuntu-20.04, ubuntu-latest] | ||
| 21 | + graalpy: | ||
| 22 | + - 'graalpy-23.0' | ||
| 23 | + - 'graalpy-22.3' | ||
| 24 | + | ||
| 25 | + steps: | ||
| 26 | + - name: Checkout | ||
| 27 | + uses: actions/checkout@v3 | ||
| 28 | + | ||
| 29 | + - name: setup-python ${{ matrix.graalpy }} | ||
| 30 | + id: setup-python | ||
| 31 | + uses: ./ | ||
| 32 | + with: | ||
| 33 | + python-version: ${{ matrix.graalpy }} | ||
| 34 | + | ||
| 35 | + - name: Check python-path | ||
| 36 | + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' | ||
| 37 | + shell: bash | ||
| 38 | + | ||
| 39 | + - name: GraalPy and Python version | ||
| 40 | + run: python --version | ||
| 41 | + | ||
| 42 | + - name: Run simple code | ||
| 43 | + run: python -c 'import math; print(math.factorial(5))' | ||
| 44 | + | ||
| 45 | + - name: Assert GraalPy is running | ||
| 46 | + run: | | ||
| 47 | + import platform | ||
| 48 | + assert platform.python_implementation().lower() == "graalvm" | ||
| 49 | + shell: python | ||
| 50 | + | ||
| 51 | + - name: Assert expected binaries (or symlinks) are present | ||
| 52 | + run: | | ||
| 53 | + EXECUTABLE=${{ matrix.graalpy }} | ||
| 54 | + EXECUTABLE=${EXECUTABLE/graalpy-/graalpy} # remove the first '-' in "graalpy-X.Y" -> "graalpyX.Y" to match executable name | ||
| 55 | + EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe | ||
| 56 | + ${EXECUTABLE} --version | ||
| 57 | + shell: bash | ||
| 58 | + | ||
| 59 | + setup-graalpy-noenv: | ||
| 60 | + name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }} (noenv) | ||
| 61 | + runs-on: ${{ matrix.os }} | ||
| 62 | + strategy: | ||
| 63 | + fail-fast: false | ||
| 64 | + matrix: | ||
| 65 | + os: [macos-latest, ubuntu-20.04, ubuntu-latest] | ||
| 66 | + graalpy: ['graalpy23.0', 'graalpy22.3'] | ||
| 67 | + | ||
| 68 | + steps: | ||
| 69 | + - name: Checkout | ||
| 70 | + uses: actions/checkout@v3 | ||
| 71 | + | ||
| 72 | + - name: setup-python ${{ matrix.graalpy }} | ||
| 73 | + id: setup-python | ||
| 74 | + uses: ./ | ||
| 75 | + with: | ||
| 76 | + python-version: ${{ matrix.graalpy }} | ||
| 77 | + update-environment: false | ||
| 78 | + | ||
| 79 | + - name: GraalPy and Python version | ||
| 80 | + run: ${{ steps.setup-python.outputs.python-path }} --version | ||
| 81 | + | ||
| 82 | + - name: Run simple code | ||
| 83 | + run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))' | ||
| 84 | + | ||
| 85 | + check-latest: | ||
| 86 | + runs-on: ${{ matrix.os }} | ||
| 87 | + strategy: | ||
| 88 | + fail-fast: false | ||
| 89 | + matrix: | ||
| 90 | + os: [ubuntu-latest, macos-latest] | ||
| 91 | + steps: | ||
| 92 | + - uses: actions/checkout@v3 | ||
| 93 | + - name: Setup GraalPy and check latest | ||
| 94 | + uses: ./ | ||
| 95 | + with: | ||
| 96 | + python-version: 'graalpy-23.x' | ||
| 97 | + check-latest: true | ||
| 98 | + - name: GraalPy and Python version | ||
| 99 | + run: python --version | ||
| 100 | + | ||
| 101 | + - name: Run simple code | ||
| 102 | + run: python -c 'import math; print(math.factorial(5))' | ||
| 103 | + | ||
| 104 | + - name: Assert GraalPy is running | ||
| 105 | + run: | | ||
| 106 | + import platform | ||
| 107 | + assert platform.python_implementation().lower() == "graalvm" | ||
| 108 | + shell: python | ||
| 109 | + | ||
| 110 | + - name: Assert expected binaries (or symlinks) are present | ||
| 111 | + run: | | ||
| 112 | + EXECUTABLE="graalpy-23.0" | ||
| 113 | + EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "graalpy-X.Y" -> "graalpyX.Y" to match executable name | ||
| 114 | + EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe | ||
| 115 | + ${EXECUTABLE} --version | ||
| 116 | + shell: bash | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments