Skip to content

Set conditional GRADLE_OPTS with launch mechanism (closes #196) #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 16 additions & 1 deletion jdk17/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down