]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Travis: merge before_cache from 29036 and 29962
authorteor <teor@torproject.org>
Mon, 1 Apr 2019 04:05:14 +0000 (14:05 +1000)
committerteor <teor@torproject.org>
Mon, 1 Apr 2019 04:08:34 +0000 (14:08 +1000)
And add some useful comments

.travis.yml

index 4b2a1ffd7a0ed867ce2729fc16e7ea93a40dc178..ed805aac31a8a849f7b621efc18f3efe46819476 100644 (file)
@@ -5,9 +5,10 @@ cache:
   ## cargo: true
   directories:
     - $HOME/.cargo
-
-before_cache:
-  - rm -rf $HOME/.cargo/registry
+    ## caching CARGO_TARGET_DIR actually slows down the build over time,
+    ## because old build products are never deleted.
+    ## where we point CARGO_TARGET_DIR in all our cargo invocations
+    #- $TRAVIS_BUILD_DIR/src/rust/target
 
 compiler:
   - gcc
@@ -217,6 +218,9 @@ after_failure:
 before_cache:
   ## Delete all gcov files.
   - if [[ "$COVERAGE_OPTIONS" != "" ]]; then make reset-gcov; fi
+  ## Delete the cargo registry before caching .cargo, because it's cheaper to
+  ## download the registry and throw it away, rather than caching it
+  - rm -rf $HOME/.cargo/registry
 
 notifications:
   irc: