mirror of
https://github.com/actions/setup-python
synced 2024-11-30 21:22:28 +08:00
Compare commits
5 Commits
95d9b722a7
...
c8ed6b8a89
Author | SHA1 | Date | |
---|---|---|---|
|
c8ed6b8a89 | ||
|
9c4618d9a3 | ||
|
55aad42e46 | ||
|
0b93645e9f | ||
|
fc9bcb4a04 |
20
.github/workflows/e2e-cache.yml
vendored
20
.github/workflows/e2e-cache.yml
vendored
@ -21,8 +21,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
@ -39,8 +39,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
@ -75,8 +75,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.9', 'pypy-3.9']
|
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
@ -97,8 +97,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
@ -116,8 +116,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
python-version: ['3.9', 'pypy-3.9-v7.x', '3.10', 'pypy-3.10-v7.x']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
|
88
.github/workflows/e2e-tests.yml
vendored
88
.github/workflows/e2e-tests.yml
vendored
@ -12,30 +12,43 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test-setup-python-older:
|
||||||
|
name: Test setup-python old versions
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system:
|
||||||
|
[ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest, macos-13]
|
||||||
|
python: [3.8.10, 3.8.18]
|
||||||
|
exclude:
|
||||||
|
- operating-system: ubuntu-22.04
|
||||||
|
python: '3.8.10'
|
||||||
|
- operating-system: macos-latest
|
||||||
|
python: '3.8.18'
|
||||||
|
- operating-system: windows-latest
|
||||||
|
python: '3.8.18'
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Run with setup-python ${{ matrix.python }}
|
||||||
|
id: setup-python
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python }}
|
||||||
|
- name: Verify ${{ matrix.python }}
|
||||||
|
run: python __tests__/verify-python.py ${{ matrix.python }}
|
||||||
test-setup-python:
|
test-setup-python:
|
||||||
name: Test setup-python
|
name: Test setup-python
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-20.04, windows-latest]
|
operating-system:
|
||||||
|
[ubuntu-20.04, windows-latest, ubuntu-22.04, macos-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run with setup-python 3.8
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- name: Verify 3.8
|
|
||||||
run: python __tests__/verify-python.py 3.8
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.8.10
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.8.10
|
|
||||||
- name: Verify 3.8.10
|
|
||||||
run: python __tests__/verify-python.py 3.8.10
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.9.13
|
- name: Run with setup-python 3.9.13
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -57,36 +70,43 @@ jobs:
|
|||||||
- name: Verify 3.11.9
|
- name: Verify 3.11.9
|
||||||
run: python __tests__/verify-python.py 3.11.9
|
run: python __tests__/verify-python.py 3.11.9
|
||||||
|
|
||||||
- name: Run with setup-python 3.12.4
|
- name: Run with setup-python 3.12.7
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: 3.12.4
|
python-version: 3.12.7
|
||||||
- name: Verify 3.12.4
|
- name: Verify 3.12.7
|
||||||
run: python __tests__/verify-python.py 3.12.4
|
run: python __tests__/verify-python.py 3.12.7
|
||||||
|
|
||||||
- name: Run with setup-python 3.10
|
- name: Run with setup-python 3.13.0
|
||||||
id: cp310
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: 3.13.0
|
||||||
- name: Verify 3.10
|
- name: Verify 3.13.0
|
||||||
run: python __tests__/verify-python.py 3.10
|
run: python __tests__/verify-python.py 3.13.0
|
||||||
- name: Run python-path sample 3.10
|
|
||||||
run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
|
|
||||||
|
|
||||||
- name: Run with setup-python ==3.8
|
- name: Run with setup-python 3.13
|
||||||
|
id: cp313
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '==3.8'
|
python-version: '3.13'
|
||||||
- name: Verify ==3.8
|
- name: Verify 3.13
|
||||||
run: python __tests__/verify-python.py 3.8
|
run: python __tests__/verify-python.py 3.13
|
||||||
|
- name: Run python-path sample 3.13
|
||||||
|
run: pipx run --python '${{ steps.cp313.outputs.python-path }}' nox --version
|
||||||
|
|
||||||
- name: Run with setup-python <3.11
|
- name: Run with setup-python ==3.13
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '<3.11'
|
python-version: '==3.13'
|
||||||
- name: Verify <3.11
|
- name: Verify ==3.13
|
||||||
run: python __tests__/verify-python.py 3.10
|
run: python __tests__/verify-python.py 3.13
|
||||||
|
|
||||||
|
- name: Run with setup-python <3.13
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
python-version: '<3.13'
|
||||||
|
- name: Verify <3.13
|
||||||
|
run: python __tests__/verify-python.py 3.12
|
||||||
- name: Test Raw Endpoint Access
|
- name: Test Raw Endpoint Access
|
||||||
run: |
|
run: |
|
||||||
curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty
|
curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty
|
||||||
|
@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
uses: actions/publish-action@v0.2.2
|
uses: actions/publish-action@v0.3.0
|
||||||
with:
|
with:
|
||||||
source-tag: ${{ env.TAG_NAME }}
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
|
15
.github/workflows/test-graalpy.yml
vendored
15
.github/workflows/test-graalpy.yml
vendored
@ -18,10 +18,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-20.04, ubuntu-latest]
|
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||||
graalpy:
|
graalpy:
|
||||||
- 'graalpy-23.0'
|
|
||||||
- 'graalpy-22.3'
|
- 'graalpy-22.3'
|
||||||
|
- 'graalpy-23.0'
|
||||||
|
- 'graalpy-23.1'
|
||||||
|
- 'graalpy-24.0'
|
||||||
|
- 'graalpy-24.1'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -63,8 +66,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-20.04, ubuntu-latest]
|
os: [macos-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||||
graalpy: ['graalpy23.0', 'graalpy22.3']
|
graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -88,14 +91,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup GraalPy and check latest
|
- name: Setup GraalPy and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
id: graalpy
|
id: graalpy
|
||||||
with:
|
with:
|
||||||
python-version: 'graalpy-23.x'
|
python-version: 'graalpy-24.x'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: GraalPy and Python version
|
- name: GraalPy and Python version
|
||||||
run: python --version
|
run: python --version
|
||||||
|
18
.github/workflows/test-pypy.yml
vendored
18
.github/workflows/test-pypy.yml
vendored
@ -20,19 +20,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest]
|
os:
|
||||||
|
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||||
pypy:
|
pypy:
|
||||||
- 'pypy-2.7'
|
- 'pypy-2.7'
|
||||||
- 'pypy-3.10'
|
- 'pypy-3.10'
|
||||||
- 'pypy3.9'
|
- 'pypy3.9'
|
||||||
- 'pypy-2.7-v7.3.14'
|
- 'pypy-2.7-v7.3.17'
|
||||||
- 'pypy-3.10-v7.3.15'
|
- 'pypy-3.10-v7.3.17'
|
||||||
- 'pypy-3.10-v7.3.14'
|
- 'pypy-3.10-v7.3.16'
|
||||||
- 'pypy-3.10-v7.3.x'
|
- 'pypy-3.10-v7.3.x'
|
||||||
- 'pypy-3.10-v7.x'
|
- 'pypy-3.10-v7.x'
|
||||||
- 'pypy-2.7-v7.3.12rc1'
|
- 'pypy-2.7-v7.3.12rc1'
|
||||||
- 'pypy-3.10-nightly'
|
- 'pypy-3.10-nightly'
|
||||||
- 'pypy3.10-v7.3.15'
|
- 'pypy3.10-v7.3.17'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -74,7 +75,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest]
|
os:
|
||||||
|
[macos-latest, windows-latest, ubuntu-20.04, ubuntu-latest, macos-13]
|
||||||
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly']
|
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -99,7 +101,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup PyPy and check latest
|
- name: Setup PyPy and check latest
|
||||||
@ -132,7 +134,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup PyPy and check latest
|
- name: Setup PyPy and check latest
|
||||||
|
67
.github/workflows/test-python.yml
vendored
67
.github/workflows/test-python.yml
vendored
@ -20,8 +20,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3]
|
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python: 3.8.10
|
python: 3.8.10
|
||||||
@ -58,8 +58,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3]
|
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python: 3.8.10
|
python: 3.8.10
|
||||||
@ -99,8 +99,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3]
|
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python: 3.8.10
|
python: 3.8.10
|
||||||
@ -138,8 +138,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, '==3.12.3']
|
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.0]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python: 3.8.10
|
python: 3.8.10
|
||||||
@ -182,8 +182,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3]
|
python: [3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
||||||
exclude:
|
exclude:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python: 3.8.10
|
python: 3.8.10
|
||||||
@ -221,21 +221,21 @@ jobs:
|
|||||||
run: python -c 'import math; print(math.factorial(5))'
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
|
|
||||||
setup-pre-release-version-from-manifest:
|
setup-pre-release-version-from-manifest:
|
||||||
name: Setup 3.13.0-alpha.6 ${{ matrix.os }}
|
name: Setup 3.14.0-alpha.1 ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: setup-python 3.13.0-alpha.6
|
- name: setup-python 3.14.0-alpha.1
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '3.13.0-alpha.6'
|
python-version: '3.14.0-alpha.1'
|
||||||
|
|
||||||
- name: Check python-path
|
- name: Check python-path
|
||||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||||
@ -244,8 +244,8 @@ jobs:
|
|||||||
- name: Validate version
|
- name: Validate version
|
||||||
run: |
|
run: |
|
||||||
$pythonVersion = (python --version)
|
$pythonVersion = (python --version)
|
||||||
if ("Python 3.13.0a6" -ne "$pythonVersion"){
|
if ("Python 3.14.0a1" -ne "$pythonVersion"){
|
||||||
Write-Host "The current version is $pythonVersion; expected version is 3.13.0a6"
|
Write-Host "The current version is $pythonVersion; expected version is 3.14.0a1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
$pythonVersion
|
$pythonVersion
|
||||||
@ -255,49 +255,49 @@ jobs:
|
|||||||
run: python -c 'import math; print(math.factorial(5))'
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
|
|
||||||
setup-dev-version:
|
setup-dev-version:
|
||||||
name: Setup 3.13-dev ${{ matrix.os }}
|
name: Setup 3.14-dev ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: setup-python 3.13-dev
|
- name: setup-python 3.14-dev
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '3.13-dev'
|
python-version: '3.14-dev'
|
||||||
|
|
||||||
- name: Check python-path
|
- name: Check python-path
|
||||||
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Validate version
|
- name: Validate version
|
||||||
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.13.') }}
|
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Run simple code
|
- name: Run simple code
|
||||||
run: python -c 'import math; print(math.factorial(5))'
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
|
|
||||||
setup-prerelease-version:
|
setup-prerelease-version:
|
||||||
name: Setup 3.13 ${{ matrix.os }}
|
name: Setup 3.14 ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: setup-python 3.13
|
- name: setup-python 3.14
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.14'
|
||||||
allow-prereleases: true
|
allow-prereleases: true
|
||||||
|
|
||||||
- name: Check python-path
|
- name: Check python-path
|
||||||
@ -305,7 +305,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Validate version
|
- name: Validate version
|
||||||
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.13.') }}
|
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Run simple code
|
- name: Run simple code
|
||||||
@ -317,8 +317,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -341,8 +341,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python and check latest
|
||||||
@ -365,7 +365,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python and check latest
|
||||||
@ -377,12 +377,13 @@ jobs:
|
|||||||
3.10
|
3.10
|
||||||
3.11
|
3.11
|
||||||
3.12
|
3.12
|
||||||
|
3.13
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Validate version
|
- name: Validate version
|
||||||
run: |
|
run: |
|
||||||
$pythonVersion = (python --version)
|
$pythonVersion = (python --version)
|
||||||
if ("$pythonVersion" -NotMatch "3.12"){
|
if ("$pythonVersion" -NotMatch "3.13"){
|
||||||
Write-Host "The current version is $pythonVersion; expected version is 3.12"
|
Write-Host "The current version is $pythonVersion; expected version is 3.13"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
$pythonVersion
|
$pythonVersion
|
||||||
|
@ -21,7 +21,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.13'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ The `python-version` input supports the [Semantic Versioning Specification](http
|
|||||||
|
|
||||||
## Supported architectures
|
## Supported architectures
|
||||||
|
|
||||||
Using `architecture` input it is possible to specify the required Python or PyPy interpreter architecture: `x86` or `x64`. If the input is not specified the architecture defaults to `x64`.
|
Using the `architecture` input, it is possible to specify the required Python or PyPy interpreter architecture: `x86`, `x64`, or `arm64`. If the input is not specified, the architecture defaults to the host OS architecture.
|
||||||
|
|
||||||
## Caching packages dependencies
|
## Caching packages dependencies
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.13'
|
||||||
cache: 'pip' # caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
- run: pip install -r requirements.txt
|
- run: pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ import * as path from 'path';
|
|||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
|
|
||||||
import * as finder from '../src/find-graalpy';
|
import * as finder from '../src/find-graalpy';
|
||||||
import {IGraalPyManifestRelease, IS_WINDOWS} from '../src/utils';
|
import {IGraalPyManifestRelease} from '../src/utils';
|
||||||
|
|
||||||
import manifestData from './data/graalpy.json';
|
import manifestData from './data/graalpy.json';
|
||||||
|
|
||||||
@ -19,9 +19,6 @@ const architecture = 'x64';
|
|||||||
const toolDir = path.join(__dirname, 'runner', 'tools');
|
const toolDir = path.join(__dirname, 'runner', 'tools');
|
||||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
const tempDir = path.join(__dirname, 'runner', 'temp');
|
||||||
|
|
||||||
/* GraalPy doesn't have a windows release yet */
|
|
||||||
const describeSkipOnWindows = IS_WINDOWS ? describe.skip : describe;
|
|
||||||
|
|
||||||
describe('parseGraalPyVersion', () => {
|
describe('parseGraalPyVersion', () => {
|
||||||
it.each([
|
it.each([
|
||||||
['graalpy-23', '23'],
|
['graalpy-23', '23'],
|
||||||
@ -108,7 +105,7 @@ describe('findGraalPyToolCache', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describeSkipOnWindows('findGraalPyVersion', () => {
|
describe('findGraalPyVersion', () => {
|
||||||
let getBooleanInputSpy: jest.SpyInstance;
|
let getBooleanInputSpy: jest.SpyInstance;
|
||||||
let warningSpy: jest.SpyInstance;
|
let warningSpy: jest.SpyInstance;
|
||||||
let debugSpy: jest.SpyInstance;
|
let debugSpy: jest.SpyInstance;
|
||||||
@ -358,13 +355,13 @@ describeSkipOnWindows('findGraalPyVersion', () => {
|
|||||||
it('found and install successfully, pre-release fallback', async () => {
|
it('found and install successfully, pre-release fallback', async () => {
|
||||||
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
||||||
spyCacheDir.mockImplementation(() =>
|
spyCacheDir.mockImplementation(() =>
|
||||||
path.join(toolDir, 'GraalPy', '23.1', architecture)
|
path.join(toolDir, 'GraalPy', '24.1', architecture)
|
||||||
);
|
);
|
||||||
spyChmodSync = jest.spyOn(fs, 'chmodSync');
|
spyChmodSync = jest.spyOn(fs, 'chmodSync');
|
||||||
spyChmodSync.mockImplementation(() => undefined);
|
spyChmodSync.mockImplementation(() => undefined);
|
||||||
await expect(
|
await expect(
|
||||||
finder.findGraalPyVersion(
|
finder.findGraalPyVersion(
|
||||||
'graalpy23.1',
|
'graalpy24.1',
|
||||||
architecture,
|
architecture,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
@ -372,7 +369,7 @@ describeSkipOnWindows('findGraalPyVersion', () => {
|
|||||||
)
|
)
|
||||||
).rejects.toThrow();
|
).rejects.toThrow();
|
||||||
await expect(
|
await expect(
|
||||||
finder.findGraalPyVersion('graalpy23.1', architecture, false, false, true)
|
finder.findGraalPyVersion('graalpy24.1', architecture, false, false, true)
|
||||||
).resolves.toEqual('23.1.0-a.1');
|
).resolves.toEqual('24.1.0-ea.9');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -21,24 +21,21 @@ const architecture = 'x64';
|
|||||||
const toolDir = path.join(__dirname, 'runner', 'tools');
|
const toolDir = path.join(__dirname, 'runner', 'tools');
|
||||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
const tempDir = path.join(__dirname, 'runner', 'temp');
|
||||||
|
|
||||||
/* GraalPy doesn't have a windows release yet */
|
|
||||||
const describeSkipOnWindows = IS_WINDOWS ? describe.skip : describe;
|
|
||||||
|
|
||||||
describe('graalpyVersionToSemantic', () => {
|
describe('graalpyVersionToSemantic', () => {
|
||||||
it.each([
|
it.each([
|
||||||
['23.0.0a1', '23.0.0a1'],
|
['graalpy-24.1.0-ea.09', '24.1.0-ea.9'],
|
||||||
['23.0.0', '23.0.0'],
|
['graal-23.0.0', '23.0.0'],
|
||||||
['23.0.x', '23.0.x'],
|
['vm-23.0.x', '23.0.x'],
|
||||||
['23.x', '23.x']
|
['graal-23.x', '23.x']
|
||||||
])('%s -> %s', (input, expected) => {
|
])('%s -> %s', (input, expected) => {
|
||||||
expect(installer.graalPyTagToVersion(input)).toEqual(expected);
|
expect(installer.graalPyTagToVersion(input)).toEqual(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describeSkipOnWindows('findRelease', () => {
|
describe('findRelease', () => {
|
||||||
const result = JSON.stringify(manifestData);
|
const result = JSON.stringify(manifestData);
|
||||||
const releases = JSON.parse(result) as IGraalPyManifestRelease[];
|
const releases = JSON.parse(result) as IGraalPyManifestRelease[];
|
||||||
const extension = 'tar.gz';
|
const extension = IS_WINDOWS ? 'zip' : 'tar.gz';
|
||||||
const arch = installer.toGraalPyArchitecture(architecture);
|
const arch = installer.toGraalPyArchitecture(architecture);
|
||||||
const platform = installer.toGraalPyPlatform(process.platform);
|
const platform = installer.toGraalPyPlatform(process.platform);
|
||||||
const extensionName = `${platform}-${arch}.${extension}`;
|
const extensionName = `${platform}-${arch}.${extension}`;
|
||||||
@ -47,8 +44,8 @@ describeSkipOnWindows('findRelease', () => {
|
|||||||
browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.0.0/graalpython-23.0.0-${extensionName}`
|
browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.0.0/graalpython-23.0.0-${extensionName}`
|
||||||
};
|
};
|
||||||
const filesRC1: IGraalPyManifestAsset = {
|
const filesRC1: IGraalPyManifestAsset = {
|
||||||
name: `graalpython-23.1.0a1-${extensionName}`,
|
name: `graalpy-24.1.0-ea.09-${extensionName}`,
|
||||||
browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-${extensionName}`
|
browser_download_url: `https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-${extensionName}`
|
||||||
};
|
};
|
||||||
|
|
||||||
let warningSpy: jest.SpyInstance;
|
let warningSpy: jest.SpyInstance;
|
||||||
@ -84,15 +81,15 @@ describeSkipOnWindows('findRelease', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Preview version of GraalPy is found', () => {
|
it('Preview version of GraalPy is found', () => {
|
||||||
const graalpyVersion = installer.graalPyTagToVersion('vm-23.1.0a1');
|
const graalpyVersion = installer.graalPyTagToVersion('vm-24.1.0-ea.09');
|
||||||
expect(
|
expect(
|
||||||
installer.findRelease(releases, graalpyVersion, architecture, false)
|
installer.findRelease(releases, graalpyVersion, architecture, false)
|
||||||
).toMatchObject({
|
).toMatchObject({
|
||||||
foundAsset: {
|
foundAsset: {
|
||||||
name: `graalpython-23.1.0a1-${extensionName}`,
|
name: `graalpy-24.1.0-ea.09-${extensionName}`,
|
||||||
browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-${extensionName}`
|
browser_download_url: `https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-${extensionName}`
|
||||||
},
|
},
|
||||||
resolvedGraalPyVersion: '23.1.0-a.1'
|
resolvedGraalPyVersion: '24.1.0-ea.9'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -107,7 +104,7 @@ describeSkipOnWindows('findRelease', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('GraalPy version matches semver (pre-release)', () => {
|
it('GraalPy version matches semver (pre-release)', () => {
|
||||||
const graalpyVersion = '23.1.x';
|
const graalpyVersion = '24.1.x';
|
||||||
expect(
|
expect(
|
||||||
installer.findRelease(releases, graalpyVersion, architecture, false)
|
installer.findRelease(releases, graalpyVersion, architecture, false)
|
||||||
).toBeNull();
|
).toBeNull();
|
||||||
@ -115,12 +112,12 @@ describeSkipOnWindows('findRelease', () => {
|
|||||||
installer.findRelease(releases, graalpyVersion, architecture, true)
|
installer.findRelease(releases, graalpyVersion, architecture, true)
|
||||||
).toMatchObject({
|
).toMatchObject({
|
||||||
foundAsset: filesRC1,
|
foundAsset: filesRC1,
|
||||||
resolvedGraalPyVersion: '23.1.0-a.1'
|
resolvedGraalPyVersion: '24.1.0-ea.9'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describeSkipOnWindows('installGraalPy', () => {
|
describe('installGraalPy', () => {
|
||||||
let tcFind: jest.SpyInstance;
|
let tcFind: jest.SpyInstance;
|
||||||
let warningSpy: jest.SpyInstance;
|
let warningSpy: jest.SpyInstance;
|
||||||
let debugSpy: jest.SpyInstance;
|
let debugSpy: jest.SpyInstance;
|
||||||
@ -232,20 +229,20 @@ describeSkipOnWindows('installGraalPy', () => {
|
|||||||
it('found and install GraalPy, pre-release fallback', async () => {
|
it('found and install GraalPy, pre-release fallback', async () => {
|
||||||
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
||||||
spyCacheDir.mockImplementation(() =>
|
spyCacheDir.mockImplementation(() =>
|
||||||
path.join(toolDir, 'GraalPy', '23.1.0', architecture)
|
path.join(toolDir, 'GraalPy', '24.1.0', architecture)
|
||||||
);
|
);
|
||||||
|
|
||||||
spyChmodSync = jest.spyOn(fs, 'chmodSync');
|
spyChmodSync = jest.spyOn(fs, 'chmodSync');
|
||||||
spyChmodSync.mockImplementation(() => undefined);
|
spyChmodSync.mockImplementation(() => undefined);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
installer.installGraalPy('23.1.x', architecture, false, undefined)
|
installer.installGraalPy('24.1.x', architecture, false, undefined)
|
||||||
).rejects.toThrow();
|
).rejects.toThrow();
|
||||||
await expect(
|
await expect(
|
||||||
installer.installGraalPy('23.1.x', architecture, true, undefined)
|
installer.installGraalPy('24.1.x', architecture, true, undefined)
|
||||||
).resolves.toEqual({
|
).resolves.toEqual({
|
||||||
installDir: path.join(toolDir, 'GraalPy', '23.1.0', architecture),
|
installDir: path.join(toolDir, 'GraalPy', '24.1.0', architecture),
|
||||||
resolvedGraalPyVersion: '23.1.0-a.1'
|
resolvedGraalPyVersion: '24.1.0-ea.9'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(spyHttpClient).toHaveBeenCalled();
|
expect(spyHttpClient).toHaveBeenCalled();
|
||||||
|
@ -11,7 +11,7 @@ inputs:
|
|||||||
description: "Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry."
|
description: "Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry."
|
||||||
required: false
|
required: false
|
||||||
architecture:
|
architecture:
|
||||||
description: "The target architecture (x86, x64) of the Python or PyPy interpreter."
|
description: "The target architecture (x86, x64, arm64) of the Python or PyPy interpreter."
|
||||||
check-latest:
|
check-latest:
|
||||||
description: "Set this option if you want the action to check for the latest available version that satisfies the version spec."
|
description: "Set this option if you want the action to check for the latest available version that satisfies the version spec."
|
||||||
default: false
|
default: false
|
||||||
|
2
dist/cache-save/index.js
vendored
2
dist/cache-save/index.js
vendored
@ -81165,7 +81165,7 @@ function saveCache(packageManager) {
|
|||||||
const cachePaths = JSON.parse(cachePathState);
|
const cachePaths = JSON.parse(cachePathState);
|
||||||
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
|
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
|
||||||
if (!isCacheDirectoryExists(cachePaths)) {
|
if (!isCacheDirectoryExists(cachePaths)) {
|
||||||
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}`);
|
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`);
|
||||||
}
|
}
|
||||||
const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
|
const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
|
||||||
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);
|
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);
|
||||||
|
36
dist/setup/index.js
vendored
36
dist/setup/index.js
vendored
@ -90752,8 +90752,8 @@ function findGraalPyVersion(versionSpec, architecture, updateEnvironment, checkL
|
|||||||
const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin';
|
const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin';
|
||||||
const _binDir = path.join(installDir, pipDir);
|
const _binDir = path.join(installDir, pipDir);
|
||||||
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
||||||
const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
|
const pythonPath = path.join(_binDir, `python${binaryExtension}`);
|
||||||
const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir);
|
const pythonLocation = path.join(installDir, 'bin');
|
||||||
if (updateEnvironment) {
|
if (updateEnvironment) {
|
||||||
core.exportVariable('pythonLocation', installDir);
|
core.exportVariable('pythonLocation', installDir);
|
||||||
// https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
|
// https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
|
||||||
@ -91225,7 +91225,12 @@ function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases
|
|||||||
try {
|
try {
|
||||||
const graalpyPath = yield tc.downloadTool(downloadUrl, undefined, AUTH);
|
const graalpyPath = yield tc.downloadTool(downloadUrl, undefined, AUTH);
|
||||||
core.info('Extracting downloaded archive...');
|
core.info('Extracting downloaded archive...');
|
||||||
downloadDir = yield tc.extractTar(graalpyPath);
|
if (utils_1.IS_WINDOWS) {
|
||||||
|
downloadDir = yield tc.extractZip(graalpyPath);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
downloadDir = yield tc.extractTar(graalpyPath);
|
||||||
|
}
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
||||||
@ -91234,7 +91239,7 @@ function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases
|
|||||||
if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) {
|
if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) {
|
||||||
installDir = yield tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture);
|
installDir = yield tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture);
|
||||||
}
|
}
|
||||||
const binaryPath = (0, utils_1.getBinaryDirectory)(installDir);
|
const binaryPath = path.join(installDir, 'bin');
|
||||||
yield createGraalPySymlink(binaryPath, resolvedGraalPyVersion);
|
yield createGraalPySymlink(binaryPath, resolvedGraalPyVersion);
|
||||||
yield installPip(binaryPath);
|
yield installPip(binaryPath);
|
||||||
return { installDir, resolvedGraalPyVersion };
|
return { installDir, resolvedGraalPyVersion };
|
||||||
@ -91265,6 +91270,9 @@ function getAvailableGraalPyVersions() {
|
|||||||
if (AUTH) {
|
if (AUTH) {
|
||||||
headers.authorization = AUTH;
|
headers.authorization = AUTH;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Get releases first.
|
||||||
|
*/
|
||||||
let url = 'https://api.github.com/repos/oracle/graalpython/releases';
|
let url = 'https://api.github.com/repos/oracle/graalpython/releases';
|
||||||
const result = [];
|
const result = [];
|
||||||
do {
|
do {
|
||||||
@ -91275,6 +91283,19 @@ function getAvailableGraalPyVersions() {
|
|||||||
result.push(...response.result);
|
result.push(...response.result);
|
||||||
url = (0, utils_1.getNextPageUrl)(response);
|
url = (0, utils_1.getNextPageUrl)(response);
|
||||||
} while (url);
|
} while (url);
|
||||||
|
/*
|
||||||
|
Add pre-release builds.
|
||||||
|
*/
|
||||||
|
url =
|
||||||
|
'https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases';
|
||||||
|
do {
|
||||||
|
const response = yield http.getJson(url, headers);
|
||||||
|
if (!response.result) {
|
||||||
|
throw new Error(`Unable to retrieve the list of available GraalPy versions from '${url}'`);
|
||||||
|
}
|
||||||
|
result.push(...response.result);
|
||||||
|
url = (0, utils_1.getNextPageUrl)(response);
|
||||||
|
} while (url);
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -91300,7 +91321,7 @@ function installPip(pythonLocation) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function graalPyTagToVersion(tag) {
|
function graalPyTagToVersion(tag) {
|
||||||
const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)((?:a|b|rc))?(\d*)?/;
|
const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)(?:-((?:ea|a|b|rc))\.0*(\d*))?/;
|
||||||
const match = tag.match(versionPattern);
|
const match = tag.match(versionPattern);
|
||||||
if (match && match[2]) {
|
if (match && match[2]) {
|
||||||
return `${match[1]}-${match[2]}.${match[3]}`;
|
return `${match[1]}-${match[2]}.${match[3]}`;
|
||||||
@ -91354,8 +91375,9 @@ exports.toGraalPyArchitecture = toGraalPyArchitecture;
|
|||||||
function findAsset(item, architecture, platform) {
|
function findAsset(item, architecture, platform) {
|
||||||
const graalpyArch = toGraalPyArchitecture(architecture);
|
const graalpyArch = toGraalPyArchitecture(architecture);
|
||||||
const graalpyPlatform = toGraalPyPlatform(platform);
|
const graalpyPlatform = toGraalPyPlatform(platform);
|
||||||
|
const graalpyExt = platform == 'win32' ? 'zip' : 'tar.gz';
|
||||||
const found = item.assets.filter(file => file.name.startsWith('graalpy') &&
|
const found = item.assets.filter(file => file.name.startsWith('graalpy') &&
|
||||||
file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.tar.gz`));
|
file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.${graalpyExt}`));
|
||||||
/*
|
/*
|
||||||
In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant.
|
In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant.
|
||||||
*/
|
*/
|
||||||
@ -92176,7 +92198,7 @@ function getVersionInputFromFile(versionFile) {
|
|||||||
}
|
}
|
||||||
exports.getVersionInputFromFile = getVersionInputFromFile;
|
exports.getVersionInputFromFile = getVersionInputFromFile;
|
||||||
/**
|
/**
|
||||||
* Get the directory containing interpreter binary from installation directory of PyPy or GraalPy
|
* Get the directory containing interpreter binary from installation directory of PyPy
|
||||||
* - On Linux and macOS, the Python interpreter is in 'bin'.
|
* - On Linux and macOS, the Python interpreter is in 'bin'.
|
||||||
* - On Windows, it is in the installation root.
|
* - On Windows, it is in the installation root.
|
||||||
*/
|
*/
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
|
|
||||||
### Specifying a Python version
|
### Specifying a Python version
|
||||||
|
|
||||||
If there is a specific version of Python that you need and you don't want to worry about any potential breaking changes due to patch updates (going from `3.7.5` to `3.7.6` for example), you should specify the **exact major, minor, and patch version** (such as `3.7.5`):
|
If there is a specific version of Python that you need and you don't want to worry about any potential breaking changes due to patch updates (going from `3.12.6` to `3.12.7` for example), you should specify the **exact major, minor, and patch version** (such as `3.12.6`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.7.5'
|
python-version: '3.12.6'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.13'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
- There will be a single patch version already installed on each runner for every minor version of Python that is supported.
|
- There will be a single patch version already installed on each runner for every minor version of Python that is supported.
|
||||||
@ -62,7 +62,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12.0-alpha.1'
|
python-version: '3.14.0-alpha.1'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12-dev'
|
python-version: '3.14-dev'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '>=3.9 <3.10'
|
python-version: '>=3.9 <3.14'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12.0-alpha - 3.12.0'
|
python-version: '3.13.0-alpha - 3.13.0'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -118,6 +118,7 @@ The version of PyPy should be specified in the format `pypy<python_version>[-v<p
|
|||||||
The `-v<pypy_version>` parameter is optional and can be skipped. The latest PyPy version will be used in this case.
|
The `-v<pypy_version>` parameter is optional and can be skipped. The latest PyPy version will be used in this case.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
pypy3.10 or pypy-3.10 # the latest available version of PyPy that supports Python 3.10
|
||||||
pypy3.9 or pypy-3.9 # the latest available version of PyPy that supports Python 3.9
|
pypy3.9 or pypy-3.9 # the latest available version of PyPy that supports Python 3.9
|
||||||
pypy2.7 or pypy-2.7 # the latest available version of PyPy that supports Python 2.7
|
pypy2.7 or pypy-2.7 # the latest available version of PyPy that supports Python 2.7
|
||||||
pypy3.7-v7.3.3 or pypy-3.7-v7.3.3 # Python 3.7 and PyPy 7.3.3
|
pypy3.7-v7.3.3 or pypy-3.7-v7.3.3 # Python 3.7 and PyPy 7.3.3
|
||||||
@ -135,8 +136,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
python-version:
|
||||||
- 'pypy3.7' # the latest available version of PyPy that supports Python 3.7
|
- 'pypy3.10' # the latest available version of PyPy that supports Python 3.10
|
||||||
- 'pypy3.7-v7.3.3' # Python 3.7 and PyPy 7.3.3
|
- 'pypy3.10-v7.3.17' # Python 3.10 and PyPy 7.3.17
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
@ -160,9 +161,9 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
3.8
|
3.11
|
||||||
3.9
|
3.12
|
||||||
3.10
|
3.13
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -177,9 +178,9 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
pypy-3.7-v7.3.x
|
pypy-3.10-v7.3.x
|
||||||
pypy3.9-nightly
|
pypy3.10-nightly
|
||||||
pypy3.8
|
pypy3.9
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -194,11 +195,11 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
3.8
|
3.11
|
||||||
3.9
|
3.12
|
||||||
pypy3.9-nightly
|
pypy3.10-nightly
|
||||||
pypy3.8
|
pypy3.10
|
||||||
3.10
|
3.13
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -212,7 +213,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ '2.x', '3.x', 'pypy2.7', 'pypy3.8', 'pypy3.9' ]
|
python-version: ['3.x', 'pypy2.7', 'pypy3.8', 'pypy3.9' ]
|
||||||
name: Python ${{ matrix.python-version }} sample
|
name: Python ${{ matrix.python-version }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -233,12 +234,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', 'pypy2.7', 'pypy3.9']
|
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy2.7', 'pypy3.9']
|
||||||
exclude:
|
exclude:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
python-version: '3.6'
|
python-version: '3.8'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
@ -284,7 +285,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.13'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
@ -299,7 +300,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.13'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
- name: Install pipenv
|
- name: Install pipenv
|
||||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||||
@ -314,7 +315,7 @@ steps:
|
|||||||
run: pipx install poetry
|
run: pipx install poetry
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.13'
|
||||||
cache: 'poetry'
|
cache: 'poetry'
|
||||||
- run: poetry install
|
- run: poetry install
|
||||||
- run: poetry run pytest
|
- run: poetry run pytest
|
||||||
@ -327,7 +328,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.13'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
server/app/Pipfile.lock
|
server/app/Pipfile.lock
|
||||||
@ -342,7 +343,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: '**/requirements-dev.txt'
|
cache-dependency-path: '**/requirements-dev.txt'
|
||||||
- run: pip install -r subdirectory/requirements-dev.txt
|
- run: pip install -r subdirectory/requirements-dev.txt
|
||||||
@ -354,7 +355,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
**/setup.cfg
|
**/setup.cfg
|
||||||
@ -369,7 +370,7 @@ steps:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: setup.py
|
cache-dependency-path: setup.py
|
||||||
- run: pip install -e .
|
- run: pip install -e .
|
||||||
@ -382,7 +383,7 @@ steps:
|
|||||||
|
|
||||||
### `python-version`
|
### `python-version`
|
||||||
|
|
||||||
Using **python-version** output it's possible to get the installed by action Python or PyPy version. This output is useful when the input `python-version` is given as a range (e.g. 3.8.0 - 3.10.0 ), but down in a workflow you need to operate with the exact installed version (e.g. 3.10.1).
|
Using **python-version** output it's possible to get the installed by action Python or PyPy version. This output is useful when the input `python-version` is given as a range (e.g. 3.8.0 - 3.12.0 ), but down in a workflow you need to operate with the exact installed version (e.g. 3.12.1).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
@ -391,10 +392,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
id: cp310
|
id: cp312
|
||||||
with:
|
with:
|
||||||
python-version: "3.8.0 - 3.10.0"
|
python-version: "3.8.0 - 3.12.0"
|
||||||
- run: echo '${{ steps.cp310.outputs.python-version }}'
|
- run: echo '${{ steps.cp312.outputs.python-version }}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### `python-path`
|
### `python-path`
|
||||||
@ -408,10 +409,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
id: cp310
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.13"
|
||||||
- run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
|
- run: pipx run --python '${{ steps.cp313.outputs.python-path }}' nox --version
|
||||||
```
|
```
|
||||||
### `cache-hit`
|
### `cache-hit`
|
||||||
|
|
||||||
@ -424,11 +425,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
id: cp310
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: "3.8.0"
|
python-version: "3.13.0"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: echo '${{ steps.cp310.outputs.cache-hit }}' # true if cache-hit occurred on the primary key
|
- run: echo '${{ steps.cp313.outputs.cache-hit }}' # true if cache-hit occurred on the primary key
|
||||||
```
|
```
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
@ -455,11 +456,11 @@ Such a requirement on side-effect could be because you don't want your composite
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
id: cp310
|
id: cp313
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.13'
|
||||||
update-environment: false
|
update-environment: false
|
||||||
- run: ${{ steps.cp310.outputs.python-path }} my_script.py
|
- run: ${{ steps.cp313.outputs.python-path }} my_script.py
|
||||||
```
|
```
|
||||||
## Available versions of Python, PyPy and GraalPy
|
## Available versions of Python, PyPy and GraalPy
|
||||||
### Python
|
### Python
|
||||||
@ -469,9 +470,9 @@ Such a requirement on side-effect could be because you don't want your composite
|
|||||||
- Preinstalled versions of Python in the tool cache on GitHub-hosted runners.
|
- Preinstalled versions of Python in the tool cache on GitHub-hosted runners.
|
||||||
- For detailed information regarding the available versions of Python that are installed, see [Supported software](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-software).
|
- For detailed information regarding the available versions of Python that are installed, see [Supported software](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-software).
|
||||||
- For every minor version of Python, expect only the latest patch to be preinstalled.
|
- For every minor version of Python, expect only the latest patch to be preinstalled.
|
||||||
- If `3.8.1` is installed for example, and `3.8.2` is released, expect `3.8.1` to be removed and replaced by `3.8.2` in the tool cache.
|
- If `3.12.1` is installed for example, and `3.12.2` is released, expect `3.12.1` to be removed and replaced by `3.12.2` in the tool cache.
|
||||||
- If the exact patch version doesn't matter to you, specifying just the major and minor versions will get you the latest preinstalled patch version. In the previous example, the version spec `3.8` will use the `3.8.2` Python version found in the cache.
|
- If the exact patch version doesn't matter to you, specifying just the major and minor versions will get you the latest preinstalled patch version. In the previous example, the version spec `3.12` will use the `3.12.2` Python version found in the cache.
|
||||||
- Use `-dev` instead of a patch number (e.g., `3.12-dev`) to install the latest patch version release for a given minor version, *alpha and beta releases included*.
|
- Use `-dev` instead of a patch number (e.g., `3.14-dev`) to install the latest patch version release for a given minor version, *alpha and beta releases included*.
|
||||||
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases)).
|
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases)).
|
||||||
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file.
|
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file.
|
||||||
- If there is a specific version of Python that is not available, you can open an issue here
|
- If there is a specific version of Python that is not available, you can open an issue here
|
||||||
@ -485,7 +486,7 @@ Such a requirement on side-effect could be because you don't want your composite
|
|||||||
- Preinstalled versions of PyPy in the tool cache on GitHub-hosted runners
|
- Preinstalled versions of PyPy in the tool cache on GitHub-hosted runners
|
||||||
- For detailed information regarding the available versions of PyPy that are installed, see [Supported software](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-software).
|
- For detailed information regarding the available versions of PyPy that are installed, see [Supported software](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-software).
|
||||||
- For the latest PyPy release, all versions of Python are cached.
|
- For the latest PyPy release, all versions of Python are cached.
|
||||||
- Cache is updated with a 1-2 week delay. If you specify the PyPy version as `pypy3.7` or `pypy-3.7`, the cached version will be used although a newer version is available. If you need to start using the recently released version right after release, you should specify the exact PyPy version using `pypy3.7-v7.3.3` or `pypy-3.7-v7.3.3`.
|
- Cache is updated with a 1-2 week delay. If you specify the PyPy version as `pypy3.10` or `pypy-3.10`, the cached version will be used although a newer version is available. If you need to start using the recently released version right after release, you should specify the exact PyPy version using `pypy3.10-v7.3.17` or `pypy-3.10-v7.3.17`.
|
||||||
|
|
||||||
- Downloadable PyPy versions from the [official PyPy site](https://downloads.python.org/pypy/).
|
- Downloadable PyPy versions from the [official PyPy site](https://downloads.python.org/pypy/).
|
||||||
- All available versions that we can download are listed in [versions.json](https://downloads.python.org/pypy/versions.json) file.
|
- All available versions that we can download are listed in [versions.json](https://downloads.python.org/pypy/versions.json) file.
|
||||||
@ -596,7 +597,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [Ubuntu, Windows, macOS]
|
os: [Ubuntu, Windows, macOS]
|
||||||
python_version: ["3.11", "3.12"]
|
python_version: ["3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -41,7 +41,7 @@ async function saveCache(packageManager: string) {
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(
|
`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(
|
||||||
', '
|
', '
|
||||||
)}`
|
)}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as graalpyInstall from './install-graalpy';
|
import * as graalpyInstall from './install-graalpy';
|
||||||
import {
|
import {IS_WINDOWS, validateVersion, IGraalPyManifestRelease} from './utils';
|
||||||
IS_WINDOWS,
|
|
||||||
validateVersion,
|
|
||||||
IGraalPyManifestRelease,
|
|
||||||
getBinaryDirectory
|
|
||||||
} from './utils';
|
|
||||||
|
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
@ -62,11 +57,8 @@ export async function findGraalPyVersion(
|
|||||||
const pipDir = IS_WINDOWS ? 'Scripts' : 'bin';
|
const pipDir = IS_WINDOWS ? 'Scripts' : 'bin';
|
||||||
const _binDir = path.join(installDir, pipDir);
|
const _binDir = path.join(installDir, pipDir);
|
||||||
const binaryExtension = IS_WINDOWS ? '.exe' : '';
|
const binaryExtension = IS_WINDOWS ? '.exe' : '';
|
||||||
const pythonPath = path.join(
|
const pythonPath = path.join(_binDir, `python${binaryExtension}`);
|
||||||
IS_WINDOWS ? installDir : _binDir,
|
const pythonLocation = path.join(installDir, 'bin');
|
||||||
`python${binaryExtension}`
|
|
||||||
);
|
|
||||||
const pythonLocation = getBinaryDirectory(installDir);
|
|
||||||
if (updateEnvironment) {
|
if (updateEnvironment) {
|
||||||
core.exportVariable('pythonLocation', installDir);
|
core.exportVariable('pythonLocation', installDir);
|
||||||
// https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
|
// https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython
|
||||||
|
@ -15,7 +15,6 @@ import {
|
|||||||
IGraalPyManifestRelease,
|
IGraalPyManifestRelease,
|
||||||
createSymlinkInFolder,
|
createSymlinkInFolder,
|
||||||
isNightlyKeyword,
|
isNightlyKeyword,
|
||||||
getBinaryDirectory,
|
|
||||||
getNextPageUrl
|
getNextPageUrl
|
||||||
} from './utils';
|
} from './utils';
|
||||||
|
|
||||||
@ -64,7 +63,11 @@ export async function installGraalPy(
|
|||||||
const graalpyPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
|
const graalpyPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
|
||||||
|
|
||||||
core.info('Extracting downloaded archive...');
|
core.info('Extracting downloaded archive...');
|
||||||
downloadDir = await tc.extractTar(graalpyPath);
|
if (IS_WINDOWS) {
|
||||||
|
downloadDir = await tc.extractZip(graalpyPath);
|
||||||
|
} else {
|
||||||
|
downloadDir = await tc.extractTar(graalpyPath);
|
||||||
|
}
|
||||||
|
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
@ -81,7 +84,7 @@ export async function installGraalPy(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const binaryPath = getBinaryDirectory(installDir);
|
const binaryPath = path.join(installDir, 'bin');
|
||||||
await createGraalPySymlink(binaryPath, resolvedGraalPyVersion);
|
await createGraalPySymlink(binaryPath, resolvedGraalPyVersion);
|
||||||
await installPip(binaryPath);
|
await installPip(binaryPath);
|
||||||
|
|
||||||
@ -115,6 +118,9 @@ export async function getAvailableGraalPyVersions() {
|
|||||||
headers.authorization = AUTH;
|
headers.authorization = AUTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get releases first.
|
||||||
|
*/
|
||||||
let url: string | null =
|
let url: string | null =
|
||||||
'https://api.github.com/repos/oracle/graalpython/releases';
|
'https://api.github.com/repos/oracle/graalpython/releases';
|
||||||
const result: IGraalPyManifestRelease[] = [];
|
const result: IGraalPyManifestRelease[] = [];
|
||||||
@ -130,6 +136,23 @@ export async function getAvailableGraalPyVersions() {
|
|||||||
url = getNextPageUrl(response);
|
url = getNextPageUrl(response);
|
||||||
} while (url);
|
} while (url);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Add pre-release builds.
|
||||||
|
*/
|
||||||
|
url =
|
||||||
|
'https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases';
|
||||||
|
do {
|
||||||
|
const response: ifm.TypedResponse<IGraalPyManifestRelease[]> =
|
||||||
|
await http.getJson(url, headers);
|
||||||
|
if (!response.result) {
|
||||||
|
throw new Error(
|
||||||
|
`Unable to retrieve the list of available GraalPy versions from '${url}'`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
result.push(...response.result);
|
||||||
|
url = getNextPageUrl(response);
|
||||||
|
} while (url);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +198,8 @@ async function installPip(pythonLocation: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function graalPyTagToVersion(tag: string) {
|
export function graalPyTagToVersion(tag: string) {
|
||||||
const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)((?:a|b|rc))?(\d*)?/;
|
const versionPattern =
|
||||||
|
/.*-(\d+\.\d+\.\d+(?:\.\d+)?)(?:-((?:ea|a|b|rc))\.0*(\d*))?/;
|
||||||
const match = tag.match(versionPattern);
|
const match = tag.match(versionPattern);
|
||||||
if (match && match[2]) {
|
if (match && match[2]) {
|
||||||
return `${match[1]}-${match[2]}.${match[3]}`;
|
return `${match[1]}-${match[2]}.${match[3]}`;
|
||||||
@ -251,10 +275,11 @@ export function findAsset(
|
|||||||
) {
|
) {
|
||||||
const graalpyArch = toGraalPyArchitecture(architecture);
|
const graalpyArch = toGraalPyArchitecture(architecture);
|
||||||
const graalpyPlatform = toGraalPyPlatform(platform);
|
const graalpyPlatform = toGraalPyPlatform(platform);
|
||||||
|
const graalpyExt = platform == 'win32' ? 'zip' : 'tar.gz';
|
||||||
const found = item.assets.filter(
|
const found = item.assets.filter(
|
||||||
file =>
|
file =>
|
||||||
file.name.startsWith('graalpy') &&
|
file.name.startsWith('graalpy') &&
|
||||||
file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.tar.gz`)
|
file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.${graalpyExt}`)
|
||||||
);
|
);
|
||||||
/*
|
/*
|
||||||
In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant.
|
In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant.
|
||||||
|
@ -290,7 +290,7 @@ export function getVersionInputFromFile(versionFile: string): string[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the directory containing interpreter binary from installation directory of PyPy or GraalPy
|
* Get the directory containing interpreter binary from installation directory of PyPy
|
||||||
* - On Linux and macOS, the Python interpreter is in 'bin'.
|
* - On Linux and macOS, the Python interpreter is in 'bin'.
|
||||||
* - On Windows, it is in the installation root.
|
* - On Windows, it is in the installation root.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user