diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7013083..3d3024ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,23 +9,17 @@ 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 + - name: Checkout uses: actions/checkout@v2 - - 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}" + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Build + uses: docker/build-push-action@v2 + with: + context: jdk17 + platforms: linux/arm64 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"]