fix(ci): install Maven in each job (runner has no mvn binary)
CI / Build JVM (push) Failing after 2m56s
CI / Build Native (push) Failing after 21m20s
CI / Build & Push Native Image (push) Has been skipped

The runner has Java (via setup-java) but no Maven. Add an
Install Maven step to build-jvm and build-native that downloads
Maven 3.9.6 from Apache to runner.workspace/.maven and adds it
to the PATH via $GITHUB_PATH. Idempotent: the if-guard skips
redownload if the binary already exists on the runner.
This commit is contained in:
2026-08-12 16:33:02 -04:00
parent f2c758eff1
commit f3af0f8975
+24
View File
@@ -28,6 +28,18 @@ jobs:
java-version: 21 java-version: 21
cache: maven cache: maven
- name: Install Maven
env:
MAVEN_VERSION: 3.9.6
MAVEN_HOME: ${{ runner.workspace }}/.maven
run: |
mkdir -p "$MAVEN_HOME"
if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then
curl -fsSL "https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | tar -xz -C "$MAVEN_HOME" --strip-components=1
fi
echo "$MAVEN_HOME/bin" >> "$GITHUB_PATH"
mvn --version
- name: Cache Node + npm - name: Cache Node + npm
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
@@ -60,6 +72,18 @@ jobs:
java-version: 21 java-version: 21
cache: maven cache: maven
- name: Install Maven
env:
MAVEN_VERSION: 3.9.6
MAVEN_HOME: ${{ runner.workspace }}/.maven
run: |
mkdir -p "$MAVEN_HOME"
if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then
curl -fsSL "https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | tar -xz -C "$MAVEN_HOME" --strip-components=1
fi
echo "$MAVEN_HOME/bin" >> "$GITHUB_PATH"
mvn --version
- name: Set up GraalVM - name: Set up GraalVM
uses: graalvm/setup-graalvm@v1 uses: graalvm/setup-graalvm@v1
with: with: