-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(buildkite): added initial core-contracts CI setup (#159)
* feat(buildkite): added initial core-contracts CI setup * Remove contracts that will surely fail CI tests * rustup default version to buidlkite pipeline and wasm32-unknown-unknown Co-authored-by: Olga Telezhnaya <olyatelezhnaya@gmail.com>
- Loading branch information
1 parent
07cc25a
commit 2ad85f3
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
steps: | ||
- label: "check artifacts" | ||
command: | | ||
source ~/.cargo/env | ||
rustup default 1.51.0 | ||
rustup target add wasm32-unknown-unknown | ||
./scripts/build_all.sh | ||
- label: "cargo test" | ||
command: | | ||
source ~/.cargo/env | ||
rustup default 1.51.0 | ||
rustup target add wasm32-unknown-unknown | ||
./scripts/test_all.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
lockup | ||
lockup-factory | ||
voting | ||
whitelist | ||
w-near |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
CHECK=0 | ||
|
||
# Loop through arguments and process them | ||
for arg in "$@" | ||
do | ||
case $arg in | ||
-c|--check) | ||
CHECK=1 | ||
shift | ||
;; | ||
esac | ||
done | ||
|
||
# Note: `staking-pool` has to be built before `staking-pool-factory` | ||
for p in lockup multisig staking-pool staking-pool-factory voting whitelist | ||
do | ||
(cd ${p} && ./build.sh) | ||
done | ||
|
||
if [ $CHECK == 1 ] && [ "$(git diff --exit-code)" != 0 ] ; then | ||
echo "Repository is dirty, please make sure you have committed all contract wasm files" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
# Note: `staking-pool` has to be built before `staking-pool-factory` | ||
while read -r contract | ||
do | ||
(cd ${contract} && RUSTFLAGS='-D warnings' cargo test) | ||
done < CONTRACTS |