From 5196719b77f937308666c3ee75a92a97fe2ee25f Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Sat, 30 Oct 2021 19:31:36 -0400 Subject: [PATCH 1/3] Use buildx --- .github/workflows/ci.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7013083..0237d8c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,16 +13,20 @@ jobs: matrix: version: [8-jdk, 11-jdk, 11-jdk-alpine, 17-jdk, 17-jdk-alpine] steps: - - name: checkout + - name: Checkout uses: actions/checkout@v2 - - name: build + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + - name: Build env: version: ${{ matrix.version }} run: | cd "jdk${version/-jdk/}" docker pull "eclipse-temurin:${version}" docker build --tag "gradle:${version}" . - - name: test + - name: Test env: version: ${{ matrix.version }} expectedGradleVersion: 7.2 From 4aa53314ccb474739b3d683a1449135e0338b6c4 Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Sat, 30 Oct 2021 19:28:05 -0400 Subject: [PATCH 2/3] DO NOT MERGE: Temporarily remove other versions and run build on Arm --- .github/workflows/ci.yaml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0237d8c2..3d3024ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,9 +9,6 @@ defaults: jobs: ci: runs-on: ubuntu-latest - strategy: - matrix: - version: [8-jdk, 11-jdk, 11-jdk-alpine, 17-jdk, 17-jdk-alpine] steps: - name: Checkout uses: actions/checkout@v2 @@ -19,17 +16,10 @@ jobs: uses: docker/setup-buildx-action@v1 with: install: true + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 - name: Build - env: - version: ${{ matrix.version }} - run: | - cd "jdk${version/-jdk/}" - docker pull "eclipse-temurin:${version}" - docker build --tag "gradle:${version}" . - - name: Test - env: - version: ${{ matrix.version }} - expectedGradleVersion: 7.2 - run: | - cd test - ./run.sh "gradle:${version}" "${expectedGradleVersion}" + uses: docker/build-push-action@v2 + with: + context: jdk17 + platforms: linux/arm64 From a4141ca290ca79a102892886e0bb5d9efa3cda85 Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Sat, 30 Oct 2021 18:55:56 -0400 Subject: [PATCH 3/3] Set conditional GRADLE_OPTS with launch mechanism (closes #196) --- jdk17/Dockerfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/jdk17/Dockerfile b/jdk17/Dockerfile index 52e2ceb1..5889c028 100644 --- a/jdk17/Dockerfile +++ b/jdk17/Dockerfile @@ -1,4 +1,19 @@ -FROM eclipse-temurin:17-jdk +FROM eclipse-temurin:17-jdk AS base + +ARG TARGETARCH + +FROM base AS base-amd64 + +FROM base AS base-arm + +FROM base AS base-arm64 +ENV GRADLE_OPTS="-Djdk.lang.Process.launchMechanism=vfork" + +FROM base AS base-ppc64le + +FROM base AS base-s390x + +FROM base-$TARGETARCH CMD ["gradle"]