@@ -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,58 @@ 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+ - name : Setup PHP
242+ uses : shivammathur/setup-php@v2
243+ with :
244+ php-version : ${{ matrix.php }}
245+ env :
246+ phpts : ${{ matrix.phpts }}
247+ debug : true
248+
249+ - name : Cache LLVM and Clang
250+ id : cache-llvm
251+ uses : actions/cache@v4
252+ with :
253+ path : ${{ runner.temp }}/llvm-17
254+ key : ubuntu-latest-llvm-17
255+ - name : Setup LLVM & Clang
256+ id : clang
257+ uses : KyleMayes/install-llvm-action@v2
258+ with :
259+ version : 17
260+ directory : ${{ runner.temp }}/llvm-17
261+ cached : ${{ steps.cache-llvm.outputs.cache-hit }}
262+
263+ - name : Install libclang.a
264+ run : sudo apt-get update && sudo apt-get install --assume-yes --no-install-recommends libclang-17-dev
265+
266+ - name : Symlink libclang static libraries
267+ run : |
268+ ln -sf /usr/lib/llvm-17/lib/*.a ${{ runner.temp }}/llvm-17/lib/
269+
270+ - name : Configure Clang
271+ run : |
272+ echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-17/lib" >> $GITHUB_ENV
273+ echo "LLVM_VERSION=17" >> $GITHUB_ENV
274+ echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-17/bin/llvm-config" >> $GITHUB_ENV
275+
276+ - name : Build
277+ uses : houseabsolute/actions-rust-cross@v1
278+ with :
279+ target : x86_64-unknown-linux-musl
280+ use-rust-cache : true
281+ command : build
282+ args : --release --no-default-features --features closure,anyhow,static,enum --workspace
0 commit comments