From 3263f9634621f3a9a7245415148d4ce1155538d3 Mon Sep 17 00:00:00 2001 From: Joel Rudsberg Date: Wed, 4 Dec 2024 09:31:52 +0100 Subject: [PATCH] Try with 'dev' instead and run 17 version test with logs --- .github/workflows/test.yml | 100 ++++++++++++++++++------------------- dist/main/index.js | 2 + src/graalvm.ts | 2 + 3 files changed, 54 insertions(+), 50 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5fa6ce..cd5275f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,22 +20,22 @@ jobs: npm install - run: | npm run all - # test: - # name: GraalVM - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # java-version: ['23', '21', '17', '20', 'dev'] - # distribution: ['graalvm', 'graalvm-community'] - # os: [ - # ubuntu-latest, - # macos-latest, # macOS on Apple silicon - # macos-13, # macOS on Intel - # windows-latest - # ] - # set-gds-token: [false] - # components: [''] - # include: + test: + name: GraalVM + runs-on: ${{ matrix.os }} + strategy: + matrix: + java-version: ['23', '21', '17', '20', 'dev'] + distribution: ['graalvm', 'graalvm-community'] + os: [ + ubuntu-latest, + 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 @@ -59,39 +59,39 @@ jobs: # 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@v4 - # - 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 || '' }} - # - 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 + - java-version: '17.0.13' + distribution: 'graalvm' + os: ubuntu-latest + set-gds-token: true + steps: + - uses: actions/checkout@v4 + - 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 || '' }} + - 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 # test-ce: # make sure the action works on a clean machine without building # needs: test # name: CE ${{ matrix.version }} + JDK${{ matrix.java-version }} on ${{ matrix.os }} @@ -429,7 +429,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./ with: - java-version: 'latest-ea' # For some reason 'latest-ea' is not found on ubuntu and macos, https://github.com/rudsberg/setup-graalvm/actions/runs/12142968278/job/33858727921 + java-version: 'dev' # For some reason 'latest-ea' is not found on ubuntu and macos, https://github.com/rudsberg/setup-graalvm/actions/runs/12142968278/job/33858727921 distribution: 'graalvm' native-image-enable-sbom: 'true' - name: Build Maven project and verify SBOM was generated diff --git a/dist/main/index.js b/dist/main/index.js index 05b1790..2a08ca2 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -92608,6 +92608,8 @@ function determineToolName(javaVersion, isCommunity) { } function downloadGraalVMJDK(downloadUrl, javaVersion) { return __awaiter(this, void 0, void 0, function* () { + console.log('Download URL: ' + downloadUrl); + console.log('java-version: ' + javaVersion); try { return yield (0, tool_cache_1.downloadTool)(downloadUrl); } diff --git a/src/graalvm.ts b/src/graalvm.ts index b39391f..efbc025 100644 --- a/src/graalvm.ts +++ b/src/graalvm.ts @@ -187,6 +187,8 @@ async function downloadGraalVMJDK( downloadUrl: string, javaVersion: string ): Promise { + console.log('Download URL: ' + downloadUrl) + console.log('java-version: ' + javaVersion) try { return await downloadTool(downloadUrl) } catch (error) {