From df91cc03aa184fa5e9f5dab6d024bb75fe873a7a Mon Sep 17 00:00:00 2001 From: Joel Rudsberg Date: Fri, 29 Nov 2024 17:03:25 +0100 Subject: [PATCH] Trying to get CI working as expected --- .github/workflows/test.yml | 56 ++++++++++++++++++++------------------ src/main.ts | 4 +-- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17c4889..7f4151f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,9 +19,7 @@ jobs: - run: | npm install - run: | - npm run build && npm run package && npm test - # - run: | - # npm run all + npm run build && npm run package && npm run test # test: # name: GraalVM # runs-on: ${{ matrix.os }} @@ -296,28 +294,28 @@ jobs: # exit 24 # } # if: runner.os == 'Windows' - # test-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@v4 - # - 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-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@v4 + - 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-native-image-windows-msvc: # name: native-image on windows-2022 # runs-on: windows-2022 @@ -421,11 +419,15 @@ jobs: test-sbom: needs: build name: test 'native-image-enable-sbom' option - runs-on: macos-latest # TODO: use matrix vlaue + runs-on: windows-latest # TODO: use matrix vlaue + permissions: + contents: read + pull-requests: write # TODO: use appropriate matrix steps: - uses: actions/checkout@v4 - - uses: ./ + - name: Run setup-graalvm action + uses: ./ with: java-version: '23' distribution: 'graalvm' diff --git a/src/main.ts b/src/main.ts index 09aaad1..2930cb7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,9 +19,9 @@ import {setUpSBOMSupport} from './features/sbom' async function run(): Promise { try { core.info('') - core.info('Starting setup...') + core.warning('Starting setup...') const isSbomEnabled = core.getInput('native-image-enable-sbom') === 'true' - core.info(`SBOM generation is ${isSbomEnabled ? 'enabled' : 'disabled'}`) + core.warning(`SBOM generation is ${isSbomEnabled ? 'enabled' : 'disabled'}`) core.info('') const javaVersion = core.getInput(c.INPUT_JAVA_VERSION, {required: true}) const javaPackage = core.getInput(c.INPUT_JAVA_PACKAGE)