@@ -46,36 +46,45 @@ jobs:
4646 echo "version=$version" >> "$GITHUB_OUTPUT"
4747
4848 smoke :
49- name : ${{ matrix.classifier }}
49+ name : ${{ matrix.classifier }}${{ matrix.container && ' (musl)' || '' }}
5050 needs : resolve
51+ # musl legs are a probe (glibc natives on Alpine, expected to fail until musl
52+ # natives ship), so they don't gate the workflow; the six native legs do.
53+ continue-on-error : ${{ matrix.experimental || false }}
5154 strategy :
5255 fail-fast : false
5356 matrix :
5457 # distribution is per-leg for clarity and easy override. Zulu ships JDK 25
55- # for all six targets (incl. Windows/ARM64, which Temurin does not yet) and
56- # matches publish.yml; change a single leg here if a target needs another.
58+ # for all targets (incl. Windows/ARM64, which Temurin does not yet) and
59+ # matches publish.yml. Legs with `container` run the linux native inside an
60+ # Alpine/musl JDK to probe musl support.
5761 include :
5862 - { os: ubuntu-latest, classifier: linux-x86_64, distribution: zulu }
5963 - { os: ubuntu-24.04-arm, classifier: linux-aarch64, distribution: zulu }
6064 - { os: macos-13, classifier: osx-x86_64, distribution: zulu }
6165 - { os: macos-14, classifier: osx-aarch64, distribution: zulu }
6266 - { os: windows-latest, classifier: windows-x86_64, distribution: zulu }
6367 - { os: windows-11-arm, classifier: windows-aarch64, distribution: zulu }
68+ - { os: ubuntu-latest, classifier: linux-x86_64, distribution: zulu, container: "amazoncorretto:25-alpine", experimental: true }
69+ - { os: ubuntu-24.04-arm, classifier: linux-aarch64, distribution: zulu, container: "amazoncorretto:25-alpine", experimental: true }
6470 runs-on : ${{ matrix.os }}
6571 steps :
6672 - name : Checkout (smoke sources only)
6773 uses : actions/checkout@v4
6874
69- - name : Set up JDK 25
75+ - name : Set up JDK 25 (host)
7076 uses : actions/setup-java@v4
7177 with :
7278 distribution : ${{ matrix.distribution }}
7379 java-version : ' 25'
7480
81+ # --- native runner path (glibc / macOS / Windows): run via JBang on the host ---
7582 - name : Set up JBang
83+ if : ${{ !matrix.container }}
7684 uses : jbangdev/setup-jbang@main
7785
7886 - name : Smoke-test ${{ needs.resolve.outputs.version }} on ${{ matrix.classifier }}
87+ if : ${{ !matrix.container }}
7988 shell : bash
8089 env :
8190 VERSION : ${{ needs.resolve.outputs.version }}
@@ -84,34 +93,10 @@ jobs:
8493 --deps "io.github.dfa1.zstd:zstd:${VERSION},io.github.dfa1.zstd:zstd-native-${{ matrix.classifier }}:${VERSION}" \
8594 .github/smoke/Smoke.java
8695
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
96+ # --- musl probe: fetch + compile on the glibc host, run inside an Alpine/musl
97+ # JDK container, so node-based actions never run under musl ---
98+ - name : Fetch released jars and compile the smoke (musl)
99+ if : ${{ matrix.container }}
115100 shell : bash
116101 env :
117102 VERSION : ${{ needs.resolve.outputs.version }}
@@ -125,10 +110,11 @@ jobs:
125110 mkdir -p out
126111 javac -cp libs/zstd.jar -d out .github/smoke/Smoke.java
127112
128- - name : Run the glibc native on musl/Alpine (probe — may fail until musl natives ship)
113+ - name : Smoke-test ${{ needs.resolve.outputs.version }} on ${{ matrix.classifier }} (musl/Alpine)
114+ if : ${{ matrix.container }}
129115 shell : bash
130116 run : |
131- docker run --rm -v "$PWD:/w" -w /w amazoncorretto:25-alpine \
117+ docker run --rm -v "$PWD:/w" -w /w "${{ matrix.container }}" \
132118 java --enable-native-access=ALL-UNNAMED \
133119 -cp "libs/zstd.jar:libs/zstd-native-${{ matrix.classifier }}.jar:out" \
134120 Smoke
0 commit comments