


























@@ -38,8 +38,6 @@ jobs:
3838run_skills_python: ${{ steps.manifest.outputs.run_skills_python }}
3939run_skills_python_job: ${{ steps.manifest.outputs.run_skills_python_job }}
4040run_windows: ${{ steps.manifest.outputs.run_windows }}
41-has_changed_extensions: ${{ steps.manifest.outputs.has_changed_extensions }}
42-changed_extensions_matrix: ${{ steps.manifest.outputs.changed_extensions_matrix }}
4341run_build_artifacts: ${{ steps.manifest.outputs.run_build_artifacts }}
4442run_checks_fast_core: ${{ steps.manifest.outputs.run_checks_fast_core }}
4543run_checks_fast: ${{ steps.manifest.outputs.run_checks_fast }}
@@ -52,8 +50,6 @@ jobs:
5250checks_node_core_nondist_matrix: ${{ steps.manifest.outputs.checks_node_core_nondist_matrix }}
5351run_checks_node_core_dist: ${{ steps.manifest.outputs.run_checks_node_core_dist }}
5452checks_node_core_dist_matrix: ${{ steps.manifest.outputs.checks_node_core_dist_matrix }}
55-run_extension_fast: ${{ steps.manifest.outputs.run_extension_fast }}
56-extension_fast_matrix: ${{ steps.manifest.outputs.extension_fast_matrix }}
5753run_check: ${{ steps.manifest.outputs.run_check }}
5854run_check_additional: ${{ steps.manifest.outputs.run_check_additional }}
5955run_build_smoke: ${{ steps.manifest.outputs.run_build_smoke }}
@@ -102,29 +98,6 @@ jobs:
1029810399 node scripts/ci-changed-scope.mjs --base "$BASE" --head HEAD
104100105- - name: Detect changed extensions
106-id: changed_extensions
107-if: github.event_name != 'workflow_dispatch' && steps.docs_scope.outputs.docs_only != 'true' && steps.changed_scope.outputs.run_node == 'true'
108-env:
109-BASE_SHA: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}
110-BASE_REF: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }}
111-run: |
112- node --input-type=module <<'EOF'
113- import { appendFileSync } from "node:fs";
114- import { listChangedExtensionIds } from "./scripts/lib/changed-extensions.mjs";
115-116- const extensionIds = listChangedExtensionIds({
117- base: process.env.BASE_SHA,
118- head: "HEAD",
119- fallbackBaseRef: process.env.BASE_REF,
120- unavailableBaseBehavior: "all",
121- });
122- const matrix = JSON.stringify({ include: extensionIds.map((extension) => ({ extension })) });
123-124- appendFileSync(process.env.GITHUB_OUTPUT, `has_changed_extensions=${extensionIds.length > 0}\n`, "utf8");
125- appendFileSync(process.env.GITHUB_OUTPUT, `changed_extensions_matrix=${matrix}\n`, "utf8");
126- EOF
127-128101 - name: Build CI manifest
129102id: manifest
130103env:
@@ -139,8 +112,6 @@ jobs:
139112OPENCLAW_CI_RUN_NODE_FAST_CI_ROUTING: ${{ github.event_name == 'workflow_dispatch' && 'false' || steps.changed_scope.outputs.run_node_fast_ci_routing || 'false' }}
140113OPENCLAW_CI_RUN_SKILLS_PYTHON: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.changed_scope.outputs.run_skills_python || 'false' }}
141114OPENCLAW_CI_RUN_CONTROL_UI_I18N: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.changed_scope.outputs.run_control_ui_i18n || 'false' }}
142-OPENCLAW_CI_HAS_CHANGED_EXTENSIONS: ${{ github.event_name == 'workflow_dispatch' && 'false' || steps.changed_extensions.outputs.has_changed_extensions || 'false' }}
143-OPENCLAW_CI_CHANGED_EXTENSIONS_MATRIX: ${{ github.event_name == 'workflow_dispatch' && '{"include":[]}' || steps.changed_extensions.outputs.changed_extensions_matrix || '{"include":[]}' }}
144115OPENCLAW_CI_REPOSITORY: ${{ github.repository }}
145116run: |
146117 node --input-type=module <<'EOF'
@@ -164,18 +135,8 @@ jobs:
164135 return fallback;
165136 };
166137167- const parseJson = (value, fallback) => {
168- try {
169- return value ? JSON.parse(value) : fallback;
170- } catch {
171- return fallback;
172- }
173- };
174-175138 const createMatrix = (include) => ({ include });
176139 const outputPath = process.env.GITHUB_OUTPUT;
177- const eventName = process.env.GITHUB_EVENT_NAME ?? "pull_request";
178- const isPush = eventName === "push";
179140 const isCanonicalRepository = process.env.OPENCLAW_CI_REPOSITORY === "openclaw/openclaw";
180141 const docsOnly = parseBoolean(process.env.OPENCLAW_CI_DOCS_ONLY);
181142 const docsChanged = parseBoolean(process.env.OPENCLAW_CI_DOCS_CHANGED);
@@ -200,11 +161,6 @@ jobs:
200161 const runSkillsPython = parseBoolean(process.env.OPENCLAW_CI_RUN_SKILLS_PYTHON) && !docsOnly;
201162 const runControlUiI18n =
202163 parseBoolean(process.env.OPENCLAW_CI_RUN_CONTROL_UI_I18N) && !docsOnly;
203- const hasChangedExtensions =
204- parseBoolean(process.env.OPENCLAW_CI_HAS_CHANGED_EXTENSIONS) && !docsOnly;
205- const changedExtensionsMatrix = hasChangedExtensions
206- ? parseJson(process.env.OPENCLAW_CI_CHANGED_EXTENSIONS_MATRIX, { include: [] })
207- : { include: [] };
208164 const extensionTestShardCount = isCanonicalRepository
209165 ? DEFAULT_EXTENSION_TEST_SHARD_COUNT
210166 : Math.max(DEFAULT_EXTENSION_TEST_SHARD_COUNT, 36);
@@ -274,8 +230,6 @@ jobs:
274230 run_android: runAndroid,
275231 run_skills_python: runSkillsPython,
276232 run_windows: runWindows,
277- has_changed_extensions: hasChangedExtensions,
278- changed_extensions_matrix: changedExtensionsMatrix,
279233 run_build_artifacts: runNodeFull,
280234 run_checks_fast_core: runChecksFastCore,
281235 run_checks_fast: runNodeFull,
@@ -296,15 +250,6 @@ jobs:
296250 checks_node_core_nondist_matrix: createMatrix(nodeTestNonDistShards),
297251 run_checks_node_core_dist: nodeTestDistShards.length > 0,
298252 checks_node_core_dist_matrix: createMatrix(nodeTestDistShards),
299- run_extension_fast: hasChangedExtensions && !isPush,
300- extension_fast_matrix: createMatrix(
301- hasChangedExtensions && !isPush
302- ? (changedExtensionsMatrix.include ?? []).map((entry) => ({
303- check_name: `extension-fast-${entry.extension}`,
304- extension: entry.extension,
305- }))
306- : [],
307- ),
308253 run_check: runNodeFull,
309254 run_check_additional: runNodeFull,
310255 run_build_smoke: runNodeFull,
@@ -1326,84 +1271,6 @@ jobs:
13261271 exit 1
13271272 fi
132812731329- extension-fast:
1330-permissions:
1331-contents: read
1332-name: "extension-fast"
1333-needs: [preflight]
1334-if: needs.preflight.outputs.run_extension_fast == 'true'
1335-runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
1336-timeout-minutes: 60
1337-strategy:
1338-fail-fast: false
1339-matrix: ${{ fromJson(needs.preflight.outputs.extension_fast_matrix) }}
1340-steps:
1341- - name: Checkout
1342-shell: bash
1343-env:
1344-CHECKOUT_REPO: ${{ github.repository }}
1345-CHECKOUT_SHA: ${{ github.sha }}
1346-CHECKOUT_TOKEN: ${{ github.token }}
1347-run: |
1348- set -euo pipefail
1349-1350- workdir="$GITHUB_WORKSPACE"
1351- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1352-1353- reset_checkout_dir() {
1354- mkdir -p "$workdir"
1355- find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
1356- }
1357-1358- checkout_attempt() {
1359- local attempt="$1"
1360-1361- reset_checkout_dir
1362- git init "$workdir" >/dev/null
1363- git config --global --add safe.directory "$workdir"
1364- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1365- git -C "$workdir" config gc.auto 0
1366-1367- timeout --signal=TERM 30s git -C "$workdir" \
1368- -c protocol.version=2 \
1369- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
1370- fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
1371- "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
1372-1373- git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1
1374- test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1
1375- echo "checkout attempt ${attempt}/5 succeeded"
1376- }
1377-1378- for attempt in 1 2 3 4 5; do
1379- if checkout_attempt "$attempt"; then
1380- exit 0
1381- fi
1382- echo "checkout attempt ${attempt}/5 failed"
1383- sleep $((attempt * 5))
1384- done
1385-1386- echo "checkout failed after 5 attempts" >&2
1387- exit 1
1388-1389- - name: Setup Node environment
1390-uses: ./.github/actions/setup-node-env
1391-with:
1392-install-bun: "false"
1393-1394- - name: Run changed extension tests
1395-env:
1396-OPENCLAW_CHANGED_EXTENSION: ${{ matrix.extension }}
1397-run: |
1398- set -euo pipefail
1399- if [ "$OPENCLAW_CHANGED_EXTENSION" = "telegram" ]; then
1400- export OPENCLAW_VITEST_MAX_WORKERS=1
1401- export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--max-old-space-size=6144"
1402- pnpm test:extension "$OPENCLAW_CHANGED_EXTENSION" -- --pool=forks
1403- exit 0
1404- fi
1405- pnpm test:extension "$OPENCLAW_CHANGED_EXTENSION"
1406-14071274 # Types, lint, and format check shards.
14081275check-shard:
14091276permissions:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。