Skip to content

Commit

Permalink
feat(build) Added a pre-commit hook for commom source ~/.cargo/env an…
Browse files Browse the repository at this point in the history
…d set -ex commands
  • Loading branch information
chefsale committed Jul 28, 2021
1 parent daeaa51 commit cad60ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -eux
source ~/.cargo/env
11 changes: 0 additions & 11 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
steps:
- label: "cargo test"
command: |
source ~/.cargo/env
RUSTFLAGS='-D warnings' cargo test --locked --workspace
timeout: 60
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -54,7 +49,6 @@ steps:

- label: "backward compatible"
command: |
source ~/.cargo/env
cd pytest
pip3 install --user -r requirements.txt
pwd
Expand All @@ -68,7 +62,6 @@ steps:

- label: "upgradable"
command: |
source ~/.cargo/env
cd pytest
pip3 install --user -r requirements.txt
python3 tests/sanity/upgradable.py
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cad60ca

Please # to comment.