Compare commits
2 Commits
v1.4.1
...
fniephaus/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49e43a25ae | ||
|
|
83c82dcca9 |
838
.github/workflows/ci.yml
vendored
838
.github/workflows/ci.yml
vendored
@@ -35,343 +35,343 @@ jobs:
|
||||
env:
|
||||
INPUT_GITHUB_TOKEN: ${{ github.token }} # for core.getInput()
|
||||
|
||||
test-action:
|
||||
name: GraalVM
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
# Skip builds that require a GDS token but have no access to one (e.g., secrets are unavailable in PR runs)
|
||||
PASSES_GDS_TOKEN_CHECK: ${{ !matrix.set-gds-token || secrets.GDS_TOKEN != '' }}
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: ['25', '21', '17', '20', 'dev']
|
||||
distribution: ['graalvm', 'graalvm-community']
|
||||
os: [
|
||||
ubuntu-latest, # Linux on Intel
|
||||
ubuntu-22.04-arm, # Linux on arm64
|
||||
macos-latest, # macOS on Apple silicon
|
||||
macos-13, # macOS on Intel
|
||||
windows-latest
|
||||
]
|
||||
set-gds-token: [false]
|
||||
components: ['']
|
||||
include:
|
||||
- java-version: 'latest-ea'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
- java-version: '25-ea'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
- java-version: '21'
|
||||
distribution: ''
|
||||
os: ubuntu-latest
|
||||
- java-version: 'dev'
|
||||
distribution: ''
|
||||
os: windows-latest
|
||||
- java-version: '21'
|
||||
distribution: 'graalvm-community'
|
||||
os: ubuntu-latest
|
||||
components: 'native-image' # should print a warning but not fail
|
||||
- java-version: '21.0.0' # test for GA version (see #63)
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
- java-version: '17'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
set-gds-token: true
|
||||
- java-version: '17.0.13'
|
||||
distribution: 'graalvm'
|
||||
os: ubuntu-latest
|
||||
set-gds-token: true
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
distribution: ${{ matrix.distribution }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
components: ${{ matrix.components }}
|
||||
gds-token: ${{ matrix.set-gds-token && secrets.GDS_TOKEN || '' }}
|
||||
if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' }}
|
||||
- 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: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && 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
|
||||
if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && runner.os == 'Windows' }}
|
||||
# test-action:
|
||||
# name: GraalVM
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# env:
|
||||
# # Skip builds that require a GDS token but have no access to one (e.g., secrets are unavailable in PR runs)
|
||||
# PASSES_GDS_TOKEN_CHECK: ${{ !matrix.set-gds-token || secrets.GDS_TOKEN != '' }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# java-version: ['25', '21', '17', '20', 'dev']
|
||||
# distribution: ['graalvm', 'graalvm-community']
|
||||
# os: [
|
||||
# ubuntu-latest, # Linux on Intel
|
||||
# ubuntu-22.04-arm, # Linux on arm64
|
||||
# macos-latest, # macOS on Apple silicon
|
||||
# macos-13, # macOS on Intel
|
||||
# windows-latest
|
||||
# ]
|
||||
# set-gds-token: [false]
|
||||
# components: ['']
|
||||
# include:
|
||||
# - java-version: 'latest-ea'
|
||||
# distribution: 'graalvm'
|
||||
# os: ubuntu-latest
|
||||
# - java-version: '25-ea'
|
||||
# distribution: 'graalvm'
|
||||
# os: ubuntu-latest
|
||||
# - java-version: '21'
|
||||
# distribution: ''
|
||||
# os: ubuntu-latest
|
||||
# - java-version: 'dev'
|
||||
# distribution: ''
|
||||
# os: windows-latest
|
||||
# - java-version: '21'
|
||||
# distribution: 'graalvm-community'
|
||||
# os: ubuntu-latest
|
||||
# components: 'native-image' # should print a warning but not fail
|
||||
# - java-version: '21.0.0' # test for GA version (see #63)
|
||||
# distribution: 'graalvm'
|
||||
# os: ubuntu-latest
|
||||
# - java-version: '17'
|
||||
# distribution: 'graalvm'
|
||||
# os: ubuntu-latest
|
||||
# set-gds-token: true
|
||||
# - java-version: '17.0.13'
|
||||
# distribution: 'graalvm'
|
||||
# os: ubuntu-latest
|
||||
# set-gds-token: true
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# java-version: ${{ matrix.java-version }}
|
||||
# distribution: ${{ matrix.distribution }}
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# components: ${{ matrix.components }}
|
||||
# gds-token: ${{ matrix.set-gds-token && secrets.GDS_TOKEN || '' }}
|
||||
# if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' }}
|
||||
# - 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: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && 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
|
||||
# if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && runner.os == 'Windows' }}
|
||||
|
||||
test-action-ce: # make sure the action works on a clean machine without building
|
||||
needs: test-action
|
||||
name: CE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
version: ['latest', 'dev']
|
||||
java-version: ['17', '20']
|
||||
components: ['native-image']
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
exclude:
|
||||
- version: 'latest'
|
||||
java-version: '20'
|
||||
- version: 'dev'
|
||||
java-version: '19'
|
||||
include:
|
||||
- version: '22.2.0' # for update notifications
|
||||
java-version: '17'
|
||||
components: 'native-image'
|
||||
os: ubuntu-22.04
|
||||
- version: '21.2.0'
|
||||
java-version: '8' # for JDK 8 notification
|
||||
components: 'native-image'
|
||||
os: ubuntu-latest
|
||||
- version: '22.3.1'
|
||||
java-version: '11' # for JDK 11 notification
|
||||
components: 'native-image'
|
||||
os: macos-13
|
||||
- version: '22.3.1'
|
||||
java-version: '17'
|
||||
components: 'native-image'
|
||||
os: windows-2022
|
||||
- version: 'dev'
|
||||
java-version: 'dev'
|
||||
components: 'native-image'
|
||||
os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- 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"
|
||||
if [[ "${{ matrix.version }}" == "dev" ]] && [[ "${{ 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 2>&1 | grep "GraalVM" || exit 34
|
||||
native-image --version
|
||||
if [[ "${{ matrix.java-version }}" != "dev" ]]; then
|
||||
gu list
|
||||
fi
|
||||
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
|
||||
gu.cmd remove native-image
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
# test-action-ce: # make sure the action works on a clean machine without building
|
||||
# needs: test-action
|
||||
# name: CE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# version: ['latest', 'dev']
|
||||
# java-version: ['17', '20']
|
||||
# components: ['native-image']
|
||||
# os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
# exclude:
|
||||
# - version: 'latest'
|
||||
# java-version: '20'
|
||||
# - version: 'dev'
|
||||
# java-version: '19'
|
||||
# include:
|
||||
# - version: '22.2.0' # for update notifications
|
||||
# java-version: '17'
|
||||
# components: 'native-image'
|
||||
# os: ubuntu-22.04
|
||||
# - version: '21.2.0'
|
||||
# java-version: '8' # for JDK 8 notification
|
||||
# components: 'native-image'
|
||||
# os: ubuntu-latest
|
||||
# - version: '22.3.1'
|
||||
# java-version: '11' # for JDK 11 notification
|
||||
# components: 'native-image'
|
||||
# os: macos-13
|
||||
# - version: '22.3.1'
|
||||
# java-version: '17'
|
||||
# components: 'native-image'
|
||||
# os: windows-2022
|
||||
# - version: 'dev'
|
||||
# java-version: 'dev'
|
||||
# components: 'native-image'
|
||||
# os: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - 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"
|
||||
# if [[ "${{ matrix.version }}" == "dev" ]] && [[ "${{ 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 2>&1 | grep "GraalVM" || exit 34
|
||||
# native-image --version
|
||||
# if [[ "${{ matrix.java-version }}" != "dev" ]]; then
|
||||
# gu list
|
||||
# fi
|
||||
# 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
|
||||
# gu.cmd remove native-image
|
||||
# if: ${{ runner.os == 'Windows' }}
|
||||
|
||||
test-action-ee:
|
||||
needs: test-action
|
||||
name: EE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
# Skip builds that require a GDS token but have no access to one (e.g., secrets are unavailable in PR runs)
|
||||
PASSES_GDS_TOKEN_CHECK: ${{ secrets.GDS_TOKEN != '' }}
|
||||
strategy:
|
||||
matrix:
|
||||
version: ['latest']
|
||||
java-version: ['17']
|
||||
components: ['native-image']
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
include:
|
||||
- version: '22.3.3'
|
||||
java-version: '11'
|
||||
components: 'native-image'
|
||||
os: ubuntu-latest
|
||||
- version: '22.3.3'
|
||||
java-version: '17'
|
||||
components: 'native-image'
|
||||
os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- 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 }}
|
||||
if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' }}
|
||||
- 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 | grep -e "GraalVM EE" -e "Oracle GraalVM" || exit 23
|
||||
native-image --version
|
||||
gu list
|
||||
if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && 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
|
||||
gu.cmd remove native-image
|
||||
if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && runner.os == 'Windows' }}
|
||||
# test-action-ee:
|
||||
# needs: test-action
|
||||
# name: EE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
# if: github.event_name != 'pull_request'
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# env:
|
||||
# # Skip builds that require a GDS token but have no access to one (e.g., secrets are unavailable in PR runs)
|
||||
# PASSES_GDS_TOKEN_CHECK: ${{ secrets.GDS_TOKEN != '' }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# version: ['latest']
|
||||
# java-version: ['17']
|
||||
# components: ['native-image']
|
||||
# os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
# include:
|
||||
# - version: '22.3.3'
|
||||
# java-version: '11'
|
||||
# components: 'native-image'
|
||||
# os: ubuntu-latest
|
||||
# - version: '22.3.3'
|
||||
# java-version: '17'
|
||||
# components: 'native-image'
|
||||
# os: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - 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 }}
|
||||
# if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' }}
|
||||
# - 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 | grep -e "GraalVM EE" -e "Oracle GraalVM" || exit 23
|
||||
# native-image --version
|
||||
# gu list
|
||||
# if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && 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
|
||||
# gu.cmd remove native-image
|
||||
# if: ${{ env.PASSES_GDS_TOKEN_CHECK == 'true' && runner.os == 'Windows' }}
|
||||
|
||||
test-action-mandrel:
|
||||
needs: test-action
|
||||
name: ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
version: ['mandrel-22.2.0.0-Final', '23.0.1.2-Final', 'mandrel-latest']
|
||||
java-version: ['17']
|
||||
distribution: ['mandrel']
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
include:
|
||||
- version: 'mandrel-latest'
|
||||
java-version: '17'
|
||||
distribution: '' # test empty distribution for backward compatibility
|
||||
os: ubuntu-latest
|
||||
- version: '' # test with no version
|
||||
java-version: '21'
|
||||
distribution: 'mandrel'
|
||||
os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
version: ${{ matrix.version }}
|
||||
distribution: ${{ matrix.distribution }}
|
||||
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
|
||||
java --version | grep "Temurin" || exit 23
|
||||
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
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
# test-action-mandrel:
|
||||
# needs: test-action
|
||||
# name: ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# version: ['mandrel-22.2.0.0-Final', '23.0.1.2-Final', 'mandrel-latest']
|
||||
# java-version: ['17']
|
||||
# distribution: ['mandrel']
|
||||
# os: [windows-latest, ubuntu-latest]
|
||||
# include:
|
||||
# - version: 'mandrel-latest'
|
||||
# java-version: '17'
|
||||
# distribution: '' # test empty distribution for backward compatibility
|
||||
# os: ubuntu-latest
|
||||
# - version: '' # test with no version
|
||||
# java-version: '21'
|
||||
# distribution: 'mandrel'
|
||||
# os: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# version: ${{ matrix.version }}
|
||||
# distribution: ${{ matrix.distribution }}
|
||||
# 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
|
||||
# java --version | grep "Temurin" || exit 23
|
||||
# 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
|
||||
# if: ${{ runner.os == 'Windows' }}
|
||||
|
||||
test-action-liberica:
|
||||
needs: test-action
|
||||
name: Liberica (${{ matrix.java-version }}, '${{ matrix.java-package }}', ${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: ['17', '21.0.2']
|
||||
java-package: ['', 'jdk', 'jdk+fx']
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: ${{ matrix.java-version }}
|
||||
java-package: ${{ matrix.java-package }}
|
||||
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' }}
|
||||
# test-action-liberica:
|
||||
# needs: test-action
|
||||
# name: Liberica (${{ matrix.java-version }}, '${{ matrix.java-package }}', ${{ matrix.os }})
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# java-version: ['17', '21.0.2']
|
||||
# java-package: ['', 'jdk', 'jdk+fx']
|
||||
# os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# distribution: liberica
|
||||
# java-version: ${{ matrix.java-version }}
|
||||
# java-package: ${{ matrix.java-package }}
|
||||
# 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' }}
|
||||
|
||||
test-action-native-image-windows:
|
||||
name: native-image on windows-latest
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # for `native-image-pr-reports` option
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
java-version: 'dev'
|
||||
distribution: 'graalvm-community'
|
||||
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-action-native-image-windows:
|
||||
# name: native-image on windows-latest
|
||||
# runs-on: windows-latest
|
||||
# permissions:
|
||||
# contents: read
|
||||
# pull-requests: write # for `native-image-pr-reports` option
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# java-version: 'dev'
|
||||
# distribution: 'graalvm-community'
|
||||
# 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-action-native-image-windows-msvc:
|
||||
name: native-image on windows-2022
|
||||
runs-on: windows-2022
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # for `native-image-pr-reports` option
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'graalvm'
|
||||
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-action-native-image-windows-msvc:
|
||||
# name: native-image on windows-2022
|
||||
# runs-on: windows-2022
|
||||
# permissions:
|
||||
# contents: read
|
||||
# pull-requests: write # for `native-image-pr-reports` option
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# java-version: '17'
|
||||
# distribution: 'graalvm'
|
||||
# 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-action-native-image-musl:
|
||||
test-action-native-image-musl-ce:
|
||||
name: native-image-musl on ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
@@ -394,9 +394,10 @@ jobs:
|
||||
javac HelloWorld.java
|
||||
native-image --static --libc=musl HelloWorld
|
||||
./helloworld
|
||||
|
||||
test-action-extensive:
|
||||
name: extensive tests on ubuntu-latest
|
||||
native-image --static --libc=musl -m jdk.httpserver
|
||||
./jdk.httpserver --help
|
||||
test-action-native-image-musl:
|
||||
name: native-image-musl on ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -406,84 +407,111 @@ jobs:
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
java-version: '17.0.8'
|
||||
java-version: '25'
|
||||
distribution: 'graalvm'
|
||||
components: 'espresso,llvm-toolchain,native-image,nodejs,python,ruby,wasm'
|
||||
set-java-home: 'false'
|
||||
native-image-musl: 'true'
|
||||
native-image-job-reports: 'true'
|
||||
native-image-pr-reports: 'true'
|
||||
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
|
||||
graalpy --version
|
||||
truffleruby --version
|
||||
wasm --version
|
||||
- name: Build HelloWorld.java with GraalVM Native Image
|
||||
- name: Build static HelloWorld executable with GraalVM Native Image and musl
|
||||
run: |
|
||||
echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
||||
javac HelloWorld.java
|
||||
native-image -g HelloWorld
|
||||
native-image --static --libc=musl HelloWorld
|
||||
./helloworld
|
||||
# - 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
|
||||
- name: Remove components
|
||||
run: gu remove espresso llvm-toolchain nodejs python ruby wasm
|
||||
native-image --static --libc=musl --gc=G1 -m jdk.httpserver
|
||||
./jdk.httpserver --help
|
||||
|
||||
test-action-sbom:
|
||||
name: test 'native-image-enable-sbom' option
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: ['25', 'latest-ea']
|
||||
distribution: ['graalvm']
|
||||
os: [macos-latest, windows-latest, ubuntu-latest, ubuntu-22.04-arm]
|
||||
components: ['']
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run setup-graalvm action
|
||||
uses: ./
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
distribution: ${{ matrix.distribution }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
components: ${{ matrix.components }}
|
||||
native-image-enable-sbom: 'true'
|
||||
cache: 'maven'
|
||||
- name: Build Maven project and verify that SBOM was generated and its contents
|
||||
run: |
|
||||
cd __tests__/sbom/main-test-app
|
||||
mvn --no-transfer-progress -Pnative package
|
||||
bash verify-sbom.sh
|
||||
shell: bash
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
- name: Build Maven project and verify that SBOM was generated and its contents (Windows)
|
||||
run: |
|
||||
cd __tests__\sbom\main-test-app
|
||||
mvn --no-transfer-progress -Pnative package
|
||||
cmd /c verify-sbom.cmd
|
||||
shell: cmd
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
|
||||
# test-action-extensive:
|
||||
# name: extensive tests on ubuntu-latest
|
||||
# runs-on: ubuntu-latest
|
||||
# permissions:
|
||||
# contents: read
|
||||
# pull-requests: write # for `native-image-pr-reports` option
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# java-version: '17.0.8'
|
||||
# distribution: 'graalvm'
|
||||
# components: 'espresso,llvm-toolchain,native-image,nodejs,python,ruby,wasm'
|
||||
# set-java-home: 'false'
|
||||
# native-image-job-reports: 'true'
|
||||
# native-image-pr-reports: 'true'
|
||||
# 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
|
||||
# graalpy --version
|
||||
# truffleruby --version
|
||||
# wasm --version
|
||||
# - name: Build HelloWorld.java with GraalVM Native Image
|
||||
# run: |
|
||||
# echo 'public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }' > HelloWorld.java
|
||||
# javac HelloWorld.java
|
||||
# native-image -g HelloWorld
|
||||
# ./helloworld
|
||||
# # - 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
|
||||
# - name: Remove components
|
||||
# run: gu remove espresso llvm-toolchain nodejs python ruby wasm
|
||||
|
||||
# test-action-sbom:
|
||||
# name: test 'native-image-enable-sbom' option
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# permissions:
|
||||
# contents: write
|
||||
# strategy:
|
||||
# matrix:
|
||||
# java-version: ['25', 'latest-ea']
|
||||
# distribution: ['graalvm']
|
||||
# os: [macos-latest, windows-latest, ubuntu-latest, ubuntu-22.04-arm]
|
||||
# components: ['']
|
||||
# steps:
|
||||
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
# - name: Run setup-graalvm action
|
||||
# uses: ./
|
||||
# with:
|
||||
# java-version: ${{ matrix.java-version }}
|
||||
# distribution: ${{ matrix.distribution }}
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# components: ${{ matrix.components }}
|
||||
# native-image-enable-sbom: 'true'
|
||||
# cache: 'maven'
|
||||
# - name: Build Maven project and verify that SBOM was generated and its contents
|
||||
# run: |
|
||||
# cd __tests__/sbom/main-test-app
|
||||
# mvn --no-transfer-progress -Pnative package
|
||||
# bash verify-sbom.sh
|
||||
# shell: bash
|
||||
# if: ${{ runner.os != 'Windows' }}
|
||||
# - name: Build Maven project and verify that SBOM was generated and its contents (Windows)
|
||||
# run: |
|
||||
# cd __tests__\sbom\main-test-app
|
||||
# mvn --no-transfer-progress -Pnative package
|
||||
# cmd /c verify-sbom.cmd
|
||||
# shell: cmd
|
||||
# if: ${{ runner.os == 'Windows' }}
|
||||
|
||||
52
dist/cleanup.js
generated
vendored
52
dist/cleanup.js
generated
vendored
@@ -27288,7 +27288,7 @@ function requireCore () {
|
||||
|
||||
var coreExports = requireCore();
|
||||
|
||||
const ACTION_VERSION = '1.4.1';
|
||||
const ACTION_VERSION = '1.4.0';
|
||||
const INPUT_GITHUB_TOKEN = 'github-token';
|
||||
const INPUT_CACHE = 'cache';
|
||||
process.platform === 'linux';
|
||||
@@ -69174,7 +69174,7 @@ function requireConfig () {
|
||||
|
||||
var userAgent$1 = {};
|
||||
|
||||
var version = "4.1.0";
|
||||
var version = "4.0.5";
|
||||
var require$$0$1 = {
|
||||
version: version};
|
||||
|
||||
@@ -74028,12 +74028,11 @@ function requireCache$1 () {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, signedUploadUrl: "", message: "" };
|
||||
const message = { ok: false, signedUploadUrl: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -74050,9 +74049,6 @@ function requireCache$1 () {
|
||||
case /* string signed_upload_url */ 2:
|
||||
message.signedUploadUrl = reader.string();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -74071,9 +74067,6 @@ function requireCache$1 () {
|
||||
/* string signed_upload_url = 2; */
|
||||
if (message.signedUploadUrl !== "")
|
||||
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -74157,12 +74150,11 @@ function requireCache$1 () {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, entryId: "0", message: "" };
|
||||
const message = { ok: false, entryId: "0" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -74179,9 +74171,6 @@ function requireCache$1 () {
|
||||
case /* int64 entry_id */ 2:
|
||||
message.entryId = reader.int64().toString();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -74200,9 +74189,6 @@ function requireCache$1 () {
|
||||
/* int64 entry_id = 2; */
|
||||
if (message.entryId !== "0")
|
||||
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -74999,7 +74985,7 @@ function requireCache () {
|
||||
});
|
||||
};
|
||||
Object.defineProperty(cache$1, "__esModule", { value: true });
|
||||
cache$1.saveCache = cache$1.restoreCache = cache$1.isFeatureAvailable = cache$1.FinalizeCacheError = cache$1.ReserveCacheError = cache$1.ValidationError = void 0;
|
||||
cache$1.saveCache = cache$1.restoreCache = cache$1.isFeatureAvailable = cache$1.ReserveCacheError = cache$1.ValidationError = void 0;
|
||||
const core = __importStar(requireCore());
|
||||
const path = __importStar(require$$0$b);
|
||||
const utils = __importStar(requireCacheUtils());
|
||||
@@ -75007,6 +74993,7 @@ function requireCache () {
|
||||
const cacheTwirpClient = __importStar(requireCacheTwirpClient());
|
||||
const config_1 = requireConfig();
|
||||
const tar_1 = requireTar();
|
||||
const constants_1 = requireConstants$1();
|
||||
const http_client_1 = requireLib();
|
||||
class ValidationError extends Error {
|
||||
constructor(message) {
|
||||
@@ -75024,14 +75011,6 @@ function requireCache () {
|
||||
}
|
||||
}
|
||||
cache$1.ReserveCacheError = ReserveCacheError;
|
||||
class FinalizeCacheError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'FinalizeCacheError';
|
||||
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
|
||||
}
|
||||
}
|
||||
cache$1.FinalizeCacheError = FinalizeCacheError;
|
||||
function checkPaths(paths) {
|
||||
if (!paths || paths.length === 0) {
|
||||
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
|
||||
@@ -75408,6 +75387,10 @@ function requireCache () {
|
||||
}
|
||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||
core.debug(`File Size: ${archiveFileSize}`);
|
||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
|
||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||
}
|
||||
// Set the archive size in the options, will be used to display the upload progress
|
||||
options.archiveSizeBytes = archiveFileSize;
|
||||
core.debug('Reserving Cache');
|
||||
@@ -75420,10 +75403,7 @@ function requireCache () {
|
||||
try {
|
||||
const response = yield twirpClient.CreateCacheEntry(request);
|
||||
if (!response.ok) {
|
||||
if (response.message) {
|
||||
core.warning(`Cache reservation failed: ${response.message}`);
|
||||
}
|
||||
throw new Error(response.message || 'Response was not ok');
|
||||
throw new Error('Response was not ok');
|
||||
}
|
||||
signedUploadUrl = response.signedUploadUrl;
|
||||
}
|
||||
@@ -75441,9 +75421,6 @@ function requireCache () {
|
||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
|
||||
if (!finalizeResponse.ok) {
|
||||
if (finalizeResponse.message) {
|
||||
throw new FinalizeCacheError(finalizeResponse.message);
|
||||
}
|
||||
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||
}
|
||||
cacheId = parseInt(finalizeResponse.entryId);
|
||||
@@ -75456,9 +75433,6 @@ function requireCache () {
|
||||
else if (typedError.name === ReserveCacheError.name) {
|
||||
core.info(`Failed to save: ${typedError.message}`);
|
||||
}
|
||||
else if (typedError.name === FinalizeCacheError.name) {
|
||||
core.warning(typedError.message);
|
||||
}
|
||||
else {
|
||||
// Log server errors (5xx) as errors, all other errors as warnings
|
||||
if (typedError instanceof http_client_1.HttpClientError &&
|
||||
|
||||
76
dist/main.js
generated
vendored
76
dist/main.js
generated
vendored
@@ -39,7 +39,7 @@ import * as https from 'node:https';
|
||||
import * as zlib from 'node:zlib';
|
||||
import require$$1$5 from 'tty';
|
||||
|
||||
const ACTION_VERSION = '1.4.1';
|
||||
const ACTION_VERSION = '1.4.0';
|
||||
const INPUT_VERSION = 'version';
|
||||
const INPUT_GDS_TOKEN = 'gds-token';
|
||||
const INPUT_JAVA_VERSION = 'java-version';
|
||||
@@ -36612,7 +36612,7 @@ async function getLatestRelease(repo) {
|
||||
return (await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {
|
||||
owner: GRAALVM_GH_USER,
|
||||
repo
|
||||
})).data; /** missing digest property */
|
||||
})).data;
|
||||
}
|
||||
async function getContents(repo, path) {
|
||||
const octokit = getOctokit();
|
||||
@@ -36628,7 +36628,7 @@ async function getTaggedRelease(owner, repo, tag) {
|
||||
owner,
|
||||
repo,
|
||||
tag
|
||||
})).data; /** missing digest property */
|
||||
})).data;
|
||||
}
|
||||
async function getMatchingTags(owner, repo, tagPrefix) {
|
||||
const octokit = getOctokit();
|
||||
@@ -79033,7 +79033,7 @@ function requireConfig () {
|
||||
|
||||
var userAgent = {};
|
||||
|
||||
var version = "4.1.0";
|
||||
var version = "4.0.5";
|
||||
var require$$0$1 = {
|
||||
version: version};
|
||||
|
||||
@@ -83887,12 +83887,11 @@ function requireCache$1 () {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, signedUploadUrl: "", message: "" };
|
||||
const message = { ok: false, signedUploadUrl: "" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -83909,9 +83908,6 @@ function requireCache$1 () {
|
||||
case /* string signed_upload_url */ 2:
|
||||
message.signedUploadUrl = reader.string();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -83930,9 +83926,6 @@ function requireCache$1 () {
|
||||
/* string signed_upload_url = 2; */
|
||||
if (message.signedUploadUrl !== "")
|
||||
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -84016,12 +84009,11 @@ function requireCache$1 () {
|
||||
constructor() {
|
||||
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
|
||||
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
|
||||
]);
|
||||
}
|
||||
create(value) {
|
||||
const message = { ok: false, entryId: "0", message: "" };
|
||||
const message = { ok: false, entryId: "0" };
|
||||
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
(0, runtime_3.reflectionMergePartial)(this, message, value);
|
||||
@@ -84038,9 +84030,6 @@ function requireCache$1 () {
|
||||
case /* int64 entry_id */ 2:
|
||||
message.entryId = reader.int64().toString();
|
||||
break;
|
||||
case /* string message */ 3:
|
||||
message.message = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -84059,9 +84048,6 @@ function requireCache$1 () {
|
||||
/* int64 entry_id = 2; */
|
||||
if (message.entryId !== "0")
|
||||
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
|
||||
/* string message = 3; */
|
||||
if (message.message !== "")
|
||||
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -84858,7 +84844,7 @@ function requireCache () {
|
||||
});
|
||||
};
|
||||
Object.defineProperty(cache$1, "__esModule", { value: true });
|
||||
cache$1.saveCache = cache$1.restoreCache = cache$1.isFeatureAvailable = cache$1.FinalizeCacheError = cache$1.ReserveCacheError = cache$1.ValidationError = void 0;
|
||||
cache$1.saveCache = cache$1.restoreCache = cache$1.isFeatureAvailable = cache$1.ReserveCacheError = cache$1.ValidationError = void 0;
|
||||
const core = __importStar(requireCore());
|
||||
const path = __importStar(require$$0__default$2);
|
||||
const utils = __importStar(requireCacheUtils());
|
||||
@@ -84866,6 +84852,7 @@ function requireCache () {
|
||||
const cacheTwirpClient = __importStar(requireCacheTwirpClient());
|
||||
const config_1 = requireConfig();
|
||||
const tar_1 = requireTar();
|
||||
const constants_1 = requireConstants();
|
||||
const http_client_1 = requireLib();
|
||||
class ValidationError extends Error {
|
||||
constructor(message) {
|
||||
@@ -84883,14 +84870,6 @@ function requireCache () {
|
||||
}
|
||||
}
|
||||
cache$1.ReserveCacheError = ReserveCacheError;
|
||||
class FinalizeCacheError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'FinalizeCacheError';
|
||||
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
|
||||
}
|
||||
}
|
||||
cache$1.FinalizeCacheError = FinalizeCacheError;
|
||||
function checkPaths(paths) {
|
||||
if (!paths || paths.length === 0) {
|
||||
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
|
||||
@@ -85267,6 +85246,10 @@ function requireCache () {
|
||||
}
|
||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||
core.debug(`File Size: ${archiveFileSize}`);
|
||||
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
|
||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||
}
|
||||
// Set the archive size in the options, will be used to display the upload progress
|
||||
options.archiveSizeBytes = archiveFileSize;
|
||||
core.debug('Reserving Cache');
|
||||
@@ -85279,10 +85262,7 @@ function requireCache () {
|
||||
try {
|
||||
const response = yield twirpClient.CreateCacheEntry(request);
|
||||
if (!response.ok) {
|
||||
if (response.message) {
|
||||
core.warning(`Cache reservation failed: ${response.message}`);
|
||||
}
|
||||
throw new Error(response.message || 'Response was not ok');
|
||||
throw new Error('Response was not ok');
|
||||
}
|
||||
signedUploadUrl = response.signedUploadUrl;
|
||||
}
|
||||
@@ -85300,9 +85280,6 @@ function requireCache () {
|
||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
|
||||
if (!finalizeResponse.ok) {
|
||||
if (finalizeResponse.message) {
|
||||
throw new FinalizeCacheError(finalizeResponse.message);
|
||||
}
|
||||
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||
}
|
||||
cacheId = parseInt(finalizeResponse.entryId);
|
||||
@@ -85315,9 +85292,6 @@ function requireCache () {
|
||||
else if (typedError.name === ReserveCacheError.name) {
|
||||
core.info(`Failed to save: ${typedError.message}`);
|
||||
}
|
||||
else if (typedError.name === FinalizeCacheError.name) {
|
||||
core.warning(typedError.message);
|
||||
}
|
||||
else {
|
||||
// Log server errors (5xx) as errors, all other errors as warnings
|
||||
if (typedError instanceof http_client_1.HttpClientError &&
|
||||
@@ -88852,8 +88826,8 @@ function checkForUpdates(graalVMVersion, javaVersion) {
|
||||
// TODO: add support for JDK-specific update checks (e.g., 17.0.X)
|
||||
}
|
||||
|
||||
const MUSL_NAME = 'x86_64-linux-musl-native';
|
||||
const MUSL_VERSION = '10.2.1';
|
||||
const MUSL_VERSION = '1.2.5.1';
|
||||
const MUSL_NAME = 'musl-toolchain';
|
||||
async function setUpNativeImageMusl() {
|
||||
if (!IS_LINUX) {
|
||||
coreExports.warning('musl is only supported on Linux');
|
||||
@@ -88865,23 +88839,9 @@ async function setUpNativeImageMusl() {
|
||||
}
|
||||
else {
|
||||
coreExports.startGroup(`Setting up musl for GraalVM Native Image...`);
|
||||
const muslDownloadPath = await toolCacheExports.downloadTool(`https://github.com/graalvm/setup-graalvm/releases/download/x86_64-linux-musl-${MUSL_VERSION}/${MUSL_NAME}.tgz`);
|
||||
const muslDownloadPath = await toolCacheExports.downloadTool(`https://github.com/graalvm/setup-graalvm/releases/download/v1.3.7/musl-toolchain-amd64-1.2.5-gcc10.3.0-zlib1.2.13.tar.gz`);
|
||||
const muslExtractPath = await toolCacheExports.extractTar(muslDownloadPath);
|
||||
const muslPath = join(muslExtractPath, MUSL_NAME);
|
||||
const zlibCommit = 'ec3df00224d4b396e2ac6586ab5d25f673caa4c2';
|
||||
const zlibDownloadPath = await toolCacheExports.downloadTool(`https://github.com/madler/zlib/archive/${zlibCommit}.tar.gz`);
|
||||
const zlibExtractPath = await toolCacheExports.extractTar(zlibDownloadPath);
|
||||
const zlibPath = join(zlibExtractPath, `zlib-${zlibCommit}`);
|
||||
const zlibBuildOptions = {
|
||||
cwd: zlibPath,
|
||||
env: {
|
||||
...process.env,
|
||||
CC: join(muslPath, 'bin', 'gcc')
|
||||
}
|
||||
};
|
||||
await exec('./configure', [`--prefix=${muslPath}`, '--static'], zlibBuildOptions);
|
||||
await exec('make', [], zlibBuildOptions);
|
||||
await exec('make', ['install'], { cwd: zlibPath });
|
||||
coreExports.info(`Adding ${MUSL_NAME} ${MUSL_VERSION} to tool-cache ...`);
|
||||
toolPath = await toolCacheExports.cacheDir(muslPath, MUSL_NAME, MUSL_VERSION);
|
||||
coreExports.endGroup();
|
||||
|
||||
1078
package-lock.json
generated
1078
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "setup-graalvm",
|
||||
"author": "GraalVM Community",
|
||||
"description": "GitHub Action for GraalVM",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"repository": {
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
"license": "UPL",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.1.0",
|
||||
"@actions/cache": "^4.0.5",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^6.0.1",
|
||||
@@ -45,23 +45,24 @@
|
||||
"@actions/http-client": "^2.2.3",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/types": "^15.0.0",
|
||||
"@octokit/types": "^14.1.0",
|
||||
"@github/dependency-submission-toolkit": "^2.0.5",
|
||||
"semver": "^7.7.2",
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.4.0",
|
||||
"@eslint/compat": "^1.3.2",
|
||||
"@rollup/plugin-commonjs": "^28.0.6",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-typescript": "^12.1.4",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^24.6.1",
|
||||
"@types/node": "^24.4.0",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
||||
"@typescript-eslint/parser": "^8.31.1",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
@@ -69,15 +70,15 @@
|
||||
"eslint-plugin-jsonc": "^2.20.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"jest": "^30.2.0",
|
||||
"jest": "^30.1.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"rollup": "^4.52.3",
|
||||
"ts-jest": "^29.4.4",
|
||||
"rollup": "^4.50.2",
|
||||
"ts-jest": "^29.4.1",
|
||||
"ts-jest-resolver": "^2.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "*"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as otypes from '@octokit/types'
|
||||
|
||||
export const ACTION_VERSION = '1.4.1'
|
||||
export const ACTION_VERSION = '1.4.0'
|
||||
|
||||
export const INPUT_VERSION = 'version'
|
||||
export const INPUT_GDS_TOKEN = 'gds-token'
|
||||
@@ -53,13 +53,13 @@ export const ERROR_REQUEST = 'Please file an issue at: https://github.com/graalv
|
||||
export const ERROR_HINT =
|
||||
'If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.'
|
||||
|
||||
export type LatestReleaseResponseData =
|
||||
otypes.Endpoints['GET /repos/{owner}/{repo}/releases/latest']['response']['data']
|
||||
export type LatestReleaseResponse = otypes.Endpoints['GET /repos/{owner}/{repo}/releases/latest']['response']
|
||||
|
||||
export type MatchingRefsResponseData =
|
||||
otypes.Endpoints['GET /repos/{owner}/{repo}/git/matching-refs/{ref}']['response']['data']
|
||||
export type MatchingRefsResponse = otypes.Endpoints['GET /repos/{owner}/{repo}/git/matching-refs/{ref}']['response']
|
||||
|
||||
export type ContentsResponseData = otypes.Endpoints['GET /repos/{owner}/{repo}/contents/{path}']['response']['data']
|
||||
export type ReleasesResponse = otypes.Endpoints['GET /repos/{owner}/{repo}/releases']['response']
|
||||
|
||||
export type ContentsResponse = otypes.Endpoints['GET /repos/{owner}/{repo}/contents/{path}']['response']
|
||||
|
||||
export interface OracleGraalVMEAFile {
|
||||
filename: string
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import * as c from '../constants.js'
|
||||
import * as core from '@actions/core'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
import { exec } from '../utils.js'
|
||||
import { join } from 'path'
|
||||
|
||||
const MUSL_NAME = 'x86_64-linux-musl-native'
|
||||
const MUSL_VERSION = '10.2.1'
|
||||
const MUSL_VERSION = '1.2.5.1'
|
||||
const MUSL_NAME = 'musl-toolchain'
|
||||
|
||||
export async function setUpNativeImageMusl(): Promise<void> {
|
||||
if (!c.IS_LINUX) {
|
||||
@@ -18,26 +17,10 @@ export async function setUpNativeImageMusl(): Promise<void> {
|
||||
} else {
|
||||
core.startGroup(`Setting up musl for GraalVM Native Image...`)
|
||||
const muslDownloadPath = await tc.downloadTool(
|
||||
`https://github.com/graalvm/setup-graalvm/releases/download/x86_64-linux-musl-${MUSL_VERSION}/${MUSL_NAME}.tgz`
|
||||
`https://github.com/graalvm/setup-graalvm/releases/download/v1.3.7/musl-toolchain-amd64-1.2.5-gcc10.3.0-zlib1.2.13.tar.gz`
|
||||
)
|
||||
const muslExtractPath = await tc.extractTar(muslDownloadPath)
|
||||
const muslPath = join(muslExtractPath, MUSL_NAME)
|
||||
|
||||
const zlibCommit = 'ec3df00224d4b396e2ac6586ab5d25f673caa4c2'
|
||||
const zlibDownloadPath = await tc.downloadTool(`https://github.com/madler/zlib/archive/${zlibCommit}.tar.gz`)
|
||||
const zlibExtractPath = await tc.extractTar(zlibDownloadPath)
|
||||
const zlibPath = join(zlibExtractPath, `zlib-${zlibCommit}`)
|
||||
const zlibBuildOptions = {
|
||||
cwd: zlibPath,
|
||||
env: {
|
||||
...process.env,
|
||||
CC: join(muslPath, 'bin', 'gcc')
|
||||
}
|
||||
}
|
||||
await exec('./configure', [`--prefix=${muslPath}`, '--static'], zlibBuildOptions)
|
||||
await exec('make', [], zlibBuildOptions)
|
||||
await exec('make', ['install'], { cwd: zlibPath })
|
||||
|
||||
core.info(`Adding ${MUSL_NAME} ${MUSL_VERSION} to tool-cache ...`)
|
||||
toolPath = await tc.cacheDir(muslPath, MUSL_NAME, MUSL_VERSION)
|
||||
core.endGroup()
|
||||
|
||||
@@ -174,7 +174,7 @@ export async function setUpGraalVMJDKDevBuild(): Promise<string> {
|
||||
return downloadAndExtractJDK(downloadUrl)
|
||||
}
|
||||
|
||||
export function findHighestJavaVersion(release: c.LatestReleaseResponseData, version: string): string {
|
||||
export function findHighestJavaVersion(release: c.LatestReleaseResponse['data'], version: string): string {
|
||||
const graalVMIdentifierPattern = determineGraalVMLegacyIdentifier(false, version, '(\\d+)')
|
||||
const expectedFileNameRegExp = new RegExp(
|
||||
`^${graalVMIdentifierPattern}${c.GRAALVM_FILE_EXTENSION.replace(/\./g, '\\.')}$`
|
||||
@@ -214,7 +214,7 @@ export async function setUpGraalVMLatest_22_X(gdsToken: string, javaVersion: str
|
||||
return setUpGraalVMRelease(gdsToken, version, javaVersion)
|
||||
}
|
||||
|
||||
export function findGraalVMVersion(release: c.LatestReleaseResponseData) {
|
||||
export function findGraalVMVersion(release: c.LatestReleaseResponse['data']) {
|
||||
const tag_name = release.tag_name
|
||||
if (!tag_name.startsWith(GRAALVM_TAG_PREFIX)) {
|
||||
throw new Error(`Could not find latest GraalVM release: ${tag_name}`)
|
||||
@@ -234,7 +234,7 @@ export async function setUpGraalVMRelease(gdsToken: string, version: string, jav
|
||||
return downloadExtractAndCacheJDK(downloader, toolName, version)
|
||||
}
|
||||
|
||||
function findDownloadUrl(release: c.LatestReleaseResponseData, javaVersion: string): string {
|
||||
function findDownloadUrl(release: c.LatestReleaseResponse['data'], javaVersion: string): string {
|
||||
const graalVMIdentifier = determineGraalVMLegacyIdentifier(false, c.VERSION_DEV, javaVersion)
|
||||
const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`
|
||||
for (const asset of release.assets) {
|
||||
|
||||
16
src/utils.ts
16
src/utils.ts
@@ -18,17 +18,17 @@ export async function exec(commandLine: string, args?: string[], options?: ExecO
|
||||
}
|
||||
}
|
||||
|
||||
export async function getLatestRelease(repo: string): Promise<c.LatestReleaseResponseData> {
|
||||
export async function getLatestRelease(repo: string): Promise<c.LatestReleaseResponse['data']> {
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {
|
||||
owner: c.GRAALVM_GH_USER,
|
||||
repo
|
||||
})
|
||||
).data as c.LatestReleaseResponseData /** missing digest property */
|
||||
).data
|
||||
}
|
||||
|
||||
export async function getContents(repo: string, path: string): Promise<c.ContentsResponseData> {
|
||||
export async function getContents(repo: string, path: string): Promise<c.ContentsResponse['data']> {
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {
|
||||
@@ -39,7 +39,11 @@ export async function getContents(repo: string, path: string): Promise<c.Content
|
||||
).data
|
||||
}
|
||||
|
||||
export async function getTaggedRelease(owner: string, repo: string, tag: string): Promise<c.LatestReleaseResponseData> {
|
||||
export async function getTaggedRelease(
|
||||
owner: string,
|
||||
repo: string,
|
||||
tag: string
|
||||
): Promise<c.LatestReleaseResponse['data']> {
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {
|
||||
@@ -47,14 +51,14 @@ export async function getTaggedRelease(owner: string, repo: string, tag: string)
|
||||
repo,
|
||||
tag
|
||||
})
|
||||
).data as c.LatestReleaseResponseData /** missing digest property */
|
||||
).data
|
||||
}
|
||||
|
||||
export async function getMatchingTags(
|
||||
owner: string,
|
||||
repo: string,
|
||||
tagPrefix: string
|
||||
): Promise<c.MatchingRefsResponseData> {
|
||||
): Promise<c.MatchingRefsResponse['data']> {
|
||||
const octokit = getOctokit()
|
||||
return (
|
||||
await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/tags/{tagPrefix}', {
|
||||
|
||||
Reference in New Issue
Block a user