Forráskód Böngészése

travis: cache enabled

Mokhtar Naamani 4 éve
szülő
commit
80749a70cc
2 módosított fájl, 13 hozzáadás és 8 törlés
  1. 10 7
      .travis.yml
  2. 3 1
      package.json

+ 10 - 7
.travis.yml

@@ -4,20 +4,23 @@ language: rust
 # See: https://github.com/Joystream/joystream/issues/466
 # Always starting with a clean slate is probably better, it allows us to ensure
 # the WASM runtime is always rebuilt. It also allows us to detect when certain upstream dependencies
-# sometimes break the build.
-# cache: cargo
+# sometimes break the build. When cache is enabled do not use the produced WASM build.
+# This also means the binary should not be used to produce the final chainspec file (because the same
+# one is embedded in the binary)
+cache: cargo
 
 rust:
+  # living on the edge..
   - nightly
 
 matrix:
   include:
     - os: linux
       env: TARGET=x86_64-unknown-linux-gnu
-  # Removed all other plaftorm builds sice the repo as growing in terms of activitly
-  # and CI checks are taking long to start due to concurrent no. of jobs
-  # one job should be sufficient for doing all manners of checks and unit nets, will defer
-  # building all platform binanires and wasm blob to a different system
+  # Removed all other plaftorm builds sice the repo is growing in terms of activitly
+  # and CI checks are taking long to start due to concurrent number of jobs
+  # one job should be sufficient for doing all manners of checks and unit nets. Will defer
+  # building all platform binanires and wasm blob to a different system.
 
 install:
   - rustup target add wasm32-unknown-unknown --toolchain nightly
@@ -39,7 +42,7 @@ script:
   - WASM_BUILD_TOOLCHAIN=nightly cargo +nightly build --release --target=${TARGET}
 
 before_deploy:
-  - cp ./target/${TARGET}/release/joystream-node .
+
   - FILENAME=`./joystream-node --version | sed -e "s/ /-/g"`
   - tar -cf ${FILENAME}.tar ./joystream-node
   - gzip ${FILENAME}.tar

+ 3 - 1
package.json

@@ -4,7 +4,9 @@
 	"license": "GPL-3.0-only",
 	"scripts": {
 		"test": "yarn && yarn workspaces run test",
-		"test-migration": "yarn && yarn workspaces run test-migration"
+		"test-migration": "yarn && yarn workspaces run test-migration",
+		"cargo-checks": "devops/git-hooks/pre-commit && devops/git-hooks/pre-push",
+		"cargo-build": "yarn cargo-checks && scripts/cargo-build.sh"
 	},
 	"workspaces": [
 		"tests/network-tests"