From bc7094fb5b64aa7c39706f73e82015d7b1d23036 Mon Sep 17 00:00:00 2001 From: andrussal Date: Tue, 9 Dec 2025 14:01:39 +0100 Subject: [PATCH] Fix Pages build output and compose circuits platform defaults --- .github/workflows/lint.yml | 14 +++++++------- scripts/run-examples.sh | 12 ++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 04db3d2..e01fd30 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -130,7 +130,7 @@ jobs: run: cargo +nightly-2025-09-14 install --git https://github.com/bnjbvr/cargo-machete --locked cargo-machete - run: cargo machete - local_smoke: + host_smoke: runs-on: ubuntu-latest env: VERSION: v0.3.1 @@ -223,7 +223,7 @@ jobs: NOMOS_LOG_DIR: "${{ runner.temp }}/local-logs" run: | scripts/run-examples.sh -t 60 -v 1 -e 1 host - - name: Collect local demo logs (on failure) + - name: Collect host demo logs (on failure) if: failure() run: | if [ -d "${NOMOS_LOG_DIR}" ]; then @@ -233,21 +233,21 @@ jobs: else echo "No local logs directory at ${NOMOS_LOG_DIR}" fi - - name: Upload local smoke logs + - name: Upload host smoke logs if: failure() id: upload-local-logs uses: actions/upload-artifact@v4 with: - name: local-smoke-logs + name: host-smoke-logs path: ${{ runner.temp }}/local-logs.tgz if-no-files-found: error - - name: Print local smoke logs download URL + - name: Print host smoke logs download URL if: failure() env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts" \ - --jq '.artifacts[] | select(.name=="local-smoke-logs") | "local-smoke-logs: \(.archive_download_url)"' || true + --jq '.artifacts[] | select(.name=="host-smoke-logs") | "host-smoke-logs: \(.archive_download_url)"' || true compose_smoke: runs-on: ubuntu-latest @@ -434,7 +434,7 @@ jobs: - name: Markdown lint run: npx -y markdownlint-cli2 "book/src/**/*.md" - name: Build book - run: mdbook build book + run: mdbook build book -d target/book - name: Add .nojekyll run: touch target/book/.nojekyll - name: Check links diff --git a/scripts/run-examples.sh b/scripts/run-examples.sh index 18a8728..ea984a7 100755 --- a/scripts/run-examples.sh +++ b/scripts/run-examples.sh @@ -320,6 +320,17 @@ if [ "$MODE" = "compose" ] || [ "$MODE" = "k8s" ]; then else KZG_PATH="${KZG_HOST_PATH}" fi + +# Ensure compose image pulls circuits for the host architecture by default. +if [ "$MODE" = "compose" ] && [ -z "${COMPOSE_CIRCUITS_PLATFORM:-}" ]; then + arch="$(uname -m)" + case "$arch" in + x86_64) COMPOSE_CIRCUITS_PLATFORM="linux-x86_64" ;; + arm64|aarch64) COMPOSE_CIRCUITS_PLATFORM="linux-aarch64" ;; + *) COMPOSE_CIRCUITS_PLATFORM="linux-x86_64" ;; + esac +fi + if [ -n "${DEMO_VALIDATORS}" ]; then export NOMOS_DEMO_VALIDATORS="${DEMO_VALIDATORS}" fi @@ -335,4 +346,5 @@ LOCAL_DEMO_RUN_SECS="${RUN_SECS}" \ K8S_DEMO_RUN_SECS="${RUN_SECS}" \ NOMOS_NODE_BIN="${NOMOS_NODE_BIN:-}" \ NOMOS_EXECUTOR_BIN="${NOMOS_EXECUTOR_BIN:-}" \ +COMPOSE_CIRCUITS_PLATFORM="${COMPOSE_CIRCUITS_PLATFORM:-}" \ cargo run -p runner-examples --bin "${BIN}"