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: