Skip to content

Commit 84bbe73

Browse files
committed
fix: repair macOS and MIPS CI builds
1 parent c5c366e commit 84bbe73

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
env:
99
CARGO_TERM_COLOR: always
10+
# Avoid the async-drop query cycle in sqlx-core on nightly 2026-11-01.
11+
MIPS_TOOLCHAIN: nightly-2026-01-15
1012

1113
defaults:
1214
run:
@@ -187,16 +189,16 @@ jobs:
187189
if [[ $TARGET =~ ^mips.*$ ]]; then
188190
cd /opt/musl_gcc/${URL}-cross/lib/gcc/${URL}/11.2.1
189191
cp libgcc_eh.a libunwind.a
190-
rustup toolchain install nightly-x86_64-unknown-linux-gnu
191-
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
192-
RUST_LIB_SRC=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/
192+
rustup toolchain install "$MIPS_TOOLCHAIN" --profile minimal --component rust-src
193+
RUST_LIB_SRC="$(rustc +"$MIPS_TOOLCHAIN" --print sysroot)/lib/rustlib/src/rust"
193194
if [[ -f $RUST_LIB_SRC/library/Cargo.lock && ! -f $RUST_LIB_SRC/Cargo.lock ]]; then
194195
cp -f $RUST_LIB_SRC/library/Cargo.lock $RUST_LIB_SRC/Cargo.lock
195196
fi
196197
fi
197198
rustup -V
198199
199200
# some additional configuration for cross-compilation on linux
201+
mkdir -p ~/.cargo
200202
cat >>~/.cargo/config.toml <<EOF
201203
[target.x86_64-unknown-linux-musl]
202204
rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"]
@@ -247,7 +249,7 @@ jobs:
247249
if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }}
248250
run: |
249251
if [[ $TARGET =~ ^mips.*$ ]]; then
250-
cargo +nightly build --release --verbose --target $TARGET -Z build-std=std,panic_abort
252+
cargo +"$MIPS_TOOLCHAIN" build --release --verbose --target $TARGET -Z build-std=std,panic_abort
251253
else
252254
cargo build --release --verbose --target $TARGET
253255
fi

0 commit comments

Comments
 (0)