File tree Expand file tree Collapse file tree 4 files changed +46
-22
lines changed Expand file tree Collapse file tree 4 files changed +46
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -51,7 +51,12 @@ steps:
51
51
- bash : src/ci/scripts/dump-environment.sh
52
52
displayName : Show the current environment
53
53
54
- - template : install-sccache.yml
54
+ - bash : src/ci/scripts/install-sccache.sh
55
+ env :
56
+ AGENT_OS : $(Agent.OS)
57
+ displayName : Install sccache
58
+ condition : and(succeeded(), not(variables.SKIP_JOB))
59
+
55
60
- template : install-clang.yml
56
61
57
62
# Switch to XCode 9.3 on OSX since it seems to be the last version that supports
Original file line number Diff line number Diff line change
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} /2018-04-02-sccache-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.
Original file line number Diff line number Diff line change 4
4
# `source shared.sh`, hence the invalid shebang and not being
5
5
# marked as an executable file in git.
6
6
7
+ export MIRRORS_BASE=" https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc"
8
+
7
9
# See http://unix.stackexchange.com/questions/82598
8
10
# Duplicated in docker/dist-various-2/shared.sh
9
11
function retry {
@@ -32,6 +34,24 @@ function isOSX {
32
34
[ " $AGENT_OS " = " Darwin" ]
33
35
}
34
36
37
+ function isMacOS {
38
+ isOSX
39
+ }
40
+
41
+ function isWindows {
42
+ [ " $AGENT_OS " = " Windows_NT" ]
43
+ }
44
+
35
45
function getCIBranch {
36
46
echo " $BUILD_SOURCEBRANCHNAME "
37
47
}
48
+
49
+ function ciCommandAddPath {
50
+ if [[ $# -ne 1 ]]; then
51
+ echo " usage: $0 <path>"
52
+ exit 1
53
+ fi
54
+ path=" $1 "
55
+
56
+ echo " ##vso[task.prependpath]${path} "
57
+ }
You can’t perform that action at this time.
0 commit comments