From d4a9fab1a90f3a2d9ffc8c8024118fc0a55e8c54 Mon Sep 17 00:00:00 2001 From: Luke Boswell Date: Mon, 4 Aug 2025 18:50:32 +1000 Subject: [PATCH] try removing any prebuilt libhost.a files --- .github/workflows/ci_zig.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_zig.yml b/.github/workflows/ci_zig.yml index 4c63149f5a..79ee32c53a 100644 --- a/.github/workflows/ci_zig.yml +++ b/.github/workflows/ci_zig.yml @@ -67,12 +67,6 @@ jobs: run: | zig build playground-test -Doptimize=ReleaseSmall -- --verbose - - name: Run Test Platform Tests - run: | - zig build -Dllvm - ./zig-out/bin/roc --no-cache test/platform/str/app.roc - ./zig-out/bin/roc --no-cache test/platform/int/app.roc - zig-tests: needs: check-once runs-on: ${{ matrix.os }} @@ -99,6 +93,27 @@ jobs: run: | zig build -Dllvm -Dfuzz -Dsystem-afl=false + - name: Run Test Platform Tests (Unix) + if: runner.os != 'Windows' + run: | + # Remove pre-built libhost.a files to ensure they're rebuilt with correct PIE settings + rm -f test/platform/str/libhost.a test/platform/int/libhost.a + # Rebuild test platform host libraries + zig build -Dllvm -Dfuzz -Dsystem-afl=false + ./zig-out/bin/roc --no-cache test/platform/str/app.roc + ./zig-out/bin/roc --no-cache test/platform/int/app.roc + + - name: Run Test Platform Tests (Windows) + if: runner.os == 'Windows' + run: | + # Remove pre-built libhost.a files to ensure they're rebuilt with correct PIE settings + if (Test-Path test/platform/str/libhost.a) { Remove-Item test/platform/str/libhost.a } + if (Test-Path test/platform/int/libhost.a) { Remove-Item test/platform/int/libhost.a } + # Rebuild test platform host libraries + zig build -Dllvm -Dfuzz -Dsystem-afl=false + zig-out\bin\roc.exe --no-cache test/platform/str/app.roc + zig-out\bin\roc.exe --no-cache test/platform/int/app.roc + - name: roc executable minimal check (Unix) if: runner.os != 'Windows' run: |