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