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:
KtorZ
2024-07-16 17:41:14 +02:00
parent 0145237bbe
commit fe7d744946
4 changed files with 20 additions and 16 deletions

View File

@@ -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)"

View File

@@ -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

View File

@@ -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