From 0ce8d401d87c2bbd8b9def3c1e9a056cc3d56181 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Fri, 14 Aug 2026 13:40:59 -0400 Subject: [PATCH] fix(ci): build static natively with musl on the build host (drop container-build) container-build=true runs the native-image inside a Mandrel container, but in the act runner the workspace mount doesn't resolve (/workspace/... is a container path, not a host path), so the Mandrel container can't see shot-crafter-calculator-1.0.0-runner.jar. Fix: install musl + musl-tools in the CI container, build locally. Quarkus 3.x's binary-type=STATIC will then produce a genuinely static binary linked against musl, which has no dependency on the host's glibc and runs cleanly on quarkus-micro-image:2.0 (UBI 9, glibc 2.34). --- .gitea/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5949dfc..77c0878 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: image: maven:3.9.6-eclipse-temurin-21 options: --memory=8g steps: - - name: Install git, node, gcc, docker, buildx, and basic tools + - name: Install git, node, gcc, musl, docker, buildx, and basic tools run: | apt-get update - apt-get install -y git curl ca-certificates build-essential zlib1g-dev docker.io docker-buildx + apt-get install -y git curl ca-certificates build-essential zlib1g-dev musl musl-tools docker.io docker-buildx curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt-get install -y nodejs rm -rf /var/lib/apt/lists/* @@ -33,6 +33,7 @@ jobs: gcc --version docker --version docker buildx version + musl-gcc --version 2>/dev/null || echo "musl-gcc not present (binary-type=STATIC won't produce static binaries)" - name: Checkout uses: actions/checkout@v4 @@ -61,7 +62,7 @@ jobs: restore-keys: ${{ runner.os }}-node- - name: Build (Native) - run: mvn package -Pnative -B -DskipTests -Dquarkus.native.native-image-xmx=4g -Dquarkus.native.binary-type=STATIC -Dquarkus.native.container-build=true + run: mvn package -Pnative -B -DskipTests -Dquarkus.native.native-image-xmx=4g -Dquarkus.native.binary-type=STATIC - name: Verify native binary run: |