
























@@ -5,6 +5,8 @@ on:
55branches: [main]
66pull_request:
77types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
8+schedule:
9+ - cron: "17 3 * * *"
810workflow_dispatch:
9111012permissions:
@@ -24,6 +26,8 @@ jobs:
2426outputs:
2527docs_only: ${{ steps.manifest.outputs.docs_only }}
2628run_install_smoke: ${{ steps.manifest.outputs.run_install_smoke }}
29+run_fast_install_smoke: ${{ steps.manifest.outputs.run_fast_install_smoke }}
30+run_full_install_smoke: ${{ steps.manifest.outputs.run_full_install_smoke }}
2731steps:
2832 - name: Checkout
2933uses: actions/checkout@v6
@@ -34,7 +38,7 @@ jobs:
3438submodules: false
35393640 - name: Ensure preflight base commit
37-if: github.event_name != 'workflow_dispatch'
41+if: github.event_name != 'workflow_dispatch' && github.event_name != 'schedule'
3842uses: ./.github/actions/ensure-base-commit
3943with:
4044base-sha: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}
@@ -46,7 +50,7 @@ jobs:
46504751 - name: Detect changed smoke scope
4852id: changed_scope
49-if: github.event_name != 'workflow_dispatch' && steps.docs_scope.outputs.docs_only != 'true'
53+if: github.event_name != 'workflow_dispatch' && github.event_name != 'schedule' && steps.docs_scope.outputs.docs_only != 'true'
5054shell: bash
5155run: |
5256 set -euo pipefail
@@ -63,26 +67,125 @@ jobs:
6367id: manifest
6468env:
6569OPENCLAW_CI_DOCS_ONLY: ${{ steps.docs_scope.outputs.docs_only }}
66-OPENCLAW_CI_FORCE_INSTALL_SMOKE: ${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}
67-OPENCLAW_CI_RUN_CHANGED_SMOKE: ${{ steps.changed_scope.outputs.run_changed_smoke || 'false' }}
70+OPENCLAW_CI_FORCE_FULL_INSTALL_SMOKE: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || github.event_name == 'push') && 'true' || 'false' }}
71+OPENCLAW_CI_RUN_FAST_INSTALL_SMOKE: ${{ steps.changed_scope.outputs.run_fast_install_smoke || steps.changed_scope.outputs.run_changed_smoke || 'false' }}
72+OPENCLAW_CI_RUN_FULL_INSTALL_SMOKE: ${{ steps.changed_scope.outputs.run_full_install_smoke || 'false' }}
6873run: |
6974 docs_only="${OPENCLAW_CI_DOCS_ONLY:-false}"
70- force_install_smoke="${OPENCLAW_CI_FORCE_INSTALL_SMOKE:-false}"
71- run_changed_smoke="${OPENCLAW_CI_RUN_CHANGED_SMOKE:-false}"
75+ force_full_install_smoke="${OPENCLAW_CI_FORCE_FULL_INSTALL_SMOKE:-false}"
76+ run_changed_fast_install_smoke="${OPENCLAW_CI_RUN_FAST_INSTALL_SMOKE:-false}"
77+ run_changed_full_install_smoke="${OPENCLAW_CI_RUN_FULL_INSTALL_SMOKE:-false}"
78+ run_fast_install_smoke=false
79+ run_full_install_smoke=false
7280 run_install_smoke=false
73- if [ "$force_install_smoke" = "true" ]; then
81+ if [ "$force_full_install_smoke" = "true" ]; then
82+ run_fast_install_smoke=true
83+ run_full_install_smoke=true
7484 run_install_smoke=true
75- elif [ "$docs_only" != "true" ] && [ "$run_changed_smoke" = "true" ]; then
85+ elif [ "$docs_only" != "true" ] && [ "$run_changed_full_install_smoke" = "true" ]; then
86+ run_fast_install_smoke=true
87+ run_full_install_smoke=true
88+ run_install_smoke=true
89+ elif [ "$docs_only" != "true" ] && [ "$run_changed_fast_install_smoke" = "true" ]; then
90+ run_fast_install_smoke=true
7691 run_install_smoke=true
7792 fi
7893 {
7994 echo "docs_only=$docs_only"
8095 echo "run_install_smoke=$run_install_smoke"
96+ echo "run_fast_install_smoke=$run_fast_install_smoke"
97+ echo "run_full_install_smoke=$run_full_install_smoke"
8198 } >> "$GITHUB_OUTPUT"
8299100+ install-smoke-fast:
101+needs: [preflight]
102+if: needs.preflight.outputs.run_fast_install_smoke == 'true' && needs.preflight.outputs.run_full_install_smoke != 'true'
103+runs-on: blacksmith-16vcpu-ubuntu-2404
104+env:
105+DOCKER_BUILD_SUMMARY: "false"
106+DOCKER_BUILD_RECORD_UPLOAD: "false"
107+steps:
108+ - name: Checkout CLI
109+uses: actions/checkout@v6
110+111+ - name: Set up Blacksmith Docker Builder
112+uses: useblacksmith/setup-docker-builder@ac083cc84672d01c60d5e8561d0a939b697de542 # v1
113+114+# Blacksmith's builder owns the Docker layer cache; keep smoke builds off
115+# explicit gha cache directives so local tags still load cleanly.
116+ - name: Build root Dockerfile smoke image
117+uses: useblacksmith/build-push-action@cbd1f60d194a98cb3be5523b15134501eaf0fbf3 # v2
118+with:
119+context: .
120+file: ./Dockerfile
121+build-args: |
122+ OPENCLAW_DOCKER_APT_UPGRADE=0
123+ OPENCLAW_EXTENSIONS=matrix
124+ tags: |
125+ openclaw-dockerfile-smoke:local
126+ openclaw-ext-smoke:local
127+ load: true
128+push: false
129+provenance: false
130+131+ - name: Run root Dockerfile CLI smoke
132+run: |
133+ docker run --rm --entrypoint sh openclaw-dockerfile-smoke:local -lc 'which openclaw && openclaw --version'
134+135+ - name: Run Docker gateway network e2e
136+env:
137+OPENCLAW_GATEWAY_NETWORK_E2E_IMAGE: openclaw-dockerfile-smoke:local
138+OPENCLAW_GATEWAY_NETWORK_E2E_SKIP_BUILD: "1"
139+run: bash scripts/e2e/gateway-network-docker.sh
140+141+ - name: Smoke test Dockerfile with matrix extension build arg
142+run: |
143+ docker run --rm --entrypoint sh openclaw-ext-smoke:local -lc '
144+ which openclaw &&
145+ openclaw --version &&
146+ node -e "
147+ const Module = require(\"node:module\");
148+ const matrixPackage = require(\"/app/extensions/matrix/package.json\");
149+ const requireFromMatrix = Module.createRequire(\"/app/extensions/matrix/package.json\");
150+ const runtimeDeps = Object.keys(matrixPackage.dependencies ?? {});
151+ if (runtimeDeps.length === 0) {
152+ throw new Error(
153+ \"matrix package has no declared runtime dependencies; smoke cannot validate install mirroring\",
154+ );
155+ }
156+ for (const dep of runtimeDeps) {
157+ requireFromMatrix.resolve(dep);
158+ }
159+ const { spawnSync } = require(\"node:child_process\");
160+ const run = spawnSync(\"openclaw\", [\"plugins\", \"list\", \"--json\"], { encoding: \"utf8\" });
161+ if (run.status !== 0) {
162+ process.stderr.write(run.stderr || run.stdout || \"plugins list failed\\n\");
163+ process.exit(run.status ?? 1);
164+ }
165+ const parsed = JSON.parse(run.stdout);
166+ const matrix = (parsed.plugins || []).find((entry) => entry.id === \"matrix\");
167+ if (!matrix) {
168+ throw new Error(\"matrix plugin missing from bundled plugin list\");
169+ }
170+ const matrixDiag = (parsed.diagnostics || []).filter(
171+ (diag) =>
172+ typeof diag.source === \"string\" &&
173+ diag.source.includes(\"/extensions/matrix\") &&
174+ typeof diag.message === \"string\" &&
175+ diag.message.includes(\"extension entry escapes package directory\"),
176+ );
177+ if (matrixDiag.length > 0) {
178+ throw new Error(
179+ \"unexpected matrix diagnostics: \" +
180+ matrixDiag.map((diag) => diag.message).join(\"; \"),
181+ );
182+ }
183+ "
184+ '
185+83186 install-smoke:
84187needs: [preflight]
85-if: needs.preflight.outputs.run_install_smoke == 'true'
188+if: needs.preflight.outputs.run_full_install_smoke == 'true'
86189runs-on: blacksmith-16vcpu-ubuntu-2404
87190env:
88191DOCKER_BUILD_SUMMARY: "false"
@@ -224,7 +327,7 @@ jobs:
224327225328docker-e2e-fast:
226329needs: [preflight]
227-if: needs.preflight.outputs.run_install_smoke == 'true'
330+if: needs.preflight.outputs.run_fast_install_smoke == 'true' || needs.preflight.outputs.run_full_install_smoke == 'true'
228331runs-on: blacksmith-16vcpu-ubuntu-2404
229332timeout-minutes: 8
230333env:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。