Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ae5836

Browse filesBrowse files
Add example of GraalPy to docs (actions#773)
1 parent b64ffca commit 0ae5836
Copy full SHA for 0ae5836

File tree

Expand file treeCollapse file tree

2 files changed

+20
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+20
-3
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ steps:
3434
python-version: 'pypy3.9'
3535
- run: python my_script.py
3636
```
37+
38+
**GraalPy**
39+
```yaml
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v4
43+
with:
44+
python-version: 'graalpy-22.3'
45+
- run: python my_script.py
46+
```
47+
3748
The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python or PyPy version from the PATH will be used. The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always setting Python version explicitly using the `python-version` or `python-version-file` inputs.
3849

3950
The action will first check the local [tool cache](docs/advanced-usage.md#hosted-tool-cache) for a [semver](https://github.com/npm/node-semver#versions) match. If unable to find a specific version in the tool cache, the action will attempt to download a version of Python from [GitHub Releases](https://github.com/actions/python-versions/releases) and for PyPy from the official [PyPy's dist](https://downloads.python.org/pypy/).
@@ -82,7 +93,7 @@ See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poet
8293
- [Check latest version](docs/advanced-usage.md#check-latest-version)
8394
- [Caching packages](docs/advanced-usage.md#caching-packages)
8495
- [Outputs and environment variables](docs/advanced-usage.md#outputs-and-environment-variables)
85-
- [Available versions of Python and PyPy](docs/advanced-usage.md#available-versions-of-python-and-pypy)
96+
- [Available versions of Python and PyPy](advanced-usage.md#available-versions-of-python-pypy-and-graalpy)
8697
- [Hosted tool cache](docs/advanced-usage.md#hosted-tool-cache)
8798
- [Using `setup-python` with a self-hosted runner](docs/advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
8899
- [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes)

‎docs/advanced-usage.md

Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
- [Outputs](advanced-usage.md#outputs)
1212
- [Environment variables](advanced-usage.md#environment-variables)
1313
- [Using update-environment flag](advanced-usage.md#using-update-environment-flag)
14-
- [Available versions of Python and PyPy](advanced-usage.md#available-versions-of-python-and-pypy)
14+
- [Available versions of Python and PyPy](advanced-usage.md#available-versions-of-python-pypy-and-graalpy)
1515
- [Python](advanced-usage.md#python)
1616
- [PyPy](advanced-usage.md#pypy)
17+
- [GraalPy](advanced-usage.md#graalpy)
1718
- [Hosted tool cache](advanced-usage.md#hosted-tool-cache)
1819
- [Using `setup-python` with a self-hosted runner](advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
1920
- [Windows](advanced-usage.md#windows)
@@ -459,7 +460,7 @@ Such a requirement on side-effect could be because you don't want your composite
459460
update-environment: false
460461
- run: ${{ steps.cp310.outputs.python-path }} my_script.py
461462
```
462-
## Available versions of Python and PyPy
463+
## Available versions of Python, PyPy and GraalPy
463464
### Python
464465

465466
`setup-python` is able to configure **Python** from two sources:
@@ -490,6 +491,11 @@ Such a requirement on side-effect could be because you don't want your composite
490491
- PyPy < 7.3.3 are not available to install on-flight.
491492
- If some versions are not available, you can open an issue in https://foss.heptapod.net/pypy/pypy/
492493

494+
### GraalPy
495+
496+
`setup-python` is able to download GraalPy versions from the [official GraalPy repository](https://github.com/oracle/graalpython).
497+
- All available versions that we can download are listed in [releases](https://github.com/oracle/graalpython/releases).
498+
493499
## Hosted tool cache
494500

495501
GitHub hosted runners have a tool cache that comes with a few versions of Python + PyPy already installed. This tool cache helps speed up runs and tool setup by not requiring any new downloads. There is an environment variable called `RUNNER_TOOL_CACHE` on each runner that describes the location of the tool cache with Python and PyPy installed. `setup-python` works by taking a specific version of Python or PyPy from this tool cache and adding it to PATH.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.