]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
ci: Add Travis CI builds for testing cargo offline-mode.
authorIsis Lovecruft <isis@torproject.org>
Tue, 28 Nov 2017 22:47:25 +0000 (22:47 +0000)
committerIsis Lovecruft <isis@torproject.org>
Tue, 28 Nov 2017 23:02:07 +0000 (23:02 +0000)
.travis.yml

index 8cc210827ad373663e5920ab5e9c10dcb2917299..d3918875dd647ef51fe30855803e1b4bb0327ec8 100644 (file)
@@ -56,6 +56,7 @@ env:
     - MAKEFLAGS="-j 2"
   matrix:
     - RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
+    - RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
     - RUST_OPTIONS=""
 
 matrix:
@@ -87,6 +88,10 @@ install:
   - if [[ "$RUST_OPTIONS" != "" ]]; then which cargo; fi
   - if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi
   - if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi
+  ## If we're testing rust builds in offline-mode, then set up our vendored dependencies
+  - if [[ "$RUST_OPTIONS" == "--enable-rust" ]]; then git submodule init  ; fi
+  - if [[ "$RUST_OPTIONS" == "--enable-rust" ]]; then git submodule update; fi
+  - if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi
 
 script:
   - ./autogen.sh