2022-01-03 09:02:25 +01:00
|
|
|
name: 'build-test'
|
2022-01-21 13:21:47 +01:00
|
|
|
|
|
|
|
on:
|
2022-01-03 09:02:25 +01:00
|
|
|
push:
|
2022-01-21 13:21:47 +01:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
workflow_dispatch:
|
2022-08-05 10:19:50 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2022-01-03 09:02:25 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build: # make sure build/ci work properly
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-03 09:02:25 +01:00
|
|
|
- run: |
|
|
|
|
npm install
|
|
|
|
- run: |
|
|
|
|
npm run all
|
2023-06-16 09:19:49 +02:00
|
|
|
test:
|
|
|
|
name: GraalVM
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-03-21 08:13:30 +01:00
|
|
|
java-version: ['22', '21', '17', '20', 'dev']
|
2023-06-16 09:19:49 +02:00
|
|
|
distribution: ['graalvm', 'graalvm-community']
|
2024-01-31 14:27:15 +01:00
|
|
|
os: [
|
|
|
|
ubuntu-latest,
|
2024-08-12 08:40:17 +02:00
|
|
|
macos-latest, # macOS on Apple silicon
|
|
|
|
macos-12, # macOS on Intel
|
2024-01-31 14:27:15 +01:00
|
|
|
windows-latest
|
|
|
|
]
|
2024-10-14 11:08:40 +02:00
|
|
|
set-gds-token: [false]
|
2023-09-20 13:02:55 +02:00
|
|
|
components: ['']
|
2023-06-20 11:57:49 +02:00
|
|
|
include:
|
2024-02-21 10:06:08 +01:00
|
|
|
- java-version: 'latest-ea'
|
|
|
|
distribution: 'graalvm'
|
|
|
|
os: ubuntu-latest
|
2024-03-21 08:13:30 +01:00
|
|
|
- java-version: '23-ea'
|
2024-02-13 13:37:00 +01:00
|
|
|
distribution: 'graalvm'
|
|
|
|
os: ubuntu-latest
|
2023-09-19 14:35:08 +02:00
|
|
|
- java-version: '21'
|
2023-06-20 11:57:49 +02:00
|
|
|
distribution: ''
|
|
|
|
os: ubuntu-latest
|
|
|
|
- java-version: 'dev'
|
|
|
|
distribution: ''
|
|
|
|
os: windows-latest
|
2023-09-19 14:35:08 +02:00
|
|
|
- java-version: '21'
|
2023-09-06 10:37:50 +02:00
|
|
|
distribution: 'graalvm-community'
|
|
|
|
os: ubuntu-latest
|
|
|
|
components: 'native-image' # should print a warning but not fail
|
2023-11-03 13:01:11 +01:00
|
|
|
- java-version: '21.0.0' # test for GA version (see #63)
|
|
|
|
distribution: 'graalvm'
|
|
|
|
os: ubuntu-latest
|
2024-10-14 11:08:40 +02:00
|
|
|
- java-version: '17'
|
|
|
|
distribution: 'graalvm'
|
|
|
|
os: ubuntu-latest
|
|
|
|
set-gds-token: true
|
2024-10-16 21:48:34 +02:00
|
|
|
- java-version: '17.0.13'
|
2024-10-14 11:08:40 +02:00
|
|
|
distribution: 'graalvm'
|
|
|
|
os: ubuntu-latest
|
|
|
|
set-gds-token: true
|
2023-06-16 09:19:49 +02:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-16 09:19:49 +02:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
java-version: ${{ matrix.java-version }}
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-09-20 13:02:55 +02:00
|
|
|
components: ${{ matrix.components }}
|
2024-10-14 11:08:40 +02:00
|
|
|
gds-token: ${{ matrix.set-gds-token && secrets.GDS_TOKEN || '' }}
|
2023-06-16 09:19:49 +02:00
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
|
|
|
if [[ "${{ matrix.java-version }}" == "dev" ]]; then
|
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TEMP"* ]] || exit 12
|
|
|
|
else
|
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TOOL_CACHE"* ]] || exit 23
|
|
|
|
fi
|
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
|
|
|
java --version
|
|
|
|
java --version | grep "GraalVM" || exit 34
|
|
|
|
native-image --version
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
- name: Check Windows environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $env:GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $env:JAVA_HOME"
|
|
|
|
java --version
|
|
|
|
native-image --version
|
2022-03-03 17:24:24 +01:00
|
|
|
test-ce: # make sure the action works on a clean machine without building
|
2024-02-20 17:14:10 +03:00
|
|
|
needs: test
|
2022-03-03 17:24:24 +01:00
|
|
|
name: CE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
2022-01-03 09:02:25 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-10 12:57:42 +02:00
|
|
|
version: ['latest', 'dev']
|
2023-06-16 09:19:49 +02:00
|
|
|
java-version: ['17', '20']
|
2022-01-03 09:02:25 +01:00
|
|
|
components: ['native-image']
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2023-04-10 12:57:42 +02:00
|
|
|
exclude:
|
|
|
|
- version: 'latest'
|
|
|
|
java-version: '20'
|
|
|
|
- version: 'dev'
|
|
|
|
java-version: '19'
|
2022-01-03 09:02:25 +01:00
|
|
|
include:
|
2022-11-02 14:00:51 +01:00
|
|
|
- version: '22.2.0' # for update notifications
|
2022-01-03 09:02:25 +01:00
|
|
|
java-version: '17'
|
|
|
|
components: 'native-image'
|
2023-04-10 13:53:31 +02:00
|
|
|
os: ubuntu-20.04
|
2024-02-23 08:22:08 +01:00
|
|
|
- version: '21.2.0'
|
|
|
|
java-version: '8' # for JDK 8 notification
|
|
|
|
components: 'native-image'
|
|
|
|
os: ubuntu-latest
|
2023-02-13 10:30:11 +01:00
|
|
|
- version: '22.3.1'
|
2024-02-23 08:22:08 +01:00
|
|
|
java-version: '11' # for JDK 11 notification
|
2022-01-03 09:02:25 +01:00
|
|
|
components: 'native-image'
|
2024-08-12 08:40:17 +02:00
|
|
|
os: macos-12
|
2023-02-13 10:30:11 +01:00
|
|
|
- version: '22.3.1'
|
2022-01-03 09:02:25 +01:00
|
|
|
java-version: '17'
|
|
|
|
components: 'native-image'
|
|
|
|
os: windows-2022
|
2023-01-24 10:35:51 +01:00
|
|
|
- version: 'dev'
|
|
|
|
java-version: 'dev'
|
|
|
|
components: 'native-image'
|
|
|
|
os: ubuntu-latest
|
2022-01-03 09:02:25 +01:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-03 09:02:25 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.version }}
|
|
|
|
java-version: ${{ matrix.java-version }}
|
|
|
|
components: ${{ matrix.components }}
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
2023-09-06 09:45:00 +02:00
|
|
|
if [[ "${{ matrix.version }}" == "dev" ]] && [[ "${{ matrix.java-version }}" == "dev" ]]; then
|
2022-03-07 14:06:11 +01:00
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TEMP"* ]] || exit 12
|
|
|
|
else
|
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TOOL_CACHE"* ]] || exit 23
|
|
|
|
fi
|
2022-01-03 09:02:25 +01:00
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
2024-02-23 08:22:08 +01:00
|
|
|
java -version
|
|
|
|
java -version 2>&1 | grep "GraalVM" || exit 34
|
2022-01-03 09:02:25 +01:00
|
|
|
native-image --version
|
2023-09-06 09:45:00 +02:00
|
|
|
if [[ "${{ matrix.java-version }}" != "dev" ]]; then
|
|
|
|
gu list
|
|
|
|
fi
|
2022-01-03 09:02:25 +01:00
|
|
|
if: runner.os != 'Windows'
|
|
|
|
- name: Check Windows environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $env:GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $env:JAVA_HOME"
|
2024-02-23 08:22:08 +01:00
|
|
|
java -version
|
2022-03-29 15:23:04 +02:00
|
|
|
native-image --version
|
2023-02-13 09:59:12 +01:00
|
|
|
gu.cmd remove native-image
|
2022-01-03 09:02:25 +01:00
|
|
|
if: runner.os == 'Windows'
|
2022-03-03 17:24:24 +01:00
|
|
|
test-ee:
|
2023-06-16 09:19:49 +02:00
|
|
|
needs: test
|
2022-03-03 17:24:24 +01:00
|
|
|
name: EE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-01-24 10:35:51 +01:00
|
|
|
version: ['latest']
|
2023-09-06 09:13:37 +02:00
|
|
|
java-version: ['17']
|
2022-04-19 21:27:19 +02:00
|
|
|
components: ['native-image']
|
2022-03-03 17:24:24 +01:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2023-01-24 10:35:51 +01:00
|
|
|
include:
|
2023-09-06 09:13:37 +02:00
|
|
|
- version: '22.3.3'
|
2023-01-24 10:35:51 +01:00
|
|
|
java-version: '11'
|
|
|
|
components: 'native-image'
|
|
|
|
os: ubuntu-latest
|
2023-09-06 09:13:37 +02:00
|
|
|
- version: '22.3.3'
|
2023-01-24 10:35:51 +01:00
|
|
|
java-version: '17'
|
|
|
|
components: 'native-image'
|
|
|
|
os: ubuntu-latest
|
2022-03-03 17:24:24 +01:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-03 17:24:24 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.version }}
|
|
|
|
gds-token: ${{ secrets.GDS_TOKEN }}
|
|
|
|
java-version: ${{ matrix.java-version }}
|
|
|
|
components: ${{ matrix.components }}
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
2022-03-07 14:06:11 +01:00
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TOOL_CACHE"* ]] || exit 12
|
2022-03-03 17:24:24 +01:00
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
|
|
|
java --version
|
2023-09-06 09:45:00 +02:00
|
|
|
java --version | grep -e "GraalVM EE" -e "Oracle GraalVM" || exit 23
|
2022-04-19 21:27:19 +02:00
|
|
|
native-image --version
|
2023-04-10 12:57:42 +02:00
|
|
|
gu list
|
2022-03-03 17:24:24 +01:00
|
|
|
if: runner.os != 'Windows'
|
|
|
|
- name: Check Windows environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $env:GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $env:JAVA_HOME"
|
|
|
|
java --version
|
2022-04-19 21:27:19 +02:00
|
|
|
native-image --version
|
2023-02-13 09:59:12 +01:00
|
|
|
gu.cmd remove native-image
|
2022-03-03 17:24:24 +01:00
|
|
|
if: runner.os == 'Windows'
|
2022-03-07 14:06:11 +01:00
|
|
|
test-mandrel:
|
2023-06-16 09:19:49 +02:00
|
|
|
needs: test
|
2022-03-07 14:06:11 +01:00
|
|
|
name: ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-10-30 17:29:57 +02:00
|
|
|
version: ['mandrel-22.2.0.0-Final', '23.0.1.2-Final', 'mandrel-latest']
|
2022-11-02 14:25:44 +01:00
|
|
|
java-version: ['17']
|
2023-06-20 11:56:28 +02:00
|
|
|
distribution: ['mandrel']
|
2022-03-07 14:06:11 +01:00
|
|
|
os: [windows-latest, ubuntu-latest]
|
2023-06-20 11:56:28 +02:00
|
|
|
include:
|
|
|
|
- version: 'mandrel-latest'
|
|
|
|
java-version: '17'
|
|
|
|
distribution: '' # test empty distribution for backward compatibility
|
2023-06-20 13:13:30 +02:00
|
|
|
os: ubuntu-latest
|
2023-11-03 14:21:41 +02:00
|
|
|
- version: '' # test with no version
|
|
|
|
java-version: '21'
|
|
|
|
distribution: 'mandrel'
|
|
|
|
os: ubuntu-latest
|
2022-03-07 14:06:11 +01:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-07 14:06:11 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.version }}
|
2023-06-20 11:56:28 +02:00
|
|
|
distribution: ${{ matrix.distribution }}
|
2022-03-07 14:06:11 +01:00
|
|
|
java-version: ${{ matrix.java-version }}
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TOOL_CACHE"* ]] || exit 12
|
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
|
|
|
java --version
|
2023-08-01 14:11:14 +02:00
|
|
|
java --version | grep "Temurin" || exit 23
|
2022-03-07 14:06:11 +01:00
|
|
|
native-image --version
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
- name: Check Windows environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $env:GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $env:JAVA_HOME"
|
|
|
|
java --version
|
2022-03-29 15:23:04 +02:00
|
|
|
native-image --version
|
2022-03-07 14:06:11 +01:00
|
|
|
if: runner.os == 'Windows'
|
2024-02-20 17:14:10 +03:00
|
|
|
test-liberica:
|
|
|
|
needs: test
|
2024-03-06 15:40:00 +03:00
|
|
|
name: Liberica (${{ matrix.java-version }}, '${{ matrix.java-package }}', ${{ matrix.os }})
|
2024-02-20 17:14:10 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
java-version: ['17', '21.0.2']
|
2024-03-06 15:40:00 +03:00
|
|
|
java-package: ['', 'jdk', 'jdk+fx']
|
2024-02-20 17:14:10 +03:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
distribution: liberica
|
|
|
|
java-version: ${{ matrix.java-version }}
|
2024-03-06 15:40:00 +03:00
|
|
|
java-package: ${{ matrix.java-package }}
|
2024-02-20 17:14:10 +03:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
|
|
|
[[ "$GRAALVM_HOME" == *"$RUNNER_TOOL_CACHE"* ]] || exit 12
|
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
|
|
|
java --version
|
|
|
|
java --version | fgrep -qw ${{ matrix.java-version }} || exit 23
|
|
|
|
native-image --version
|
|
|
|
native-image --version | fgrep -qw ${{ matrix.java-version }} || exit 24
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
- name: Check Windows environment
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $env:GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $env:JAVA_HOME"
|
|
|
|
java --version
|
|
|
|
if (!(java --version | findstr \<${{ matrix.java-version }}\>)) {
|
|
|
|
exit 23
|
|
|
|
}
|
|
|
|
native-image --version
|
|
|
|
if (!(native-image --version | findstr \<${{ matrix.java-version }}\>)) {
|
|
|
|
exit 24
|
|
|
|
}
|
|
|
|
if: runner.os == 'Windows'
|
2023-02-13 10:57:38 +01:00
|
|
|
test-native-image-windows:
|
2022-03-29 15:02:26 +02:00
|
|
|
name: native-image on windows-latest
|
|
|
|
runs-on: windows-latest
|
2022-11-03 18:46:41 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write # for `native-image-pr-reports` option
|
2022-03-29 15:02:26 +02:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-29 15:02:26 +02:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-02-13 10:57:38 +01:00
|
|
|
java-version: 'dev'
|
2023-06-16 09:19:49 +02:00
|
|
|
distribution: 'graalvm-community'
|
2023-02-13 10:57:38 +01:00
|
|
|
native-image-job-reports: 'true'
|
|
|
|
native-image-pr-reports: 'true'
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build HelloWorld executable with GraalVM Native Image on Windows
|
|
|
|
run: |
|
|
|
|
echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
|
|
|
javac HelloWorld.java
|
|
|
|
native-image HelloWorld
|
|
|
|
./helloworld
|
|
|
|
test-native-image-windows-msvc:
|
2023-06-16 09:19:49 +02:00
|
|
|
name: native-image on windows-2022
|
|
|
|
runs-on: windows-2022
|
2023-02-13 10:57:38 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write # for `native-image-pr-reports` option
|
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-13 10:57:38 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
2022-03-29 15:02:26 +02:00
|
|
|
java-version: '17'
|
2023-06-16 09:19:49 +02:00
|
|
|
distribution: 'graalvm'
|
2022-11-03 17:13:30 +01:00
|
|
|
native-image-job-reports: 'true'
|
|
|
|
native-image-pr-reports: 'true'
|
2022-03-29 15:02:26 +02:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build HelloWorld executable with GraalVM Native Image on Windows
|
|
|
|
run: |
|
|
|
|
echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
2022-03-29 15:23:04 +02:00
|
|
|
javac HelloWorld.java
|
|
|
|
native-image HelloWorld
|
|
|
|
./helloworld
|
2022-01-20 17:49:45 +01:00
|
|
|
test-native-image-musl:
|
|
|
|
name: native-image-musl on ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-03 18:46:41 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write # for `native-image-pr-reports` option
|
2022-01-20 17:49:45 +01:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-20 17:49:45 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-01-24 10:35:51 +01:00
|
|
|
java-version: 'dev'
|
2023-06-16 09:19:49 +02:00
|
|
|
distribution: 'graalvm-community'
|
2022-01-20 17:49:45 +01:00
|
|
|
native-image-musl: 'true'
|
2022-11-03 17:13:30 +01:00
|
|
|
native-image-job-reports: 'true'
|
|
|
|
native-image-pr-reports: 'true'
|
2022-01-20 17:49:45 +01:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-29 15:02:26 +02:00
|
|
|
- name: Build static HelloWorld executable with GraalVM Native Image and musl
|
2022-01-20 17:49:45 +01:00
|
|
|
run: |
|
|
|
|
echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
|
|
|
javac HelloWorld.java
|
|
|
|
native-image --static --libc=musl HelloWorld
|
|
|
|
./helloworld
|
2022-03-03 17:24:24 +01:00
|
|
|
test-extensive:
|
2022-01-20 17:49:45 +01:00
|
|
|
name: extensive tests on ubuntu-latest
|
2022-01-03 09:02:25 +01:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-03 18:46:41 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write # for `native-image-pr-reports` option
|
2022-01-03 09:02:25 +01:00
|
|
|
steps:
|
2023-09-19 14:30:35 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-03 09:02:25 +01:00
|
|
|
- name: Run setup-graalvm action
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-11-03 12:36:12 +01:00
|
|
|
java-version: '17.0.8'
|
2023-06-16 09:19:49 +02:00
|
|
|
distribution: 'graalvm'
|
|
|
|
components: 'espresso,llvm-toolchain,native-image,nodejs,python,ruby,wasm'
|
2022-01-03 09:02:25 +01:00
|
|
|
set-java-home: 'false'
|
2022-11-03 17:13:30 +01:00
|
|
|
native-image-job-reports: 'true'
|
|
|
|
native-image-pr-reports: 'true'
|
2022-01-03 09:02:25 +01:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
|
|
|
echo "JAVA_HOME: $JAVA_HOME"
|
|
|
|
[[ "$GRAALVM_HOME" != "$JAVA_HOME" ]] || exit 12
|
|
|
|
[[ $(which java) == *"graalvm"* ]] || exit 23
|
|
|
|
java --version
|
|
|
|
java -truffle --version
|
|
|
|
gu --version
|
|
|
|
gu list
|
|
|
|
[[ $(which lli) == *"graalvm"* ]] || exit 34
|
|
|
|
lli --version
|
|
|
|
native-image --version
|
|
|
|
[[ $(which node) == *"graalvm"* ]] || exit 45
|
|
|
|
node --version
|
2022-08-03 17:21:22 +02:00
|
|
|
graalpy --version
|
2022-01-03 09:02:25 +01:00
|
|
|
truffleruby --version
|
|
|
|
wasm --version
|
2022-03-29 15:02:26 +02:00
|
|
|
- name: Build HelloWorld.java with GraalVM Native Image
|
2022-01-03 09:02:25 +01:00
|
|
|
run: |
|
|
|
|
echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
|
|
|
javac HelloWorld.java
|
2022-11-03 17:13:30 +01:00
|
|
|
native-image -g HelloWorld
|
2022-01-03 09:02:25 +01:00
|
|
|
./helloworld
|
2023-09-19 15:50:03 +02:00
|
|
|
# - name: Build Ruby-FFI with TruffleRuby
|
|
|
|
# run: |
|
|
|
|
# [[ $(which bundle) == *"graalvm"* ]] || exit 57
|
|
|
|
# git clone --depth 1 https://github.com/ffi/ffi.git
|
|
|
|
# pushd ffi > /dev/null
|
|
|
|
# # https://github.com/ffi/ffi/blob/447845cb3030194c79700c86fb388a12e6f81386/.github/workflows/ci.yml#L58-L62
|
|
|
|
# bundle install
|
|
|
|
# bundle exec rake libffi
|
|
|
|
# bundle exec rake compile
|
|
|
|
# bundle exec rake test
|
|
|
|
# popd > /dev/null
|
2023-02-13 09:59:12 +01:00
|
|
|
- name: Remove components
|
2023-06-16 09:19:49 +02:00
|
|
|
run: gu remove espresso llvm-toolchain nodejs python ruby wasm
|