Skip to content

Commit d5fc7b5

Browse files
dfa1claude
andcommitted
ci: probe whether the glibc linux natives load on musl/Alpine
Add a non-gating (continue-on-error) musl-probe job for linux-x86_64 and linux-aarch64. The natives are built for the *-linux-gnu ABI, so this checks empirically whether they load on musl rather than guessing. The action steps (checkout, setup-java, Maven fetch, javac) run on the glibc host; only the final `java` runs inside an Alpine/musl JDK container (amazoncorretto:25-alpine), so node-based actions never run under musl. If the probe fails, the fix is to add x86_64-linux-musl / aarch64-linux-musl target triples to build-zstd.sh and ship two more native jars. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 99423dc commit d5fc7b5

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/release-smoke.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,52 @@ jobs:
8383
jbang --java 25 \
8484
--deps "io.github.dfa1.zstd:zstd:${VERSION},io.github.dfa1.zstd:zstd-native-${{ matrix.classifier }}:${VERSION}" \
8585
.github/smoke/Smoke.java
86+
87+
# PROBE: do the glibc-built linux natives load on musl (Alpine)? The native is
88+
# compiled for the *-linux-gnu ABI, so this is expected to fail until musl
89+
# natives ship — it documents the gap rather than gating the workflow
90+
# (continue-on-error). The action steps run on the glibc host; only the final
91+
# `java` runs inside an Alpine/musl JDK container (so node-based actions, which
92+
# need glibc, are never run in the container).
93+
musl-probe:
94+
name: musl ${{ matrix.classifier }} (probe)
95+
needs: resolve
96+
continue-on-error: true
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
include:
101+
- { os: ubuntu-latest, classifier: linux-x86_64 }
102+
- { os: ubuntu-24.04-arm, classifier: linux-aarch64 }
103+
runs-on: ${{ matrix.os }}
104+
steps:
105+
- name: Checkout (smoke sources only)
106+
uses: actions/checkout@v4
107+
108+
- name: Set up JDK 25 (host — for javac and Maven)
109+
uses: actions/setup-java@v4
110+
with:
111+
distribution: zulu
112+
java-version: '25'
113+
114+
- name: Fetch released jars (glibc native) and compile the smoke
115+
shell: bash
116+
env:
117+
VERSION: ${{ needs.resolve.outputs.version }}
118+
run: |
119+
mvn -q org.apache.maven.plugins:maven-dependency-plugin:3.8.1:copy \
120+
-Dartifact="io.github.dfa1.zstd:zstd:${VERSION}" \
121+
-DoutputDirectory=libs -Dmdep.stripVersion=true
122+
mvn -q org.apache.maven.plugins:maven-dependency-plugin:3.8.1:copy \
123+
-Dartifact="io.github.dfa1.zstd:zstd-native-${{ matrix.classifier }}:${VERSION}" \
124+
-DoutputDirectory=libs -Dmdep.stripVersion=true
125+
mkdir -p out
126+
javac -cp libs/zstd.jar -d out .github/smoke/Smoke.java
127+
128+
- name: Run the glibc native on musl/Alpine (probe — may fail until musl natives ship)
129+
shell: bash
130+
run: |
131+
docker run --rm -v "$PWD:/w" -w /w amazoncorretto:25-alpine \
132+
java --enable-native-access=ALL-UNNAMED \
133+
-cp "libs/zstd.jar:libs/zstd-native-${{ matrix.classifier }}.jar:out" \
134+
Smoke

0 commit comments

Comments
 (0)