]> git.lizzy.rs Git - rust.git/blob - .travis.yml
add some disk usage accounting
[rust.git] / .travis.yml
1 language: minimal
2 sudo: required
3 dist: trusty
4 services:
5   - docker
6
7 git:
8   depth: 1
9   submodules: false
10
11 matrix:
12   fast_finish: true
13   include:
14     # Linux builders, all docker images
15     - env: IMAGE=arm-android
16     - env: IMAGE=armhf-gnu
17     - env: IMAGE=cross DEPLOY=1
18     - env: IMAGE=linux-tested-targets DEPLOY=1
19     - env: IMAGE=dist-android DEPLOY=1
20     - env: IMAGE=dist-arm-linux DEPLOY=1
21     - env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
22     - env: IMAGE=dist-freebsd DEPLOY=1
23     - env: IMAGE=dist-mips-linux DEPLOY=1
24     - env: IMAGE=dist-mips64-linux DEPLOY=1
25     - env: IMAGE=dist-powerpc-linux DEPLOY=1
26     - env: IMAGE=dist-powerpc64-linux DEPLOY=1
27     - env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
28     - env: IMAGE=dist-x86-linux DEPLOY=1
29     - env: IMAGE=emscripten
30     - env: IMAGE=i686-gnu
31     - env: IMAGE=i686-gnu-nopt
32     - env: IMAGE=x86_64-gnu
33     - env: IMAGE=x86_64-gnu-full-bootstrap
34     - env: IMAGE=x86_64-gnu-aux
35     - env: IMAGE=x86_64-gnu-debug
36     - env: IMAGE=x86_64-gnu-nopt
37     - env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
38     - env: IMAGE=x86_64-gnu-distcheck
39     - env: IMAGE=x86_64-gnu-incremental
40
41     # OSX builders
42     - env: >
43         RUST_CHECK_TARGET=check
44         RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin
45         SRC=.
46       os: osx
47       osx_image: xcode8.2
48       install: &osx_install_sccache >
49         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-apple-darwin &&
50           chmod +x /usr/local/bin/sccache
51     - env: >
52         RUST_CHECK_TARGET=check
53         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
54         SRC=.
55       os: osx
56       osx_image: xcode8.2
57       install: *osx_install_sccache
58
59     - env: >
60         RUST_CHECK_TARGET=dist
61         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
62         SRC=.
63         DEPLOY=1
64       os: osx
65       osx_image: xcode8.2
66       install: >
67         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-apple-darwin &&
68           chmod +x /usr/local/bin/sccache &&
69           brew uninstall --ignore-dependencies openssl &&
70           brew install openssl --universal --without-test
71     - env: >
72         RUST_CHECK_TARGET=dist
73         RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
74         SRC=.
75         DEPLOY=1
76       os: osx
77       osx_image: xcode8.2
78       install: *osx_install_sccache
79
80     # "alternate" deployments, these are "nightlies" but don't have assertions
81     # turned on, they're deployed to a different location primarily for projects
82     # which are stuck on nightly and don't want llvm assertions in the artifacts
83     # that they use.
84     - env: IMAGE=dist-x86-linux DEPLOY_ALT=1
85     - env: >
86         RUST_CHECK_TARGET=dist
87         RUST_CONFIGURE_ARGS="--enable-extended"
88         SRC=.
89         DEPLOY_ALT=1
90       os: osx
91       osx_image: xcode8.2
92       install: *osx_install_sccache
93
94 env:
95   global:
96     - SCCACHE_BUCKET=rust-lang-ci-sccache
97     - AWS_ACCESS_KEY_ID=AKIAIMX7VLAS3PZAVLUQ
98     # AWS_SECRET_ACCESS_KEY=...
99     - secure: "Pixhh0hXDqGCdOyLtGFjli3J2AtDWIpyb2btIrLe956nCBDRutRoMm6rv5DI9sFZN07Mms7VzNNvhc9wCW1y63JAm414d2Co7Ob8kWMZlz9l9t7ACHuktUiis8yr+S4Quq1Vqd6pqi7pf2J++UxC8R/uLeqVrubzr6+X7AbmEFE="
100
101 before_script:
102   - >
103       echo "#### Disk usage before running script:";
104       df -h;
105       du . | sort -nr | head -n100
106
107 script:
108   - >
109       if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
110           echo skipping, not a full build;
111       elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
112           travis_retry sh -c 'git submodule deinit -f . && git submodule update --init' &&
113           src/ci/run.sh;
114       else
115           travis_retry sh -c 'git submodule deinit -f . && git submodule update --init' &&
116           src/ci/docker/run.sh $IMAGE;
117       fi
118
119 after_success:
120   - >
121       echo "#### Build successful; Disk usage after running script:";
122       df -h;
123       du . | sort -nr | head -n100
124
125 after_failure:
126   - >
127       echo "#### Build failed; Disk usage after running script:";
128       df -h;
129       du . | sort -nr | head -n100
130
131 # Save tagged docker images we created and load them if they're available
132 before_cache:
133   - docker history -q rust-ci |
134     grep -v missing |
135     xargs docker save |
136     gzip > $HOME/docker/rust-ci.tar.gz
137 before_install:
138   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
139
140 notifications:
141   email: false
142
143 cache:
144   directories:
145     - $HOME/docker
146
147 before_deploy:
148   - mkdir -p deploy/$TRAVIS_COMMIT
149   - >
150       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
151           rm -rf build/dist/doc &&
152           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
153       else
154           rm -rf obj/build/dist/doc &&
155           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
156       fi
157
158 deploy:
159   - provider: s3
160     bucket: rust-lang-ci
161     skip_cleanup: true
162     local_dir: deploy
163     upload_dir: rustc-builds
164     acl: public_read
165     region: us-east-1
166     access_key_id: AKIAIPQVNYF2T3DTYIWQ
167     secret_access_key:
168       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
169     on:
170       branch: auto
171       condition: $DEPLOY = 1
172
173   # this is the same as the above deployment provider except that it uploads to
174   # a slightly different directory and has a different trigger
175   - provider: s3
176     bucket: rust-lang-ci
177     skip_cleanup: true
178     local_dir: deploy
179     upload_dir: rustc-builds-alt
180     acl: public_read
181     region: us-east-1
182     access_key_id: AKIAIPQVNYF2T3DTYIWQ
183     secret_access_key:
184       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
185     on:
186       branch: auto
187       condition: $DEPLOY_ALT = 1