fix(ci): use direct download for sccache 0.14.0 in DEV-DEPENDENCIES.sh

cargo-binstall requires cargo env which may not be set for root.
Direct GitHub release download is simpler and more reliable.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-29 11:03:38 -03:00
parent 93bb15997e
commit 5d9b88018f

View file

@ -37,14 +37,12 @@ install_sccache() {
fi
echo "Upgrading sccache from ${CURRENT_VER:-none} to $WANT_VER..."
rm -f /usr/local/bin/sccache /usr/local/bin/sccache-dist
if ! command -v cargo-binstall &> /dev/null; then
echo "Installing cargo-binstall..."
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cp /root/.cargo/bin/cargo-binstall /usr/local/bin/ 2>/dev/null || true
fi
cargo binstall -y sccache@$WANT_VER --targets x86_64-unknown-linux-musl
find /root/.cargo/bin /home/*/.cargo/bin -name sccache -exec cp {} /usr/local/bin/ \; 2>/dev/null || true
ARCH=$(uname -m)
curl -L "https://github.com/mozilla/sccache/releases/download/v${WANT_VER}/sccache-v${WANT_VER}-${ARCH}-unknown-linux-musl.tar.gz" -o /tmp/sccache.tar.gz
tar -xzf /tmp/sccache.tar.gz -C /tmp
cp "/tmp/sccache-v${WANT_VER}-${ARCH}-unknown-linux-musl/sccache" /usr/local/bin/sccache
chmod +x /usr/local/bin/sccache
rm -rf /tmp/sccache*
sccache --version
}