travis: Make a few curl
invocations more resilient
Use the `-f` flag to indicate that, for example, a 500 response code is to be considered a failure, triggering the normal retry logic. Also ignore errors where we check the date from google.com, as a failure there shouldn't fail the build.
This commit is contained in:
parent
5803f99bd4
commit
c843661d9a
10
.travis.yml
10
.travis.yml
@ -64,9 +64,9 @@ matrix:
|
|||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode8.2
|
||||||
install: &osx_install_sccache >
|
install: &osx_install_sccache >
|
||||||
travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-apple-darwin &&
|
travis_retry curl -fo /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-apple-darwin &&
|
||||||
chmod +x /usr/local/bin/sccache &&
|
chmod +x /usr/local/bin/sccache &&
|
||||||
travis_retry curl -o /usr/local/bin/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
|
travis_retry curl -fo /usr/local/bin/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
|
||||||
chmod +x /usr/local/bin/stamp
|
chmod +x /usr/local/bin/stamp
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=check
|
RUST_CHECK_TARGET=check
|
||||||
@ -144,7 +144,7 @@ env:
|
|||||||
|
|
||||||
# Note that this is overridden on OSX builders
|
# Note that this is overridden on OSX builders
|
||||||
install: >
|
install: >
|
||||||
travis_retry curl -o $HOME/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl &&
|
travis_retry curl -fo $HOME/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl &&
|
||||||
chmod +x $HOME/stamp &&
|
chmod +x $HOME/stamp &&
|
||||||
export PATH=$PATH:$HOME
|
export PATH=$PATH:$HOME
|
||||||
|
|
||||||
@ -183,10 +183,10 @@ before_script:
|
|||||||
# clock drift. Timezones don't matter since relative deltas give all the necessary info.
|
# clock drift. Timezones don't matter since relative deltas give all the necessary info.
|
||||||
script:
|
script:
|
||||||
- >
|
- >
|
||||||
date && curl -s --head https://google.com | grep ^Date: | sed 's/Date: //g'
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
||||||
- stamp sh -x -c "$RUN_SCRIPT"
|
- stamp sh -x -c "$RUN_SCRIPT"
|
||||||
- >
|
- >
|
||||||
date && curl -s --head https://google.com | grep ^Date: | sed 's/Date: //g'
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- >
|
- >
|
||||||
|
@ -15,7 +15,7 @@ URL=https://dl.google.com/android/repository
|
|||||||
download_ndk() {
|
download_ndk() {
|
||||||
mkdir -p /android/ndk
|
mkdir -p /android/ndk
|
||||||
cd /android/ndk
|
cd /android/ndk
|
||||||
curl -O $URL/$1
|
curl -sO $URL/$1
|
||||||
unzip -q $1
|
unzip -q $1
|
||||||
rm $1
|
rm $1
|
||||||
mv android-ndk-* ndk
|
mv android-ndk-* ndk
|
||||||
|
@ -15,7 +15,7 @@ URL=https://dl.google.com/android/repository
|
|||||||
download_sdk() {
|
download_sdk() {
|
||||||
mkdir -p /android/sdk
|
mkdir -p /android/sdk
|
||||||
cd /android/sdk
|
cd /android/sdk
|
||||||
curl -O $URL/$1
|
curl -sO $URL/$1
|
||||||
unzip -q $1
|
unzip -q $1
|
||||||
rm -rf $1
|
rm -rf $1
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
url="http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2"
|
url="http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2"
|
||||||
curl $url | tar xjf -
|
curl -s $url | tar xjf -
|
||||||
cd crosstool-ng
|
cd crosstool-ng
|
||||||
./configure --prefix=/usr/local
|
./configure --prefix=/usr/local
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb
|
curl -sOL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb
|
||||||
dpkg -i dumb-init_*.deb
|
dpkg -i dumb-init_*.deb
|
||||||
rm dumb-init_*.deb
|
rm dumb-init_*.deb
|
||||||
|
@ -28,14 +28,14 @@ exit 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Download last known good emscripten from WebAssembly waterfall
|
# Download last known good emscripten from WebAssembly waterfall
|
||||||
BUILD=$(curl -L https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | \
|
BUILD=$(curl -sL https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | \
|
||||||
jq '.build | tonumber')
|
jq '.build | tonumber')
|
||||||
curl -L https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD/wasm-binaries.tbz2 | \
|
curl -sL https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD/wasm-binaries.tbz2 | \
|
||||||
hide_output tar xvkj
|
hide_output tar xvkj
|
||||||
|
|
||||||
# node 8 is required to run wasm
|
# node 8 is required to run wasm
|
||||||
cd /
|
cd /
|
||||||
curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
|
curl -sL https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
|
||||||
tar -xJ
|
tar -xJ
|
||||||
|
|
||||||
# Make emscripten use wasm-ready node and LLVM tools
|
# Make emscripten use wasm-ready node and LLVM tools
|
||||||
|
@ -28,7 +28,7 @@ exit 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
|
curl -sL https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
|
||||||
tar -xz
|
tar -xz
|
||||||
|
|
||||||
cd /emsdk-portable
|
cd /emsdk-portable
|
||||||
@ -49,5 +49,5 @@ chmod a+rxw -R /emsdk-portable
|
|||||||
|
|
||||||
# node 8 is required to run wasm
|
# node 8 is required to run wasm
|
||||||
cd /
|
cd /
|
||||||
curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
|
curl -sL https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
|
||||||
tar -xJ
|
tar -xJ
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf -
|
curl -s https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf -
|
||||||
cd make-3.81
|
cd make-3.81
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
curl -o /usr/local/bin/sccache \
|
curl -so /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl
|
||||||
|
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
Loading…
Reference in New Issue
Block a user