From f08f1f9fe003834ab6d7faa86ebf8f5a1deabf70 Mon Sep 17 00:00:00 2001 From: Sam Valladares Date: Sun, 26 Jul 2026 01:09:25 +0800 Subject: [PATCH] fix(ci): add the cross-compile target to the pinned toolchain The rust-toolchain.toml pin added in the previous commit broke the Intel Mac release build: dtolnay/rust-toolchain@stable installs the target for stable, but cargo then runs the pinned 1.97.1, which has no x86_64-apple-darwin std, so the build failed with 'can't find crate for core'. Add an explicit 'rustup target add' step after the toolchain install in both ci.yml and release.yml. It runs in the repo, so it targets the pinned toolchain. release.yml needed it too: without this the real release build would have failed at tag time on Windows and Intel Mac. Verified locally: reproduced the missing target on the pinned toolchain, applied the fix, then cargo check -p vestige-mcp --target x86_64-apple-darwin with the full Intel Mac release feature set exits 0. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 7 +++++++ .github/workflows/release.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 565ac85..a0b673b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,6 +96,13 @@ jobs: with: targets: ${{ matrix.target }} + # rust-toolchain.toml pins the toolchain, so cargo runs the pinned version + # rather than the stable one the action installed. Add the cross-compile + # target to the pinned toolchain too, or the build fails with + # "can't find crate for `core`". + - name: Add target to the pinned toolchain + run: rustup target add ${{ matrix.target }} + - name: Cache cargo uses: actions/cache@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1aec977..e70c918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,13 @@ jobs: with: targets: ${{ matrix.target }} + # rust-toolchain.toml pins the toolchain, so cargo runs the pinned version + # rather than the stable one the action installed. Add the cross-compile + # target to the pinned toolchain too, or the build fails with + # "can't find crate for `core`". + - name: Add target to the pinned toolchain + run: rustup target add ${{ matrix.target }} + - name: Validate release version shell: bash env: