mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-17 19:53:05 +00:00
This merge brings the following updates from the dev branch: Pull Requests: - #10: chore: update main repo dependencies (@hansieodendaal) Update for main repo changes including removal of DA config-related code and executor node dependencies - #8: Add support to use framework without running scenario (@andrussal) Add ManualCluster for controlling nodes lifecycle and reorganize node-control logic - #7: Remove DA (@andrussal) Remove DA workload usage from framework following node changes - #6: feat: refactor for using external cucumber (@hansieodendaal) Removed all references to cucumber and prepared compose docker workspace for external repo root - #4: Individual nodes connect at runtime (@andrussal) Add option to connect to arbitrary peers when starting a node - #2: feat: add cucumber auto deployer (@hansieodendaal) Added example for selecting deployer based on environment variable - #1: chore: allow older curl versions as well (@hansieodendaal) Allow compatibility with older and newer curl versions Contributors: - @andrussal - @hansieodendaal
74 lines
2.4 KiB
Bash
Executable File
74 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
NOMOS_NODE_REV="${NOMOS_NODE_REV:?NOMOS_NODE_REV build arg missing}"
|
|
|
|
mkdir -p /workspace/artifacts
|
|
|
|
TARGET_ARCH="$(uname -m)"
|
|
|
|
have_prebuilt() {
|
|
[ -f testing-framework/assets/stack/bin/logos-blockchain-node ] && \
|
|
[ -f testing-framework/assets/stack/bin/logos-blockchain-cli ]
|
|
}
|
|
|
|
bin_matches_arch() {
|
|
local info
|
|
info="$(file -b testing-framework/assets/stack/bin/logos-blockchain-node 2>/dev/null || true)"
|
|
case "${info}" in
|
|
*ELF*) : ;;
|
|
*) return 1 ;;
|
|
esac
|
|
|
|
local pattern
|
|
case "${TARGET_ARCH}" in
|
|
x86_64) pattern="x86-64|x86_64" ;;
|
|
aarch64|arm64) pattern="arm64|aarch64" ;;
|
|
*) pattern="${TARGET_ARCH}" ;;
|
|
esac
|
|
|
|
echo "${info}" | grep -Eqi "${pattern}"
|
|
}
|
|
|
|
if have_prebuilt && bin_matches_arch; then
|
|
echo "Using prebuilt logos-blockchain binaries from testing-framework/assets/stack/bin"
|
|
cp testing-framework/assets/stack/bin/logos-blockchain-node /workspace/artifacts/logos-blockchain-node
|
|
cp testing-framework/assets/stack/bin/logos-blockchain-cli /workspace/artifacts/logos-blockchain-cli
|
|
exit 0
|
|
fi
|
|
|
|
if have_prebuilt; then
|
|
echo "Prebuilt logos-blockchain binaries do not match target architecture (${TARGET_ARCH}); rebuilding from source"
|
|
else
|
|
echo "Prebuilt logos-blockchain binaries missing; building from source"
|
|
fi
|
|
|
|
echo "Building logos-blockchain binaries from source (rev ${NOMOS_NODE_REV})"
|
|
git clone https://github.com/logos-co/nomos-node.git /tmp/nomos-node
|
|
cd /tmp/nomos-node
|
|
git fetch --depth 1 origin "${NOMOS_NODE_REV}"
|
|
git checkout "${NOMOS_NODE_REV}"
|
|
git reset --hard
|
|
git clean -fdx
|
|
|
|
# Enable real verification keys when available.
|
|
if [ -f "/opt/circuits/zksign/verification_key.json" ] \
|
|
|| [ -f "/opt/circuits/pol/verification_key.json" ] \
|
|
|| [ -f "/opt/circuits/poq/verification_key.json" ] \
|
|
|| [ -f "/opt/circuits/poc/verification_key.json" ]; then
|
|
export CARGO_FEATURE_BUILD_VERIFICATION_KEY=1
|
|
else
|
|
unset CARGO_FEATURE_BUILD_VERIFICATION_KEY
|
|
fi
|
|
|
|
# Enable pol-dev-mode via cfg to let POL_PROOF_DEV_MODE short-circuit proofs in tests.
|
|
RUSTFLAGS='--cfg feature="pol-dev-mode"' NOMOS_CIRCUITS=/opt/circuits \
|
|
LOGOS_BLOCKCHAIN_CIRCUITS=/opt/circuits \
|
|
cargo build --features "testing" \
|
|
-p logos-blockchain-node -p logos-blockchain-cli
|
|
|
|
cp /tmp/nomos-node/target/debug/logos-blockchain-node /workspace/artifacts/logos-blockchain-node
|
|
cp /tmp/nomos-node/target/debug/logos-blockchain-cli /workspace/artifacts/logos-blockchain-cli
|
|
|
|
rm -rf /tmp/nomos-node/target/debug/incremental
|