@@ -168,7 +168,6 @@ jobs:
168168 # Macos fails on unstable rust. We skip the inline examples test for now.
169169 if : " !(contains(matrix.os, 'macos') && matrix.rust == 'nightly')"
170170 run : cargo test --release --workspace --features closure,anyhow,runtime --no-fail-fast
171-
172171 test-embed :
173172 name : Test with embed
174173 runs-on : ubuntu-latest
@@ -226,3 +225,50 @@ jobs:
226225
227226 - name : Test with embed feature
228227 run : cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast
228+
229+ build-musl :
230+ name : Musl
231+ runs-on : ubuntu-latest
232+ strategy :
233+ matrix :
234+ php : ["8.1", "8.2", "8.3", "8.4"]
235+ phpts : [ts, nts]
236+ env :
237+ CARGO_TERM_COLOR : always
238+ steps :
239+ - name : Checkout code
240+ uses : actions/checkout@v5
241+
242+ - name : Set up Docker Buildx
243+ uses : docker/setup-buildx-action@v3
244+
245+ - name : Build Docker image with PHP ${{ matrix.php }}
246+ uses : docker/build-push-action@v6
247+ with :
248+ context : .
249+ file : .github/action/musl/Dockerfile
250+ target : ci-builder
251+ tags : ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }}
252+ cache-from : type=gha,scope=musl-${{ matrix.php }}-${{ matrix.phpts }}
253+ cache-to : type=gha,mode=max,scope=musl-${{ matrix.php }}-${{ matrix.phpts }}
254+ build-args : |
255+ PHP_VERSION=${{ matrix.php }}
256+ TS=${{ matrix.phpts }}
257+ load : true
258+
259+ - name : Build ext-php-rs with musl
260+ run : |
261+ docker run --rm \
262+ -e EXT_PHP_RS_TEST="" \
263+ -v ${{ github.workspace }}:/workspace \
264+ -w /workspace \
265+ ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }} \
266+ build --release --features closure,anyhow,static --workspace --target x86_64-unknown-linux-musl
267+
268+ - name : Test ext-php-rs with musl
269+ run : |
270+ docker run --rm \
271+ -v ${{ github.workspace }}:/workspace \
272+ -w /workspace \
273+ ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }} \
274+ test --release --workspace --features closure,anyhow,static --target x86_64-unknown-linux-musl --no-fail-fast
0 commit comments