Skip to content

Commit 622d6a9

Browse files
committed
Auto merge of #1230 - alexcrichton:more-fast, r=alexcrichton
Compile less executables in tests Refactor a bit with more aggressive caching to compile at most one Rust program when testing.
2 parents b39a87c + 707ca86 commit 622d6a9

File tree

17 files changed

+1031
-731
lines changed

17 files changed

+1031
-731
lines changed

.travis.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ sudo: required
22
dist: trusty
33
services:
44
- docker
5+
language: rust
56

67
matrix:
78
include:
@@ -118,33 +119,23 @@ branches:
118119
- stable
119120
- auto
120121

121-
notifications:
122-
webhooks: http://buildbot.rust-lang.org/homu/travis
123-
124122
install:
125-
- sudo pip install awscli
126-
- aws configure set preview.cloudfront true
127-
- curl https://static.rust-lang.org/rustup.sh |
128-
sh -s -- --prefix=$HOME/rust --spec=nightly-2017-04-25 --with-target=$TARGET
123+
- rustup target add $TARGET
129124

130125
script:
131-
- mkdir -p target/$TARGET
132-
- if [ ! -z "$DOCKER" ]; then
133-
sh ci/build-run-docker.sh "$DOCKER" "$TARGET" "$SKIP_TESTS";
126+
- mkdir -p target/$TARGET;
127+
- >
128+
if [[ "$TRAVIS_PULL_REQUEST" == "false" || "$ALLOW_PR" == "1" ]]; then
129+
if [ ! -z "$DOCKER" ]; then
130+
sh ci/build-run-docker.sh "$DOCKER" "$TARGET" "$SKIP_TESTS";
131+
else
132+
PATH=$HOME/rust/bin:$PATH sh ci/run.sh;
133+
fi
134134
else
135-
PATH=$HOME/rust/bin:$PATH sh ci/run.sh;
135+
echo 'skipping build';
136136
fi
137-
# Install kcov dependencies
138-
# FIXME: busted!
139-
#- if [ "$TARGET" == "x86_64-unknown-linux-gnu" ]; then
140-
# wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz;
141-
# tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make;
142-
# sudo make install && cd ../..;
143-
# echo "Uploading coverage... $TRAVIS_JOB_ID";
144-
# find target/debug/deps/*-* -executable -exec kcov --verify --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov '{}' \;;
145-
# find target/debug/*-* -executable ! -name rustup-rs -exec kcov --verify --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov '{}' \;;
146-
# fi
147-
# prepare for a deploy if this will be a deployment
137+
138+
before_deploy:
148139
- bash ci/prepare-deploy-travis.sh
149140

150141
deploy:
@@ -163,4 +154,6 @@ deploy:
163154

164155
# FIXME: I don't know if this really works
165156
after_deploy:
157+
- sudo pip install awscli
158+
- aws configure set preview.cloudfront true
166159
- aws cloudfront create-invalidation --paths "rustup/$TARGET/* rustup/dev/$TARGET/* rustup/www/* rustup/dev/www/* rustup/* rustup/dev/*"

0 commit comments

Comments
 (0)