Split continuous workflow in three jobs.
Doing all steps sequentially is starting to get long. Several of those checks are unrelated and can be done in parallel.
This commit is contained in:
@@ -15,7 +15,7 @@ WORKDIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
TARGET="$WORKDIR/$(basename $1)"
|
||||
|
||||
TMP=$(mktemp)
|
||||
RESULT=$(cargo run --quiet -- fmt $TARGET 2>$TMP)
|
||||
RESULT=$(cargo run -r --quiet -- fmt $TARGET 2>$TMP)
|
||||
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "✅ $(basename $TARGET)"
|
||||
|
||||
@@ -16,12 +16,12 @@ TARGET="$WORKDIR/$(basename $1)"
|
||||
|
||||
TMP=$(mktemp)
|
||||
VALIDATORS=$(find $TARGET -type f -path "*validators/*.ak")
|
||||
cargo run --quiet -- check $TARGET 1>$TMP 2>/dev/null
|
||||
cargo run -r --quiet -- check $TARGET 1>$TMP 2>/dev/null
|
||||
if [ "$?" -eq "0" ]; then
|
||||
if [ -z "$VALIDATORS" ]; then
|
||||
echo "✅ $(basename $TARGET)"
|
||||
else
|
||||
cargo run --quiet -- build $TARGET 1>$TMP 2>/dev/null
|
||||
cargo run -r --quiet -- build $TARGET 1>$TMP 2>/dev/null
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "✅ $(basename $TARGET)"
|
||||
else
|
||||
|
||||
@@ -24,7 +24,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo run --quiet -- build
|
||||
cargo run -r --quiet -- build
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
@@ -39,4 +39,4 @@ cp ctx/$TITLE/inputs.cbor.template ctx/$TITLE/inputs.cbor
|
||||
sed "s/{{ VALIDATOR_HASH }}/$VALIDATOR_HASH/" ctx/$TITLE/outputs.cbor.template > ctx/$TITLE/outputs.cbor
|
||||
sed "s/{{ VALIDATOR }}/$VALIDATOR/" ctx/$TITLE/tx.cbor.template | sed "s/{{ VALIDATOR_HASH }}/$VALIDATOR_HASH/" > ctx/$TITLE/tx.cbor
|
||||
|
||||
cargo run --quiet -- tx simulate ctx/$TITLE/tx.cbor ctx/$TITLE/inputs.cbor ctx/$TITLE/outputs.cbor
|
||||
cargo run -r --quiet -- tx simulate ctx/$TITLE/tx.cbor ctx/$TITLE/inputs.cbor ctx/$TITLE/outputs.cbor
|
||||
|
||||
Reference in New Issue
Block a user