From ebd630616cff1a40d0c930971eceeddbdb9e45ec Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Wed, 7 Feb 2024 12:01:55 +0100 Subject: [PATCH 1/2] Add CI test for no `libm` on the host --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 44ed4e1683..e4c3ae6d99 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -102,6 +102,11 @@ jobs: cargo apk build -p example-runner-wgpu --lib --features use-installed-tools --no-default-features echo "::endgroup::" + - name: Ensure libm is not getting into the host build (https://github.com/EmbarkStudios/rust-gpu/issues/1121) + run: | + LIBM_MATCHES=$(cargo tree -e features -p spirv-std | grep --count libm) + if [ "$LIBM_MATCHES" != "" ]; then echo "Found libm in dependency tree"; exit 1; fi + # This just allows us to branch protect on this one job rather needing to change # it if the test matrix changes test_success: From 6797b679bf7b025ba346e02388c2c99247398698 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 26 Feb 2024 12:58:42 +0100 Subject: [PATCH 2/2] Fix CI check --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e4c3ae6d99..7b729e09b0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -104,7 +104,7 @@ jobs: - name: Ensure libm is not getting into the host build (https://github.com/EmbarkStudios/rust-gpu/issues/1121) run: | - LIBM_MATCHES=$(cargo tree -e features -p spirv-std | grep --count libm) + LIBM_MATCHES=$(cargo tree -e features -p spirv-std | grep --count libm || true) if [ "$LIBM_MATCHES" != "" ]; then echo "Found libm in dependency tree"; exit 1; fi # This just allows us to branch protect on this one job rather needing to change