浏览代码

Merge branch 'cargo-build-sh-update' into giza_staging_readme

Mokhtar Naamani 3 年之前
父节点
当前提交
27e5fe2af8
共有 5 个文件被更改,包括 8 次插入10 次删除
  1. 2 2
      devops/git-hooks/pre-push
  2. 1 1
      scripts/cargo-build.sh
  3. 1 1
      scripts/cargo-tests-with-networking.sh
  4. 3 3
      scripts/run-dev-chain.sh
  5. 1 3
      setup.sh

+ 2 - 2
devops/git-hooks/pre-push

@@ -7,7 +7,7 @@ echo 'running clippy (rust linter)'
 # When custom build.rs triggers wasm-build-runner-impl to build we get error:
 # "Rust WASM toolchain not installed, please install it!"
 # So we skip building the WASM binary by setting BUILD_DUMMY_WASM_BINARY=1
-BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings
+BUILD_DUMMY_WASM_BINARY=1 cargo +nightly-2021-03-24 clippy --release --all -- -D warnings
 
 echo 'running cargo unit tests'
-cargo test --release --all
+cargo +nightly-2021-03-24 test --release --all

+ 1 - 1
scripts/cargo-build.sh

@@ -2,4 +2,4 @@
 
 export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
 
-cargo build --release
+cargo +nightly-2021-03-24 build --release

+ 1 - 1
scripts/cargo-tests-with-networking.sh

@@ -4,4 +4,4 @@ set -e
 export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
 
 echo 'running all cargo tests'
-cargo test --release --all -- --ignored
+cargo +nightly-2021-03-24 test --release --all -- --ignored

+ 3 - 3
scripts/run-dev-chain.sh

@@ -3,11 +3,11 @@
 export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
 
 # Build release binary
-cargo build --release
+cargo +nightly-2021-03-24 build --release
 
 # Purge existing local chain
-yes | cargo run --release -- purge-chain --dev
+yes | cargo +nightly-2021-03-24 run --release -- purge-chain --dev
 
 # Run local development chain -
 # No need to specify `-p joystream-node` it is the default bin crate in the cargo workspace
-cargo run --release -- --dev
+cargo +nightly-2021-03-24 run --release -- --dev

+ 1 - 3
setup.sh

@@ -15,7 +15,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
     fi
     # install additional packages
     brew update
-    brew install coreutils gnu-tar jq curl
+    brew install coreutils gnu-tar jq curl llvm || :
     echo "It is recommended to setup Docker desktop from: https://www.docker.com/products/docker-desktop"
     echo "It is also recommended to install qemu emulators with following command:"
     echo "docker run --privileged --rm tonistiigi/binfmt --install all"
@@ -30,8 +30,6 @@ source ~/.cargo/env
 rustup install nightly-2021-03-24
 rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-24
 
-rustup default nightly-2021-03-24
-
 rustup component add rustfmt clippy
 
 # Volta nodejs, npm, yarn tools manager