diff options
-rw-r--r-- | .travis.yml | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index f0f52e5..3d9953d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,19 +14,26 @@ matrix: env: TARGET=x86_64-unknown-linux-gnu install: - - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION - - source ~/.cargo/env - - rustup component add rust-src + # NOTE(TRAVIS_BRANCH) Travis is configured to only build *pushes* (not PRs). + - if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION; + source ~/.cargo/env; + rustup component add rust-src; + fi script: - - cargo generate-lockfile - - sh ci/run-docker.sh $TARGET - # Travis can't cache files that are not readable by "others" - - chmod -R a+r $HOME/.cargo + # NOTE(TRAVIS_BRANCH) See the NOTE in the `install` section + # chmod: Travis can't cache files that are not readable by "others" + - if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then + cargo generate-lockfile; + sh ci/run-docker.sh $TARGET; + chmod -R a+r $HOME/.cargo; + fi branches: only: - auto + - master - try notifications: |