From cad60ca12b1ddfe4e87024e4c8603b6ab578fa86 Mon Sep 17 00:00:00 2001 From: chefsale Date: Wed, 28 Jul 2021 18:04:22 +0100 Subject: [PATCH] feat(build) Added a pre-commit hook for commom source ~/.cargo/env and set -ex commands --- .buildkite/hooks/pre-command | 2 ++ .buildkite/pipeline.yml | 11 ----------- 2 files changed, 2 insertions(+), 11 deletions(-) create mode 100644 .buildkite/hooks/pre-command diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command new file mode 100644 index 00000000000..ca8403f1566 --- /dev/null +++ b/.buildkite/hooks/pre-command @@ -0,0 +1,2 @@ +set -eux +source ~/.cargo/env diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 022138251e3..a2b7b1718fe 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,6 @@ steps: - label: "cargo test" command: | - source ~/.cargo/env RUSTFLAGS='-D warnings' cargo test --locked --workspace timeout: 60 @@ -11,7 +10,6 @@ steps: - label: "cargo test nightly" command: | - source ~/.cargo/env RUSTFLAGS='-D warnings' cargo test --workspace --features nightly_protocol,nightly_protocol_features,protocol_feature_evm timeout: 60 @@ -21,8 +19,6 @@ steps: - label: "sanity checks" command: | - source ~/.cargo/env - set -ex rustc --version && cargo --version if [ -e deny.toml ]; then cargo-deny --all-features check bans @@ -41,7 +37,6 @@ steps: - label: "nearlib test" command: | - source ~/.cargo/env source ~/.nvm/nvm.sh source ~/.yarn/yarn.sh rustup default nightly-2020-05-15 @@ -54,7 +49,6 @@ steps: - label: "backward compatible" command: | - source ~/.cargo/env cd pytest pip3 install --user -r requirements.txt pwd @@ -68,7 +62,6 @@ steps: - label: "upgradable" command: | - source ~/.cargo/env cd pytest pip3 install --user -r requirements.txt python3 tests/sanity/upgradable.py @@ -79,7 +72,6 @@ steps: - label: "db migration" command: | - source ~/.cargo/env cd pytest pip3 install --user -r requirements.txt python3 tests/sanity/db_migration.py @@ -90,7 +82,6 @@ steps: - label: "runtime params estimate" command: | - source ~/.cargo/env cd runtime/runtime-params-estimator/test-contract rustup target add wasm32-unknown-unknown ./build.sh @@ -111,7 +102,6 @@ steps: # Disable rainbow bridge tests as they are temporary broken # - label: "rainbow-bridge test" # command: | - # source ~/.cargo/env # source ~/.nvm/nvm.sh # git clone https://github.com/near/rainbow-bridge @@ -130,7 +120,6 @@ steps: - label: "cargo check nearcore library (without Cargo.lock)" command: | - source ~/.cargo/env rm Cargo.lock cd nearcore RUSTFLAGS='-D warnings' cargo check