diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-10-04 18:42:53 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2019-10-25 16:03:06 +0200 |
| commit | a36077235e800cd2d46aa70151de8c7eac0ced5b (patch) | |
| tree | 83beac30e82940a99032e0314c6b84ceadcff243 /src/ci/scripts | |
| parent | c1fb42add5a7859b1b8e258d3c03fd5a29129c40 (diff) | |
| download | rust-a36077235e800cd2d46aa70151de8c7eac0ced5b.tar.gz rust-a36077235e800cd2d46aa70151de8c7eac0ced5b.zip | |
ci: extract installing sccache into a script
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/install-sccache.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ci/scripts/install-sccache.sh b/src/ci/scripts/install-sccache.sh new file mode 100755 index 00000000000..d3c29899225 --- /dev/null +++ b/src/ci/scripts/install-sccache.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# This script installs sccache on the local machine. Note that we don't install +# sccache on Linux since it's installed elsewhere through all the containers. + +set -euo pipefail +IFS=$'\n\t' + +source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" + +if isMacOS; then + curl -fo /usr/local/bin/sccache "${MIRRORS_BASE}/2018-04-02-sccache-x86_64-apple-darwin" + chmod +x /usr/local/bin/sccache +elif isWindows; then + mkdir -p sccache + curl -fo sccache/sccache.exe "${MIRRORS_BASE}/2018-04-26-sccache-x86_64-pc-windows-msvc" + ciCommandAddPath "$(pwd)/sccache" +fi + +# FIXME: we should probably install sccache outside the containers and then +# mount it inside the containers so we can centralize all installation here. |
