Skip to content

Commit 863d703

Browse files
committed
Retry downloading artifacts to prevent spurious failures due to network issues
1 parent 5f9be7e commit 863d703

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ matrix:
4949
stage: tools-and-build-and-tier1
5050
rust: nightly
5151
install:
52-
- rustup component add rust-src
53-
- cargo install xargo
52+
- travis_retry rustup component add rust-src
53+
- travis_retry cargo install xargo
5454
- name: "Build Stable Rust"
5555
script: sh ci/build.sh
5656
stage: tools-and-build-and-tier1

ci/build.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ test_target() {
2626

2727
# If there is a std component, fetch it:
2828
if [ "${NO_STD}" != "1" ]; then
29-
rustup target add "${TARGET}" --toolchain "${RUST}"
29+
# FIXME: rustup often fails to download some artifacts due to network
30+
# issues, so we retry this N times.
31+
N=5
32+
n=0
33+
until [ $n -ge $N ]
34+
do
35+
rustup target add "${TARGET}" --toolchain "${RUST}" && break
36+
n=$((n+1))
37+
sleep 1
38+
done
3039
fi
3140

3241
# Test that libc builds without any default features (no libstd)
@@ -110,13 +119,6 @@ x86_64-pc-windows-gnu \
110119
x86_64-unknown-linux-gnux32 \
111120
x86_64-unknown-redox \
112121
"
113-
# FIXME: these do not have a rust-std component available
114-
# aarch64-unknown-cloudabi armv7-unknown-cloudabi-eabihf
115-
# i686-unknown-cloudabi powerpc-unknown-linux-gnuspe
116-
# sparc-unknown-linux-gnu mips-unknown-linux-uclib
117-
# i686-unknown-haiku mipsel-unknown-unknown-linux-uclib
118-
# sparc64-unknown-netbsd x86_64-unknown-bitrig x86_64-unknown-haiku
119-
# x86_64-unknown-openbsd i686-unknown-netbsd
120122

121123
RUST_OSX_TARGETS="\
122124
aarch64-apple-ios \

0 commit comments

Comments
 (0)