@@ -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,63 @@ 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 : Find libclang.a location
267+ run : |
268+ echo "Searching for libclang.a installed by libclang-17-dev:"
269+ dpkg -L libclang-17-dev | grep -E "libclang.*\.a$" || echo "No .a files found"
270+ echo ""
271+ echo "Checking common locations:"
272+ ls -la /usr/lib/llvm-17/lib/libclang*.a 2>/dev/null || echo "Not in /usr/lib/llvm-17/lib/"
273+ ls -la /usr/lib/x86_64-linux-gnu/libclang*.a 2>/dev/null || echo "Not in /usr/lib/x86_64-linux-gnu/"
274+
275+ - name : Configure Clang
276+ run : |
277+ echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-17/lib" >> $GITHUB_ENV
278+ echo "LLVM_VERSION=17" >> $GITHUB_ENV
279+ echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-17/bin/llvm-config" >> $GITHUB_ENV
280+
281+ - name : Build
282+ uses : houseabsolute/actions-rust-cross@v1
283+ with :
284+ target : x86_64-unknown-linux-musl
285+ use-rust-cache : true
286+ command : build
287+ args : --release --no-default-features --features closure,anyhow,static,enum --workspace
0 commit comments