From 12cfe0fd55ff35adb17567d4ad45d59e7c340702 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:16:19 +0100 Subject: [PATCH 1/6] temurin: add support for Alpine Linux --- src/distributions/temurin/installer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/distributions/temurin/installer.ts b/src/distributions/temurin/installer.ts index 4a1989b..2b305eb 100644 --- a/src/distributions/temurin/installer.ts +++ b/src/distributions/temurin/installer.ts @@ -173,6 +173,11 @@ export class TemurinDistribution extends JavaBase { return 'mac'; case 'win32': return 'windows'; + case 'linux': + if (fs.existsSync('/etc/alpine-release')) { + return 'alpine-linux'; + } + return 'linux'; default: return process.platform; } From 0685457b965812587350dc0b5c9aafd97ee9ec94 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:19:46 +0100 Subject: [PATCH 2/6] attempt to add e2e test for Alpine --- .github/workflows/e2e-versions.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 0553d91..456af47 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -17,6 +17,8 @@ jobs: setup-java-major-versions: name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} runs-on: ${{ matrix.os }} + container: + image: ${{ matrix.container }} strategy: fail-fast: false matrix: @@ -48,6 +50,10 @@ jobs: - distribution: oracle os: ubuntu-latest version: 20 + - distribution: temurin + os: ubuntu-latest + version: 21 + container: alpine:latest steps: - name: Checkout From a3755773a1a1639243434e367b0c3eedf26ddc96 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:20:34 +0100 Subject: [PATCH 3/6] add dist --- dist/setup/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index be40d6d..235842c 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -125230,6 +125230,11 @@ class TemurinDistribution extends base_installer_1.JavaBase { return 'mac'; case 'win32': return 'windows'; + case 'linux': + if (fs_1.default.existsSync('/etc/alpine-release')) { + return 'alpine-linux'; + } + return 'linux'; default: return process.platform; } @@ -127946,4 +127951,4 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"] /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file From d67365e824ff32925fd1dad581c90735d5088701 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:23:50 +0100 Subject: [PATCH 4/6] rework test --- .github/workflows/e2e-versions.yml | 31 ++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 456af47..681c002 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -17,8 +17,6 @@ jobs: setup-java-major-versions: name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} runs-on: ${{ matrix.os }} - container: - image: ${{ matrix.container }} strategy: fail-fast: false matrix: @@ -50,10 +48,6 @@ jobs: - distribution: oracle os: ubuntu-latest version: 20 - - distribution: temurin - os: ubuntu-latest - version: 21 - container: alpine:latest steps: - name: Checkout @@ -214,6 +208,31 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash + setup-java-alpine-linux: + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }} + needs: setup-java-major-minor-versions + runs-on: ${{ matrix.os }} + container: + image: alpine:latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + distribution: ['temurin'] + version: ['21', '17'] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: setup-java + uses: ./ + id: setup-java + with: + java-version: ${{ matrix.version }} + distribution: ${{ matrix.distribution }} + - name: Verify Java + run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" + shell: bash + setup-java-custom-package-type: name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} needs: setup-java-major-minor-versions From ff1f7f380cd5873d486fcb3caec24aa36a162d13 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:30:36 +0100 Subject: [PATCH 5/6] rework test --- .github/workflows/e2e-versions.yml | 51 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 681c002..d7b713e 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -62,6 +62,32 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash + setup-java-alpine-linux: + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + container: + image: alpine:latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + distribution: ['temurin'] + version: ['21', '17'] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install bash + run: apk add --no-cache bash + - name: setup-java + uses: ./ + id: setup-java + with: + java-version: ${{ matrix.version }} + distribution: ${{ matrix.distribution }} + - name: Verify Java + run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" + shell: bash + setup-java-major-minor-versions: name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} needs: setup-java-major-versions @@ -208,31 +234,6 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash - setup-java-alpine-linux: - name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }} - needs: setup-java-major-minor-versions - runs-on: ${{ matrix.os }} - container: - image: alpine:latest - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - distribution: ['temurin'] - version: ['21', '17'] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: setup-java - uses: ./ - id: setup-java - with: - java-version: ${{ matrix.version }} - distribution: ${{ matrix.distribution }} - - name: Verify Java - run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" - shell: bash - setup-java-custom-package-type: name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} needs: setup-java-major-minor-versions From 5398d302412375859b9ade9fea45c930f6a98fe5 Mon Sep 17 00:00:00 2001 From: George Adams Date: Mon, 16 Sep 2024 20:29:42 +0100 Subject: [PATCH 6/6] Update .github/workflows/e2e-versions.yml Co-authored-by: christian <153755613+skateball@users.noreply.github.com> --- .github/workflows/e2e-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index d7b713e..d915634 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -71,7 +71,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - distribution: ['temurin'] + distribution: ['temurin', 'sapmachine'] version: ['21', '17'] steps: - name: Checkout