-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb24ea0
commit f00013f
Showing
17 changed files
with
4,302 additions
and
2,238 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ test-ledger | |
dist | ||
.amman | ||
.crates | ||
.bin |
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
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
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
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 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
# go to parent folder | ||
cd $(dirname $(dirname $(dirname $SCRIPT_DIR))) | ||
WORKING_DIR=$(pwd) | ||
|
||
# command-line input | ||
ARGS=$* | ||
|
||
# js client tests folder | ||
cd ${WORKING_DIR}/clients/js | ||
|
||
pnpm install && pnpm build && pnpm test ${ARGS} |
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,35 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
OUTPUT="./programs/.bin" | ||
# go to parent folder | ||
cd $(dirname $(dirname $(dirname ${SCRIPT_DIR}))) | ||
|
||
if [ -z ${PROGRAMS+x} ]; then | ||
PROGRAMS="$(cat .github/.env | grep "PROGRAMS" | cut -d '=' -f 2)" | ||
fi | ||
|
||
# default to input from the command-line | ||
ARGS=$* | ||
|
||
# command-line arguments override env variable | ||
if [ ! -z "$ARGS" ]; then | ||
PROGRAMS="[\"${1}\"]" | ||
shift | ||
ARGS=$* | ||
fi | ||
|
||
PROGRAMS=$(echo ${PROGRAMS} | jq -c '.[]' | sed 's/"//g') | ||
|
||
# creates the output directory if it doesn't exist | ||
if [ ! -d ${OUTPUT} ]; then | ||
mkdir ${OUTPUT} | ||
fi | ||
|
||
WORKING_DIR=$(pwd) | ||
export SBF_OUT_DIR="${WORKING_DIR}/${OUTPUT}" | ||
|
||
for p in ${PROGRAMS[@]}; do | ||
cd ${WORKING_DIR}/programs/${p} | ||
cargo build-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} $ARGS | ||
done |
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,20 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
OUTPUT="./programs/.bin" | ||
# go to parent folder | ||
cd $(dirname $(dirname $(dirname ${SCRIPT_DIR}))) | ||
|
||
rm -rf $OUTPUT | ||
|
||
if [ -z ${PROGRAMS+x} ]; then | ||
PROGRAMS="$(cat .github/.env | grep "PROGRAMS" | cut -d '=' -f 2)" | ||
fi | ||
|
||
PROGRAMS=$(echo ${PROGRAMS} | jq -c '.[]' | sed 's/"//g') | ||
WORKING_DIR=$(pwd) | ||
|
||
for p in ${PROGRAMS[@]}; do | ||
cd ${WORKING_DIR}/programs/${p} | ||
rm -rf target | ||
done |
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,40 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
OUTPUT="./programs/.bin" | ||
# go to parent folder | ||
cd $(dirname $(dirname $(dirname $SCRIPT_DIR))) | ||
|
||
if [ ! -z "$PROGRAM" ]; then | ||
PROGRAMS='["'${PROGRAM}'"]' | ||
fi | ||
|
||
if [ -z "$PROGRAMS" ]; then | ||
PROGRAMS="$(cat .github/.env | grep "PROGRAMS" | cut -d '=' -f 2)" | ||
fi | ||
|
||
# default to input from the command-line | ||
ARGS=$* | ||
|
||
# command-line arguments override env variable | ||
if [ ! -z "$ARGS" ]; then | ||
PROGRAMS="[\"${1}\"]" | ||
shift | ||
ARGS=$* | ||
fi | ||
|
||
PROGRAMS=$(echo $PROGRAMS | jq -c '.[]' | sed 's/"//g') | ||
|
||
WORKING_DIR=$(pwd) | ||
SOLFMT="solfmt" | ||
export SBF_OUT_DIR="${WORKING_DIR}/${OUTPUT}" | ||
|
||
for p in ${PROGRAMS[@]}; do | ||
cd ${WORKING_DIR}/programs/${p} | ||
|
||
if [ ! "$(command -v $SOLFMT)" = "" ]; then | ||
CARGO_TERM_COLOR=always cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} 2>&1 | ${SOLFMT} | ||
else | ||
RUST_LOG=error cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} | ||
fi | ||
done |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 +1,24 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"programs:build": "./configs/scripts/program/build.sh", | ||
"programs:test": "RUST_LOG=error ./configs/scripts/program/test.sh", | ||
"programs:debug": "./configs/scripts/program/test.sh", | ||
"programs:clean": "./configs/scripts/program/clean.sh", | ||
"clients:js:test": "./configs/scripts/client/test-js.sh", | ||
"generate": "pnpm generate:idls && pnpm generate:clients", | ||
"generate:idls": "node ./configs/shank.cjs", | ||
"generate:clients": "node ./configs/kinobi.cjs", | ||
"validator": "pnpm validator:localnet", | ||
"validator:localnet": "CI=1 amman start --config ./configs/validator.cjs", | ||
"validator:devnet": "CI=1 amman start --config ./configs/validator.devnet.cjs", | ||
"validator:mainnet": "CI=1 amman start --config ./configs/validator.mainnet.cjs", | ||
"validator": "CI=1 amman start --config ./configs/validator.cjs", | ||
"validator:debug": "amman start --config ./configs/validator.cjs", | ||
"validator:logs": "CI=1 amman logs", | ||
"validator:stop": "amman stop" | ||
}, | ||
"devDependencies": { | ||
"@metaplex-foundation/kinobi": "^0.14.0", | ||
"@metaplex-foundation/kinobi": "^0.16.0", | ||
"@metaplex-foundation/shank-js": "^0.1.0", | ||
"@metaplex-foundation/amman": "^0.12.1", | ||
"typescript": "^4.9.4" | ||
}, | ||
"packageManager": "pnpm@8.2.0" | ||
} | ||
"packageManager": "pnpm@8.9.0" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.