Skip to content

Commit

Permalink
NDEV-2081: More useful CI logs (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreisilviudragnea authored and afalaleev committed Sep 18, 2023
1 parent 12abe5b commit 5ba148b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions evm_loader/deploy-evm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ -z "$EVM_LOADER" ]; then
exit 1
fi

echo "Deployed from " $(solana address) " with " $(solana balance)
echo "Deploying from " $(solana address) " with " $(solana balance)
if [ "$SKIP_EVM_DEPLOY" != "YES" ]; then
echo "Deploying evm_loader at address $EVM_LOADER..."
if ! solana program deploy --url $SOLANA_URL \
Expand All @@ -20,6 +20,7 @@ if [ "$SKIP_EVM_DEPLOY" != "YES" ]; then
echo "Failed to deploy evm_loader"
exit 1
fi
echo "Deployed evm_loader at address $EVM_LOADER..."
sleep 30
else
echo "Skip deploying of evm_loader"
Expand All @@ -28,4 +29,4 @@ fi
echo "Deployed finished from " $(solana address) " with " $(solana balance)
neon-cli --url $SOLANA_URL --evm_loader $EVM_LOADER \
--keypair evm_loader-keypair.json \
--loglevel warn init-environment --send-trx --keys-dir keys/
--loglevel warn init-environment --send-trx --keys-dir keys/
5 changes: 4 additions & 1 deletion evm_loader/wait-for-neon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ set -euo pipefail

if [ $# -eq 0 ]; then
if neon-cli --url $SOLANA_URL --evm_loader $EVM_LOADER --loglevel off init-environment > /dev/null; then
echo "Executed neon-cli init-environment successfully"
exit 0
fi
else
WAIT_TIME=$1
echo "Waiting $WAIT_TIME seconds for NeonEVM to be available at $SOLANA_URL:$EVM_LOADER"
for i in $(seq 1 $WAIT_TIME); do
echo "Try neon-cli init-environment count=$i"
if neon-cli --url $SOLANA_URL --evm_loader $EVM_LOADER --loglevel off init-environment > /dev/null; then
echo "Executed neon-cli init-environment successfully after count=$i"
exit 0
fi
sleep 1
done
fi

echo "unable to connect to NeonEVM at $SOLANA_URL:$EVM_LOADER"
exit 1
exit 1
8 changes: 5 additions & 3 deletions evm_loader/wait-for-solana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ else
WAIT_TIME=$1
echo "Waiting $WAIT_TIME seconds for solana cluster to be available at $SOLANA_URL"
for i in $(seq 1 $WAIT_TIME); do
if solana -u $SOLANA_URL cluster-version >/dev/null 2>&1; then exit 0; fi
echo "Try solana cluster-version count=$i"
if solana -u $SOLANA_URL cluster-version; then
echo "Executed solana cluster-version successfully after count=$i"
exit 0
fi
sleep 1
done
fi

echo "unable to connect to solana cluster $SOLANA_URL"
exit 1


0 comments on commit 5ba148b

Please sign in to comment.