@@ -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,49 @@ 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+ tags : ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }}
251+ cache-from : type=gha,scope=musl-${{ matrix.php }}-${{ matrix.phpts }}
252+ cache-to : type=gha,mode=max,scope=musl-${{ matrix.php }}-${{ matrix.phpts }}
253+ build-args : |
254+ PHP_VERSION=${{ matrix.php }}
255+ TS=${{ matrix.phpts }}
256+ load : true
257+
258+ - name : Build ext-php-rs with musl
259+ run : |
260+ docker run --rm \
261+ -e EXT_PHP_RS_TEST="" \
262+ -v ${{ github.workspace }}:/workspace \
263+ -w /workspace \
264+ ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }} \
265+ build --release --features closure,anyhow,static --workspace --target x86_64-unknown-linux-musl
266+
267+ - name : Test ext-php-rs with musl
268+ run : |
269+ docker run --rm \
270+ -v ${{ github.workspace }}:/workspace \
271+ -w /workspace \
272+ ext-php-rs-musl:${{ matrix.php }}-${{ matrix.phpts }} \
273+ test --release --workspace --features closure,anyhow,static --target x86_64-unknown-linux-musl --no-fail-fast
0 commit comments