From 170496c1050947793612df6d4728e4ee5a84432c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 22 Apr 2026 19:52:07 +0100 Subject: [PATCH] ci: fold build smoke into artifact job --- .github/workflows/ci.yml | 108 +++++++++------------------------------ 1 file changed, 23 insertions(+), 85 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b250aaa0cd8..46c241798ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -536,6 +536,21 @@ jobs: include-hidden-files: true retention-days: 1 + - name: Smoke test CLI launcher help + run: node openclaw.mjs --help + + - name: Smoke test CLI launcher status json + run: node openclaw.mjs status --json --timeout 1 + + - name: Smoke test built bundled plugin singleton + run: pnpm test:build:singleton + + - name: Smoke test built bundled runtime deps + run: pnpm test:build:bundled-runtime-deps + + - name: Check CLI startup memory + run: pnpm test:startup:memory + checks-fast-core: permissions: contents: read @@ -1791,94 +1806,17 @@ jobs: name: "build-smoke" needs: [preflight, build-artifacts] if: ${{ !cancelled() && always() && needs.preflight.outputs.run_build_smoke == 'true' && (github.event_name != 'push' || needs.build-artifacts.result == 'success') }} - runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} - timeout-minutes: 20 + runs-on: ubuntu-24.04 + timeout-minutes: 5 steps: - - name: Checkout - shell: bash + - name: Verify build smoke env: - CHECKOUT_REPO: ${{ github.repository }} - CHECKOUT_SHA: ${{ github.sha }} - CHECKOUT_TOKEN: ${{ github.token }} + BUILD_ARTIFACTS_RESULT: ${{ needs.build-artifacts.result }} run: | - set -euo pipefail - - workdir="$GITHUB_WORKSPACE" - auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')" - - reset_checkout_dir() { - mkdir -p "$workdir" - find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} + - } - - checkout_attempt() { - local attempt="$1" - - reset_checkout_dir - git init "$workdir" >/dev/null - git config --global --add safe.directory "$workdir" - git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}" - git -C "$workdir" config gc.auto 0 - - timeout --signal=TERM 30s git -C "$workdir" \ - -c protocol.version=2 \ - -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \ - fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \ - "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1 - - git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1 - test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1 - echo "checkout attempt ${attempt}/2 succeeded" - } - - for attempt in 1 2; do - if checkout_attempt "$attempt"; then - exit 0 - fi - echo "checkout attempt ${attempt}/2 failed" - sleep $((attempt * 5)) - done - - echo "checkout failed after 2 attempts" >&2 - exit 1 - - - name: Setup Node environment - uses: ./.github/actions/setup-node-env - with: - install-bun: "false" - - - name: Restore dist cache - id: build-smoke-dist-cache - if: github.event_name == 'push' - uses: actions/cache@v5 - with: - path: dist/ - key: ${{ runner.os }}-dist-build-${{ github.sha }} - - - name: Verify dist cache - if: github.event_name == 'push' && steps.build-smoke-dist-cache.outputs.cache-hit != 'true' - run: | - echo "Missing same-run dist cache for ${RUNNER_OS}-dist-build-${GITHUB_SHA}" >&2 - exit 1 - - - name: Build dist - if: github.event_name != 'push' - run: pnpm build - - - name: Smoke test CLI launcher help - run: node openclaw.mjs --help - - - name: Smoke test CLI launcher status json - run: node openclaw.mjs status --json --timeout 1 - - - name: Smoke test built bundled plugin singleton - run: pnpm test:build:singleton - - - name: Smoke test built bundled runtime deps - run: pnpm test:build:bundled-runtime-deps - - - name: Check CLI startup memory - run: pnpm test:startup:memory + if [ "$BUILD_ARTIFACTS_RESULT" != "success" ]; then + echo "Build smoke checks failed in build-artifacts: $BUILD_ARTIFACTS_RESULT" >&2 + exit 1 + fi # Validate docs (format, lint, broken links) only when docs files changed. check-docs: