From 3b4a4eac3f3952603df619ca8426e54e8d590c17 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Thu, 13 Aug 2026 17:39:12 +0530 Subject: [PATCH] fix(ci): install build-essential before cargo test in ai-credits job The bare bookworm runner image has no C toolchain at all, unlike build.yaml's jobs which build inside a Dockerfile-based image with one already present. proc-macro2/libc/etc build scripts need `cc` to link and failed immediately (error: linker `cc` not found) before any real test code ran. Co-Authored-By: Claude Sonnet 5 --- .forgejo/workflows/test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 114ac9b..a4e9333 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -48,6 +48,16 @@ jobs: run: | test -n "${TEST_DATABASE_URL:-}" || { echo "TEST_DATABASE_URL secret is not set - see docs/LIVE_SERVER_RUNBOOK.md step 6"; exit 1; } + - name: Install build toolchain + if: steps.check.outputs.run == 'true' + run: | + set -euo pipefail + # The bare bookworm runner image (unlike build.yaml's Dockerfile-based + # builds) has no C toolchain at all - proc-macro2/libc/etc. build + # scripts need `cc` to link, which fails immediately without this. + apt-get update -qq + apt-get install -y -qq build-essential pkg-config + - name: Install Rust if: steps.check.outputs.run == 'true' run: |