aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2018-08-09 15:41:57 +1000
committerteor <teor@torproject.org>2018-08-10 11:23:26 +1000
commit3b1c74baa5e1b42c3271b2c74a665da6c528b106 (patch)
tree596eadc55958062631a7cf874b99e7a6bdc2b962
parentc9ad16ca2a2aff63fc4814c843cd376c76e43095 (diff)
downloadtor-3b1c74baa5e1b42c3271b2c74a665da6c528b106.tar.gz
tor-3b1c74baa5e1b42c3271b2c74a665da6c528b106.zip
Travis: Use cargo cache
Closes ticket 26952.
-rw-r--r--.travis.yml7
-rw-r--r--changes/ticket26952-cargo3
2 files changed, 10 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 25c31c3d2f..8c2c9e3d61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,11 @@ language: c
cache:
ccache: true
+ ## cargo: true
+ directories:
+ - $HOME/.cargo
+ ## where we point CARGO_TARGET_DIR in all our cargo invocations
+ - $TRAVIS_BUILD_DIR/src/rust/target
compiler:
- gcc
@@ -116,6 +121,8 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
## We might be upgrading some useless packages, but that's better than missing an upgrade
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi
+ ## Create empty rust directories for non-Rust builds, so caching succeeds
+ - if [[ "$RUST_OPTIONS" == "" ]]; then mkdir -p $HOME/.cargo $TRAVIS_BUILD_DIR/src/rust/target; fi
install:
## If we're on OSX use brew to install ccache (ccache is automatically installed on Linux)
diff --git a/changes/ticket26952-cargo b/changes/ticket26952-cargo
new file mode 100644
index 0000000000..e1efdfcd74
--- /dev/null
+++ b/changes/ticket26952-cargo
@@ -0,0 +1,3 @@
+ o Minor features (continuous integration, rust):
+ - Use cargo cache in our Travis CI configuration.
+ Closes ticket 26952.