From 8ce4689bace3a00c92d5a197a3c7ac108c031b15 Mon Sep 17 00:00:00 2001 From: andrussal Date: Tue, 9 Dec 2025 13:20:19 +0100 Subject: [PATCH] Isolate host/linux bundle builds to separate circuit dirs --- scripts/build-bundle.sh | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/scripts/build-bundle.sh b/scripts/build-bundle.sh index 8bd3373..9d5cef4 100755 --- a/scripts/build-bundle.sh +++ b/scripts/build-bundle.sh @@ -78,42 +78,49 @@ if [ "$PLATFORM" = "linux" ] && [ "$(uname -s)" != "Linux" ] && [ -z "${BUNDLE_I fi echo "==> Preparing circuits (version ${VERSION})" -HOST_BUNDLE_PATH="${ROOT_DIR}/testing-framework/assets/stack/kzgrs_test_params" +if [ "$PLATFORM" = "host" ]; then + CIRCUITS_DIR="${ROOT_DIR}/.tmp/nomos-circuits-host" + NODE_SRC="${ROOT_DIR}/.tmp/nomos-node-host-src" + NODE_TARGET="${ROOT_DIR}/.tmp/nomos-node-host-target" +else + CIRCUITS_DIR="${ROOT_DIR}/.tmp/nomos-circuits-linux" + NODE_SRC="${ROOT_DIR}/.tmp/nomos-node-linux-src" + NODE_TARGET="${ROOT_DIR}/.tmp/nomos-node-linux-target" +fi +export NOMOS_CIRCUITS="${CIRCUITS_DIR}" mkdir -p "${ROOT_DIR}/.tmp" "${ROOT_DIR}/scripts/setup-circuits-stack.sh" "${VERSION}" Building host binaries (platform=${PLATFORM})" -mkdir -p "${HOST_SRC}" -if [ ! -d "${HOST_SRC}/.git" ]; then - git clone https://github.com/logos-co/nomos-node.git "${HOST_SRC}" +mkdir -p "${NODE_SRC}" +if [ ! -d "${NODE_SRC}/.git" ]; then + git clone https://github.com/logos-co/nomos-node.git "${NODE_SRC}" fi ( - cd "${HOST_SRC}" + cd "${NODE_SRC}" git fetch --depth 1 origin "${NOMOS_NODE_REV}" git checkout "${NOMOS_NODE_REV}" git reset --hard git clean -fdx - RUSTFLAGS='--cfg feature="pol-dev-mode"' NOMOS_CIRCUITS="${HOST_BUNDLE_PATH}" \ + RUSTFLAGS='--cfg feature="pol-dev-mode"' NOMOS_CIRCUITS="${CIRCUITS_DIR}" \ cargo build --features testing \ -p nomos-node -p nomos-executor -p nomos-cli \ - --target-dir "${HOST_TARGET}" + --target-dir "${NODE_TARGET}" ) echo "==> Packaging bundle" bundle_dir="${ROOT_DIR}/.tmp/nomos-bundle" rm -rf "${bundle_dir}" mkdir -p "${bundle_dir}/artifacts/circuits" -cp -a "${HOST_BUNDLE_PATH}/." "${bundle_dir}/artifacts/circuits/" +cp -a "${CIRCUITS_DIR}/." "${bundle_dir}/artifacts/circuits/" mkdir -p "${bundle_dir}/artifacts" -cp "${HOST_NODE_BIN}" "${bundle_dir}/artifacts/" -cp "${HOST_EXEC_BIN}" "${bundle_dir}/artifacts/" -cp "${HOST_CLI_BIN}" "${bundle_dir}/artifacts/" +cp "${NODE_BIN}" "${bundle_dir}/artifacts/" +cp "${EXEC_BIN}" "${bundle_dir}/artifacts/" +cp "${CLI_BIN}" "${bundle_dir}/artifacts/" mkdir -p "$(dirname "${OUTPUT}")" if tar --help 2>/dev/null | grep -q -- '--no-mac-metadata'; then