Skip to content

Commit 75e0800

Browse files
author
Jorge Aparicio
committed
tweak CI
1 parent eec4c64 commit 75e0800

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,26 @@ matrix:
1414
env: TARGET=x86_64-unknown-linux-gnu
1515

1616
install:
17-
- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
18-
- source ~/.cargo/env
19-
- rustup component add rust-src
17+
# NOTE(TRAVIS_BRANCH) Travis is configured to only build *pushes* (not PRs).
18+
- if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
19+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION;
20+
source ~/.cargo/env;
21+
rustup component add rust-src;
22+
fi
2023

2124
script:
22-
- cargo generate-lockfile
23-
- sh ci/run-docker.sh $TARGET
24-
# Travis can't cache files that are not readable by "others"
25-
- chmod -R a+r $HOME/.cargo
25+
# NOTE(TRAVIS_BRANCH) See the NOTE in the `install` section
26+
# chmod: Travis can't cache files that are not readable by "others"
27+
- if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
28+
cargo generate-lockfile;
29+
sh ci/run-docker.sh $TARGET;
30+
chmod -R a+r $HOME/.cargo;
31+
fi
2632

2733
branches:
2834
only:
2935
- auto
36+
- master
3037
- try
3138

3239
notifications:

0 commit comments

Comments
 (0)