Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
gift

GitHub Action

Setup GraalVM environment

4.0

Setup GraalVM environment

gift

Setup GraalVM environment

Setup your runner with GraalVM

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup GraalVM environment

uses: DeLaGuardo/[email protected]

Learn more about this action in DeLaGuardo/setup-graalvm

Choose a version

setup-graalvm

This action sets up GraalVM environment for using in GitHub Actions.

  • It downloads (if it is not cached yet) required version of GraalVM Community edition
  • Adds executors provided by GraalVM distribution to the environment
  • Register problem matchers for error output

Notes:

Since version 19.3.0 each version of graalvm available with modifier to specify version of JDK. java8 and java11 are available atm.

Usage

steps:
- uses: actions/checkout@latest
- uses: DeLaGuardo/setup-graalvm@master
  with:
    graalvm-version: '19.3.0.java8' // GraalVM version, no pattern syntax available atm.
- run: java -version

Using GraalVM Component Updater (aka. gu)

gu binary is available as gu on ubuntu and macos, on windows - as gu.cmd.

jobs:
  sample-job:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        gu-binary: [gu, gu.cmd]
        exclude:
          - os: ubuntu-latest
            gu-binary: gu.cmd
          - os: macos-latest
            gu-binary: gu.cmd
          - os: windows-latest
            gu-binary: gu
    steps:
      - name: Setup Graalvm
        id: setup-graalvm
        uses: DeLaGuardo/setup-graalvm@master
        with:
          graalvm: '21.0.0.2'
          # optional, available: java8 and java11, defaults to java8
          java: 'java11'
          # optional, available: amd64 and aarch64, defaults to amd64
          arch: 'amd64'

      - name: Install native-image component
        run: |
          ${{ matrix.gu-binary }} install native-image

License

The scripts and documentation in this project are released under the MIT License