Compare commits

..

9 Commits

Author SHA1 Message Date
48d30280e0 Bump @vercel/ncc from 0.38.3 to 0.38.4
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.38.3 to 0.38.4.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.3...0.38.4)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-version: 0.38.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:13:01 +00:00
83679a892e Bump @types/node from 24.1.0 to 24.9.1 and update macos-13 to macos-15-intel (#1235)
* Bump @types/node from 24.1.0 to 24.9.1

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.1.0 to 24.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix license check failure

* update macos-13 to macos-15-intel

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Priyagupta108 <priyagupta108@github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-11-24 11:15:58 -06:00
bfc4944b43 Bump prettier from 3.5.3 to 3.6.2 (#1234)
Bumps [prettier](https://github.com/prettier/prettier) from 3.5.3 to 3.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.3...3.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.6.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 14:22:03 -06:00
97aeb3efb8 Bump requests from 2.32.2 to 2.32.4 in /__tests__/data (#1130)
Bumps [requests](https://github.com/psf/requests) from 2.32.2 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.2...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-13 13:37:31 -06:00
443da59188 Bump actions/publish-action from 0.3.0 to 0.4.0 & Documentation update for pip-install input (#1199)
* Bump actions/publish-action from 0.3.0 to 0.4.0

Bumps [actions/publish-action](https://github.com/actions/publish-action) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/actions/publish-action/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: actions/publish-action
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* updated README for pip-install

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gowridurgad <gowridurgad@gmail.com>
2025-11-12 12:53:30 -06:00
cfd55ca824 graalpy: add graalpy early-access and windows builds (#880) 2025-10-22 11:16:57 -05:00
bba65e51ff Bump typescript from 5.4.2 to 5.9.3 and update docs/advanced-usage.md (#1094)
* Bump typescript from 5.4.2 to 5.8.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.4.2 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.4.2...v5.8.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update header text from 'Linux' to 'Ubuntu'

* update target to ES2022

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: priya-kinthali <priya-kinthali@github.com>
2025-10-20 11:11:26 -05:00
18566f86b3 Improve wording and "fix example" (remove 3.13) on testing against pre-release (#979)
* Improve wording and "fix example" (remove 3.13) on testing against pre-releases

3.13 was added in a mass tune up in 0b93645e9f , without
adjusting the wording. With 3.13 listed there too, example does not really make much
sense. So I decided to make it explicit in wording and remove 3.13, so whenever next
refactoring to add 3.14 to be added to every line where 3.13 is -- this would not
even come to attention

* Update to use 3.14 not 3.12 as an example for pre-release
2025-10-14 11:42:06 -05:00
2e3e4b15a8 Add support for pip-install input (#1201)
* Add pip-install input

* Improve error message

* Logic update

---------

Co-authored-by: “gowridurgad” <“hgowridurgad@github.com>
2025-09-25 22:01:19 -05:00
27 changed files with 1157 additions and 1024 deletions

View File

@ -29,7 +29,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.0t, 3.13.1t, 3.13.2t] python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps: steps:
@ -56,7 +56,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.1t, 3.13.2t, 3.13.5t] python-version: [3.13.1t, 3.13.2t, 3.13.5t]
steps: steps:
@ -86,7 +86,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.0, 3.13.1, 3.13.2] python-version: [3.13.0, 3.13.1, 3.13.2]
steps: steps:
@ -118,7 +118,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.0t, 3.13.1t, 3.13.2t] python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps: steps:
@ -146,7 +146,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.1t, 3.13.2t, 3.13.5t] python-version: [3.13.1t, 3.13.2t, 3.13.5t]
steps: steps:
@ -177,7 +177,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.0t, 3.13.1t, 3.13.2t] python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps: steps:
@ -205,7 +205,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13.0t, 3.13.1t, 3.13.2t] python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps: steps:
@ -219,3 +219,56 @@ jobs:
pip-version: '25.0.1' pip-version: '25.0.1'
- name: Install dependencies - name: Install dependencies
run: pip install numpy pandas requests run: pip install numpy pandas requests
python-pip-dependencies-caching-with-pip-install:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-15-intel
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
pip-install: numpy pandas requests
python-pip-dependencies-caching-path-with-pip-install:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-15-intel
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: __tests__/data/requirements.txt
pip-install: numpy pandas requests

View File

@ -29,7 +29,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: python-version:
[ [
@ -72,7 +72,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: python-version:
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13'] ['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
@ -129,7 +129,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: python-version:
[ [
@ -170,7 +170,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: python-version:
[ [
@ -213,7 +213,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: python-version:
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13'] ['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
@ -269,7 +269,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps: steps:
@ -297,7 +297,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
windows-latest, windows-latest,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps: steps:
@ -311,3 +311,56 @@ jobs:
pip-version: '25.0.1' pip-version: '25.0.1'
- name: Install dependencies - name: Install dependencies
run: pip install numpy pandas requests run: pip install numpy pandas requests
python-pip-dependencies-caching-with-pip-install:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-15-intel
]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
pip-install: numpy pandas requests
python-pip-dependencies-caching-path-with-pip-install:
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-15-intel
]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: __tests__/data/requirements.txt
pip-install: numpy pandas requests

View File

@ -25,7 +25,7 @@ jobs:
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm, ubuntu-24.04-arm,
macos-latest, macos-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- name: Checkout - name: Checkout

View File

@ -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.3.0 uses: actions/publish-action@v0.4.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@ -25,7 +25,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
graalpy: graalpy:
- 'graalpy-22.3' - 'graalpy-22.3'
@ -80,7 +80,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1'] graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1']
@ -106,7 +106,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest, macos-13] os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Setup GraalPy and check latest - name: Setup GraalPy and check latest

View File

@ -28,7 +28,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
pypy: pypy:
- 'pypy-2.7' - 'pypy-2.7'
@ -85,7 +85,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: os:
- macos-13 - macos-15-intel
- macos-14 - macos-14
- macos-15 - macos-15
- windows-2022 - windows-2022
@ -144,7 +144,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly', 'pypy3.11'] pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly', 'pypy3.11']
@ -178,7 +178,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@ -220,7 +220,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5

View File

@ -26,7 +26,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -63,7 +63,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -103,7 +103,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -141,7 +141,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -182,7 +182,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -223,7 +223,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -254,7 +254,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -294,7 +294,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -334,7 +334,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -373,7 +373,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- name: Checkout - name: Checkout
@ -410,7 +410,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- name: Checkout - name: Checkout
@ -446,7 +446,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -481,7 +481,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
python-version: [3.13t, 3.14t-dev] python-version: [3.13t, 3.14t-dev]
steps: steps:
@ -508,7 +508,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@ -535,7 +535,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]

View File

@ -26,7 +26,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -70,7 +70,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -117,7 +117,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -162,7 +162,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -212,7 +212,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -262,7 +262,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -296,7 +296,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -346,7 +346,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -396,7 +396,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -441,7 +441,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- name: Checkout - name: Checkout
@ -478,7 +478,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- name: Checkout - name: Checkout
@ -514,7 +514,7 @@ jobs:
windows-latest, windows-latest,
ubuntu-22.04, ubuntu-22.04,
ubuntu-22.04-arm, ubuntu-22.04-arm,
macos-13, macos-15-intel,
ubuntu-latest, ubuntu-latest,
ubuntu-24.04-arm ubuntu-24.04-arm
] ]
@ -549,7 +549,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps: steps:
@ -582,7 +582,7 @@ jobs:
ubuntu-22.04-arm, ubuntu-22.04-arm,
ubuntu-24.04-arm, ubuntu-24.04-arm,
ubuntu-latest, ubuntu-latest,
macos-13 macos-15-intel
] ]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5

View File

@ -1,6 +1,6 @@
--- ---
name: "@types/node" name: "@types/node"
version: 24.1.0 version: 24.10.1
type: npm type: npm
summary: TypeScript definitions for node summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node

View File

@ -1,15 +1,17 @@
--- ---
name: undici-types name: undici-types
version: 7.8.0 version: 7.16.0
type: npm type: npm
summary: A stand-alone types package for Undici summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org homepage: https://undici.nodejs.org
license: mit license: mit
licenses: licenses:
- sources: Auto-generated MIT license text - sources: LICENSE
text: | text: |
MIT License MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights

View File

@ -118,6 +118,7 @@ See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poet
- [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes) - [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes)
- [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases) - [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases)
- [Using the pip-version input](docs/advanced-usage.md#using-the-pip-version-input) - [Using the pip-version input](docs/advanced-usage.md#using-the-pip-version-input)
- [Using the pip-install input](docs/advanced-usage.md#using-the-pip-install-input)
## Recommended permissions ## Recommended permissions

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,6 @@ Kivy-Garden==0.1.4
packaging==20.7 packaging==20.7
pdf2image==1.12.1 pdf2image==1.12.1
Pygments==2.6.1 Pygments==2.6.1
requests==2.32.2 requests==2.32.4
urllib3==2.5.0 urllib3==2.5.0
xlrd==1.2.0 xlrd==1.2.0

View File

@ -40,7 +40,7 @@ pyparsing==2.4.7; python_version >= '2.6' and python_version not in '3.0, 3.1, 3
pywin32-ctypes==0.2.0 pywin32-ctypes==0.2.0
requests==2.32.2 requests==2.32.4
urllib3==2.5.0 urllib3==2.5.0

View File

@ -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');
}); });
}); });

View File

@ -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();

View File

@ -31,6 +31,8 @@ inputs:
default: false default: false
pip-version: pip-version:
description: "Used to specify the version of pip to install with the Python. Supported format: major[.minor][.patch]." description: "Used to specify the version of pip to install with the Python. Supported format: major[.minor][.patch]."
pip-install:
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names."
outputs: outputs:
python-version: python-version:
description: "The installed Python or PyPy version. Useful when given a version range as input." description: "The installed Python or PyPy version. Useful when given a version range as input."

View File

@ -87743,10 +87743,12 @@ var State;
State["CACHE_PATHS"] = "cache-paths"; State["CACHE_PATHS"] = "cache-paths";
})(State || (exports.State = State = {})); })(State || (exports.State = State = {}));
class CacheDistributor { class CacheDistributor {
packageManager;
cacheDependencyPath;
CACHE_KEY_PREFIX = 'setup-python';
constructor(packageManager, cacheDependencyPath) { constructor(packageManager, cacheDependencyPath) {
this.packageManager = packageManager; this.packageManager = packageManager;
this.cacheDependencyPath = cacheDependencyPath; this.cacheDependencyPath = cacheDependencyPath;
this.CACHE_KEY_PREFIX = 'setup-python';
} }
async handleLoadedCache() { } async handleLoadedCache() { }
async restoreCache() { async restoreCache() {

77
dist/setup/index.js vendored
View File

@ -96273,10 +96273,12 @@ var State;
State["CACHE_PATHS"] = "cache-paths"; State["CACHE_PATHS"] = "cache-paths";
})(State || (exports.State = State = {})); })(State || (exports.State = State = {}));
class CacheDistributor { class CacheDistributor {
packageManager;
cacheDependencyPath;
CACHE_KEY_PREFIX = 'setup-python';
constructor(packageManager, cacheDependencyPath) { constructor(packageManager, cacheDependencyPath) {
this.packageManager = packageManager; this.packageManager = packageManager;
this.cacheDependencyPath = cacheDependencyPath; this.cacheDependencyPath = cacheDependencyPath;
this.CACHE_KEY_PREFIX = 'setup-python';
} }
async handleLoadedCache() { } async handleLoadedCache() { }
async restoreCache() { async restoreCache() {
@ -96422,10 +96424,11 @@ const cache_distributor_1 = __importDefault(__nccwpck_require__(2326));
const utils_1 = __nccwpck_require__(1798); const utils_1 = __nccwpck_require__(1798);
const constants_1 = __nccwpck_require__(565); const constants_1 = __nccwpck_require__(565);
class PipCache extends cache_distributor_1.default { class PipCache extends cache_distributor_1.default {
pythonVersion;
cacheDependencyBackupPath = constants_1.CACHE_DEPENDENCY_BACKUP_PATH;
constructor(pythonVersion, cacheDependencyPath = '**/requirements.txt') { constructor(pythonVersion, cacheDependencyPath = '**/requirements.txt') {
super('pip', cacheDependencyPath); super('pip', cacheDependencyPath);
this.pythonVersion = pythonVersion; this.pythonVersion = pythonVersion;
this.cacheDependencyBackupPath = constants_1.CACHE_DEPENDENCY_BACKUP_PATH;
} }
async getCacheGlobalDirectories() { async getCacheGlobalDirectories() {
let exitCode = 1; let exitCode = 1;
@ -96530,6 +96533,8 @@ const path = __importStar(__nccwpck_require__(6928));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const cache_distributor_1 = __importDefault(__nccwpck_require__(2326)); const cache_distributor_1 = __importDefault(__nccwpck_require__(2326));
class PipenvCache extends cache_distributor_1.default { class PipenvCache extends cache_distributor_1.default {
pythonVersion;
patterns;
constructor(pythonVersion, patterns = '**/Pipfile.lock') { constructor(pythonVersion, patterns = '**/Pipfile.lock') {
super('pipenv', patterns); super('pipenv', patterns);
this.pythonVersion = pythonVersion; this.pythonVersion = pythonVersion;
@ -96615,6 +96620,9 @@ const core = __importStar(__nccwpck_require__(7484));
const cache_distributor_1 = __importDefault(__nccwpck_require__(2326)); const cache_distributor_1 = __importDefault(__nccwpck_require__(2326));
const utils_1 = __nccwpck_require__(1798); const utils_1 = __nccwpck_require__(1798);
class PoetryCache extends cache_distributor_1.default { class PoetryCache extends cache_distributor_1.default {
pythonVersion;
patterns;
poetryProjects;
constructor(pythonVersion, patterns = '**/poetry.lock', poetryProjects = new Set()) { constructor(pythonVersion, patterns = '**/poetry.lock', poetryProjects = new Set()) {
super('poetry', patterns); super('poetry', patterns);
this.pythonVersion = pythonVersion; this.pythonVersion = pythonVersion;
@ -96761,8 +96769,8 @@ async function findGraalPyVersion(versionSpec, architecture, updateEnvironment,
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
@ -97054,7 +97062,6 @@ async function installPip(pythonLocation) {
} }
} }
async function useCpythonVersion(version, architecture, updateEnvironment, checkLatest, allowPreReleases, freethreaded) { async function useCpythonVersion(version, architecture, updateEnvironment, checkLatest, allowPreReleases, freethreaded) {
var _a;
let manifest = null; let manifest = null;
const { version: desugaredVersionSpec, freethreaded: versionFreethreaded } = desugarVersion(version); const { version: desugaredVersionSpec, freethreaded: versionFreethreaded } = desugarVersion(version);
let semanticVersionSpec = pythonVersionToSemantic(desugaredVersionSpec, allowPreReleases); let semanticVersionSpec = pythonVersionToSemantic(desugaredVersionSpec, allowPreReleases);
@ -97070,7 +97077,7 @@ async function useCpythonVersion(version, architecture, updateEnvironment, check
} }
if (checkLatest) { if (checkLatest) {
manifest = await installer.getManifest(); manifest = await installer.getManifest();
const resolvedVersion = (_a = (await installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest))) === null || _a === void 0 ? void 0 : _a.version; const resolvedVersion = (await installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest))?.version;
if (resolvedVersion) { if (resolvedVersion) {
semanticVersionSpec = resolvedVersion; semanticVersionSpec = resolvedVersion;
core.info(`Resolved as '${semanticVersionSpec}'`); core.info(`Resolved as '${semanticVersionSpec}'`);
@ -97286,7 +97293,7 @@ const TOKEN = core.getInput('token');
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`; const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
async function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) { async function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) {
let downloadDir; let downloadDir;
releases = releases !== null && releases !== void 0 ? releases : (await getAvailableGraalPyVersions()); releases = releases ?? (await getAvailableGraalPyVersions());
if (!releases || !releases.length) { if (!releases || !releases.length) {
throw new Error('No release was found in GraalPy version.json'); throw new Error('No release was found in GraalPy version.json');
} }
@ -97308,7 +97315,12 @@ async function installGraalPy(graalpyVersion, architecture, allowPreReleases, re
try { try {
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 (utils_1.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
const archiveName = fs_1.default.readdirSync(downloadDir)[0]; const archiveName = fs_1.default.readdirSync(downloadDir)[0];
@ -97317,7 +97329,7 @@ async function installGraalPy(graalpyVersion, architecture, allowPreReleases, re
if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) { if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) {
installDir = await tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture); installDir = await tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture);
} }
const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); const binaryPath = path.join(installDir, 'bin');
await createGraalPySymlink(binaryPath, resolvedGraalPyVersion); await createGraalPySymlink(binaryPath, resolvedGraalPyVersion);
await installPip(binaryPath); await installPip(binaryPath);
return { installDir, resolvedGraalPyVersion }; return { installDir, resolvedGraalPyVersion };
@ -97345,6 +97357,9 @@ async 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 {
@ -97355,6 +97370,19 @@ async 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 = 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 = (0, utils_1.getNextPageUrl)(response);
} while (url);
return result; return result;
} }
async function createGraalPySymlink(graalpyBinaryPath, graalpyVersion) { async function createGraalPySymlink(graalpyBinaryPath, graalpyVersion) {
@ -97374,7 +97402,7 @@ async function installPip(pythonLocation) {
await exec.exec(`${pythonBinary} -m ensurepip --default-pip`); await exec.exec(`${pythonBinary} -m ensurepip --default-pip`);
} }
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]}`;
@ -97424,8 +97452,9 @@ function toGraalPyArchitecture(architecture) {
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.
*/ */
@ -97497,7 +97526,7 @@ const fs_1 = __importDefault(__nccwpck_require__(9896));
const utils_1 = __nccwpck_require__(1798); const utils_1 = __nccwpck_require__(1798);
async function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) { async function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) {
let downloadDir; let downloadDir;
releases = releases !== null && releases !== void 0 ? releases : (await getAvailablePyPyVersions()); releases = releases ?? (await getAvailablePyPyVersions());
if (!releases || releases.length === 0) { if (!releases || releases.length === 0) {
throw new Error('No release was found in PyPy version.json'); throw new Error('No release was found in PyPy version.json');
} }
@ -97876,12 +97905,24 @@ const os = __importStar(__nccwpck_require__(857));
const fs_1 = __importDefault(__nccwpck_require__(9896)); const fs_1 = __importDefault(__nccwpck_require__(9896));
const cache_factory_1 = __nccwpck_require__(665); const cache_factory_1 = __nccwpck_require__(665);
const utils_1 = __nccwpck_require__(1798); const utils_1 = __nccwpck_require__(1798);
const exec_1 = __nccwpck_require__(5236);
function isPyPyVersion(versionSpec) { function isPyPyVersion(versionSpec) {
return versionSpec.startsWith('pypy'); return versionSpec.startsWith('pypy');
} }
function isGraalPyVersion(versionSpec) { function isGraalPyVersion(versionSpec) {
return versionSpec.startsWith('graalpy'); return versionSpec.startsWith('graalpy');
} }
async function installPipPackages(pipInstall) {
core.info(`Installing pip packages: ${pipInstall}`);
try {
const installArgs = pipInstall.trim().split(/\s+/);
await (0, exec_1.exec)('python', ['-m', 'pip', 'install', ...installArgs]);
core.info('Successfully installed pip packages');
}
catch (error) {
core.setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`);
}
}
async function cacheDependencies(cache, pythonVersion) { async function cacheDependencies(cache, pythonVersion) {
const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath); const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath);
@ -97924,11 +97965,10 @@ function resolveVersionInput() {
return versions; return versions;
} }
async function run() { async function run() {
var _a;
if (utils_1.IS_MAC) { if (utils_1.IS_MAC) {
process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
} }
if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) { if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']; process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
} }
core.debug(`Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`); core.debug(`Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`);
@ -97967,6 +98007,10 @@ async function run() {
if (cache && (0, utils_1.isCacheFeatureAvailable)()) { if (cache && (0, utils_1.isCacheFeatureAvailable)()) {
await cacheDependencies(cache, pythonVersion); await cacheDependencies(cache, pythonVersion);
} }
const pipInstall = core.getInput('pip-install');
if (pipInstall) {
await installPipPackages(pipInstall);
}
} }
else { else {
core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.');
@ -98265,7 +98309,6 @@ function getVersionsInputFromPlainFile(versionFile) {
* Python version extracted from a .tool-versions file. * Python version extracted from a .tool-versions file.
*/ */
function getVersionInputFromToolVersions(versionFile) { function getVersionInputFromToolVersions(versionFile) {
var _a;
if (!fs_1.default.existsSync(versionFile)) { if (!fs_1.default.existsSync(versionFile)) {
core.warning(`File ${versionFile} does not exist.`); core.warning(`File ${versionFile} does not exist.`);
return []; return [];
@ -98280,7 +98323,7 @@ function getVersionInputFromToolVersions(versionFile) {
} }
const match = line.match(/^\s*python\s*v?\s*(?<version>[^\s]+)\s*$/); const match = line.match(/^\s*python\s*v?\s*(?<version>[^\s]+)\s*$/);
if (match) { if (match) {
return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || '']; return [match.groups?.version.trim() || ''];
} }
} }
core.warning(`No Python version found in ${versionFile}`); core.warning(`No Python version found in ${versionFile}`);
@ -98342,7 +98385,7 @@ function getVersionInputFromFile(versionFile) {
} }
} }
/** /**
* 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.
*/ */

View File

@ -18,11 +18,12 @@
- [Hosted tool cache](advanced-usage.md#hosted-tool-cache) - [Hosted tool cache](advanced-usage.md#hosted-tool-cache)
- [Using `setup-python` with a self-hosted runner](advanced-usage.md#using-setup-python-with-a-self-hosted-runner) - [Using `setup-python` with a self-hosted runner](advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
- [Windows](advanced-usage.md#windows) - [Windows](advanced-usage.md#windows)
- [Linux](advanced-usage.md#linux) - [Ubuntu](advanced-usage.md#Ubuntu)
- [macOS](advanced-usage.md#macos) - [macOS](advanced-usage.md#macos)
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes) - [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
- [Allow pre-releases](advanced-usage.md#allow-pre-releases) - [Allow pre-releases](advanced-usage.md#allow-pre-releases)
- [Using the pip-version input](advanced-usage.md#using-the-pip-version-input) - [Using the pip-version input](advanced-usage.md#using-the-pip-version-input)
- [Using the pip-install input](advanced-usage.md#using-the-pip-install-input)
## Using the `python-version` input ## Using the `python-version` input
@ -577,9 +578,9 @@ If you have a supported self-hosted runner and you would like to use `setup-pyth
>If you are experiencing problems while configuring Python on your self-hosted runner, turn on [step debugging](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) to see additional logs. >If you are experiencing problems while configuring Python on your self-hosted runner, turn on [step debugging](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) to see additional logs.
### Linux ### Ubuntu
By default, the runner downloads and installs tools into the folder set up by `RUNNER_TOOL_CACHE` environment variable. The environment variable called `AGENT_TOOLSDIRECTORY` can be set to change this location for Linux self-hosted runners: By default, the runner downloads and installs tools into the folder set up by `RUNNER_TOOL_CACHE` environment variable. The environment variable called `AGENT_TOOLSDIRECTORY` can be set to change this location for Ubuntu self-hosted runners:
- In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/path/to/folder`. - In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/path/to/folder`.
- More permanent way of setting the environment variable is to create an `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/path/to/folder`. This ensures the variable is always set if your runner is configured as a service. - More permanent way of setting the environment variable is to create an `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/path/to/folder`. This ensures the variable is always set if your runner is configured as a service.
@ -631,8 +632,8 @@ If the runner is not able to access github.com, any Python versions requested du
The `allow-prereleases` flag defaults to `false`. The `allow-prereleases` flag defaults to `false`.
If `allow-prereleases` is set to `true`, the action will allow falling back to pre-release versions of Python when a matching GA version of Python is not available. If `allow-prereleases` is set to `true`, the action will allow falling back to pre-release versions of Python when a matching GA version of Python is not available.
This allows for example to simplify reuse of `python-version` as an input of nox for pre-releases of Python by not requiring manipulation of the `3.y-dev` specifier. This allows for example to simplify reuse of `python-version` as an input of nox for pre-releases of Python by not requiring manipulation of the `3.y-dev` specifier.
For CPython, `allow-prereleases` will only have effect for `x.y` version range (e.g. `3.12`). For CPython, `allow-prereleases` will only have effect for `x.y` version range (e.g. `3.14`).
Let's say that python 3.12 is not generally available, the following workflow will fallback to the most recent pre-release of python 3.12: Let's say that in the past, when python 3.14 was not yet generally available, the following workflow would have fallback to the most recent pre-release of python 3.14:
```yaml ```yaml
jobs: jobs:
test: test:
@ -642,7 +643,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [Ubuntu, Windows, macOS] os: [Ubuntu, Windows, macOS]
python_version: ["3.11", "3.12", "3.13"] python_version: ["3.14"]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@ -672,3 +673,22 @@ The version of Pip should be specified in the format `major`, `major.minor`, or
> The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy. > The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy.
> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/). > Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/).
## Using the pip-install input
The `pip-install` input allows you to install dependencies as part of the Python setup step.
```yaml
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
pip-install: -r requirements.txt
```
> Note: This feature is intended for standard pip-based dependency installations.
For complex workflows, or alternative package managers (e.g., poetry, pipenv), we recommend using separate steps to maintain clarity and flexibility.
> The `pip-install` input mirrors the flexibility of a standard pip install command and supports most of its arguments.

48
package-lock.json generated
View File

@ -21,20 +21,20 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/node": "^24.1.0", "@types/node": "^24.10.1",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.4",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.9.0", "eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"prettier": "^3.5.3", "prettier": "^3.6.2",
"ts-jest": "^29.3.2", "ts-jest": "^29.3.2",
"typescript": "^5.9.2" "typescript": "^5.9.3"
}, },
"engines": { "engines": {
"node": ">=24.0.0" "node": ">=24.0.0"
@ -365,6 +365,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz",
"integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.2.0", "@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.13", "@babel/code-frame": "^7.22.13",
@ -1596,12 +1597,12 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "24.1.0", "version": "24.10.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
"integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~7.8.0" "undici-types": "~7.16.0"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@ -1670,6 +1671,7 @@
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
"integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/scope-manager": "5.62.0",
@ -1704,6 +1706,7 @@
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/scope-manager": "5.62.0",
"@typescript-eslint/types": "5.62.0", "@typescript-eslint/types": "5.62.0",
@ -1860,9 +1863,9 @@
"dev": true "dev": true
}, },
"node_modules/@vercel/ncc": { "node_modules/@vercel/ncc": {
"version": "0.38.3", "version": "0.38.4",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz",
"integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==", "integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@ -1885,6 +1888,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"dev": true, "dev": true,
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@ -2170,6 +2174,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"peer": true,
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001541", "caniuse-lite": "^1.0.30001541",
"electron-to-chromium": "^1.4.535", "electron-to-chromium": "^1.4.535",
@ -2642,6 +2647,7 @@
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1", "@eslint-community/regexpp": "^4.6.1",
@ -3689,6 +3695,7 @@
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
"integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@jest/core": "^29.7.0", "@jest/core": "^29.7.0",
"@jest/types": "^29.6.3", "@jest/types": "^29.6.3",
@ -4816,9 +4823,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.5.3", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@ -5446,11 +5453,12 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.9.2", "version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@ -5472,9 +5480,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "7.8.0", "version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {

View File

@ -40,19 +40,19 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/node": "^24.1.0", "@types/node": "^24.10.1",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.4",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.9.0", "eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"prettier": "^3.5.3", "prettier": "^3.6.2",
"ts-jest": "^29.3.2", "ts-jest": "^29.3.2",
"typescript": "^5.9.2" "typescript": "^5.9.3"
} }
} }

View File

@ -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

View File

@ -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.

View File

@ -13,6 +13,7 @@ import {
getVersionInputFromFile, getVersionInputFromFile,
getVersionsInputFromPlainFile getVersionsInputFromPlainFile
} from './utils'; } from './utils';
import {exec} from '@actions/exec';
function isPyPyVersion(versionSpec: string) { function isPyPyVersion(versionSpec: string) {
return versionSpec.startsWith('pypy'); return versionSpec.startsWith('pypy');
@ -22,6 +23,19 @@ function isGraalPyVersion(versionSpec: string) {
return versionSpec.startsWith('graalpy'); return versionSpec.startsWith('graalpy');
} }
async function installPipPackages(pipInstall: string) {
core.info(`Installing pip packages: ${pipInstall}`);
try {
const installArgs = pipInstall.trim().split(/\s+/);
await exec('python', ['-m', 'pip', 'install', ...installArgs]);
core.info('Successfully installed pip packages');
} catch (error) {
core.setFailed(
`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`
);
}
}
async function cacheDependencies(cache: string, pythonVersion: string) { async function cacheDependencies(cache: string, pythonVersion: string) {
const cacheDependencyPath = const cacheDependencyPath =
core.getInput('cache-dependency-path') || undefined; core.getInput('cache-dependency-path') || undefined;
@ -145,6 +159,10 @@ async function run() {
if (cache && isCacheFeatureAvailable()) { if (cache && isCacheFeatureAvailable()) {
await cacheDependencies(cache, pythonVersion); await cacheDependencies(cache, pythonVersion);
} }
const pipInstall = core.getInput('pip-install');
if (pipInstall) {
await installPipPackages(pipInstall);
}
} else { } else {
core.warning( core.warning(
'The `python-version` input is not set. The version of Python currently in `PATH` will be used.' 'The `python-version` input is not set. The version of Python currently in `PATH` will be used.'

View File

@ -379,7 +379,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.
*/ */

View File

@ -2,7 +2,7 @@
"compilerOptions": { "compilerOptions": {
/* Basic Options */ /* Basic Options */
// "incremental": true, /* Enable incremental compilation */ // "incremental": true, /* Enable incremental compilation */
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "allowJs": true, /* Allow javascript files to be compiled. */ // "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */ // "checkJs": true, /* Report errors in .js files. */