]> git.lizzy.rs Git - rust.git/blob - src/ci/scripts/install-sccache.sh
Auto merge of #94954 - SimonSapin:null-thin3, r=yaahc
[rust.git] / src / ci / scripts / install-sccache.sh
1 #!/bin/bash
2 # This script installs sccache on the local machine. Note that we don't install
3 # sccache on Linux since it's installed elsewhere through all the containers.
4
5 set -euo pipefail
6 IFS=$'\n\t'
7
8 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
9
10 if isMacOS; then
11     curl -fo /usr/local/bin/sccache "${MIRRORS_BASE}/2021-08-25-sccache-v0.2.15-x86_64-apple-darwin"
12     chmod +x /usr/local/bin/sccache
13 elif isWindows; then
14     mkdir -p sccache
15     curl -fo sccache/sccache.exe "${MIRRORS_BASE}/2018-04-26-sccache-x86_64-pc-windows-msvc"
16     ciCommandAddPath "$(pwd)/sccache"
17 fi
18
19 # FIXME: we should probably install sccache outside the containers and then
20 # mount it inside the containers so we can centralize all installation here.