Skip to content

Commit 0e6848e

Browse files
steipetevincentkoc
andauthored
perf(release): shorten full verification critical paths (#134746)
* perf(release): shorten full verification critical paths Share profile-specific repo E2E builds, balance package/update lanes, and route serial control jobs through the existing hybrid runner pool. Build sharing follows the approach explored in #127142. Co-authored-by: Vincent Koc <[email protected]> * test(release): align control job runner assertions * test(release): include control routing in candidate workflow coverage --------- Co-authored-by: Vincent Koc <[email protected]>
1 parent 13d17fb commit 0e6848e

18 files changed

Lines changed: 680 additions & 193 deletions

‎.github/workflows/full-release-candidate.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ env:
5757
jobs:
5858
discover:
5959
name: Find trusted release candidate
60-
runs-on: ubuntu-24.04
60+
runs-on: ${{ github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
6161
timeout-minutes: 10
6262
outputs:
6363
state: ${{ steps.discover.outputs.state }}
@@ -141,7 +141,7 @@ jobs:
141141
name: Resolve release candidate
142142
needs: [discover, prepare]
143143
if: always()
144-
runs-on: ubuntu-24.04
144+
runs-on: ${{ github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
145145
timeout-minutes: 5
146146
outputs:
147147
state: ${{ steps.result.outputs.state }}

‎.github/workflows/full-release-validation.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ env:
176176
jobs:
177177
resolve_target:
178178
name: Resolve target ref
179-
runs-on: ubuntu-24.04
179+
# Hosted admission delays compound along this serial release path.
180+
runs-on: ${{ github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
180181
timeout-minutes: 10
181182
outputs:
182183
sha: ${{ steps.resolve.outputs.sha }}
@@ -547,7 +548,7 @@ jobs:
547548
name: Check for reusable validation evidence
548549
needs: [resolve_target]
549550
if: inputs.rerun_group == 'all' && inputs.reuse_evidence && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-ci/'))
550-
runs-on: ubuntu-24.04
551+
runs-on: ${{ github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
551552
timeout-minutes: 10
552553
outputs:
553554
reuse: ${{ steps.find.outputs.reuse }}

‎.github/workflows/openclaw-live-and-e2e-checks-reusable.yml‎

Lines changed: 40 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ env:
562562

563563
jobs:
564564
validate_selected_ref:
565-
runs-on: ubuntu-24.04
565+
runs-on: ${{ !inputs.use_github_hosted_runners && github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
566566
timeout-minutes: 30
567567
outputs:
568568
package_artifact_present: ${{ steps.validate.outputs.package_artifact_present }}
@@ -1035,92 +1035,46 @@ jobs:
10351035
sleep $((attempt * 15))
10361036
done
10371037
1038-
validate_repo_e2e:
1039-
name: Repo E2E (${{ matrix.name }})
1038+
validate_repo_e2e_gateway:
1039+
name: Gateway E2E
10401040
needs: validate_selected_ref
10411041
if: inputs.include_repo_e2e && inputs.live_suite_filter == ''
1042-
continue-on-error: ${{ inputs.advisory }}
1043-
runs-on: ${{ inputs.use_github_hosted_runners && 'ubuntu-24.04' || 'blacksmith-32vcpu-ubuntu-2404' }}
1044-
timeout-minutes: 90
1045-
strategy:
1046-
fail-fast: false
1047-
max-parallel: 6
1048-
matrix:
1049-
include:
1050-
- name: Gateway 1/4
1051-
command: pnpm test:e2e:gateway --shard=1/4
1052-
- name: Gateway 2/4
1053-
command: pnpm test:e2e:gateway --shard=2/4
1054-
- name: Gateway 3/4
1055-
command: pnpm test:e2e:gateway --shard=3/4
1056-
- name: Gateway 4/4
1057-
command: pnpm test:e2e:gateway --shard=4/4
1058-
- name: UI 1/4
1059-
command: pnpm test:ui:e2e --shard=1/4
1060-
build_command: pnpm build:ci-artifacts
1061-
- name: UI 2/4
1062-
command: pnpm test:ui:e2e --shard=2/4
1063-
build_command: pnpm build:ci-artifacts
1064-
- name: UI 3/4
1065-
command: pnpm test:ui:e2e --shard=3/4
1066-
build_command: pnpm build:ci-artifacts
1067-
- name: UI 4/4
1068-
command: pnpm test:ui:e2e --shard=4/4
1069-
build_command: pnpm build:ci-artifacts
1070-
- name: Agent plugin Gateway
1071-
command: pnpm test:e2e:agent-plugin-gateway
1072-
target_script: test:e2e:agent-plugin-gateway
1073-
build_command: pnpm build:ci-artifacts
1074-
env:
1075-
OPENCLAW_BUILD_PRIVATE_QA: "1"
1076-
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
1077-
OPENCLAW_VITEST_MAX_WORKERS: "2"
1078-
steps:
1079-
- name: Checkout selected ref
1080-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1081-
with:
1082-
ref: ${{ needs.validate_selected_ref.outputs.selected_sha }}
1083-
fetch-depth: 1
1084-
1085-
- name: Setup Node environment
1086-
uses: ./.github/actions/setup-node-env
1087-
with:
1088-
cache-mode: restore
1089-
node-version: ${{ env.NODE_VERSION }}
1090-
install-bun: "true"
1091-
build-all-cache-scope: full
1092-
1093-
- name: Build dist for repo E2E
1094-
env:
1095-
NODE_OPTIONS: --max-old-space-size=8192
1096-
# Gateway shards pack and type-check packages; runtime-only suites keep SDK checks without global declarations.
1097-
run: ${{ matrix.build_command || 'pnpm build' }}
1098-
1099-
- name: Install Playwright Chromium
1100-
run: pnpm --dir ui exec playwright install --with-deps chromium
1101-
1102-
- name: Build sandbox image
1103-
run: scripts/sandbox-setup.sh
1104-
1105-
- name: Run repo E2E suite
1106-
env:
1107-
OPENCLAW_E2E_WORKERS: "2"
1108-
OPENCLAW_E2E_USE_PREBUILT_DIST: "1"
1109-
TARGET_REQUIRED_SCRIPT: ${{ matrix.target_script || '' }}
1110-
run: |
1111-
set -euo pipefail
1112-
if [[ -n "$TARGET_REQUIRED_SCRIPT" ]] && ! node -e '
1113-
const packageJson = JSON.parse(require("node:fs").readFileSync("package.json", "utf8"));
1114-
if (typeof packageJson.scripts?.[process.argv[1]] !== "string") process.exit(1);
1115-
' "$TARGET_REQUIRED_SCRIPT"; then
1116-
if [[ "$OPENCLAW_ALLOW_FROZEN_TARGET_SCENARIO_OMISSIONS" != "1" ]]; then
1117-
echo "::error::Selected target does not provide required repo E2E capability: $TARGET_REQUIRED_SCRIPT."
1118-
exit 1
1119-
fi
1120-
echo "::notice::Skipping $TARGET_REQUIRED_SCRIPT: selected target does not provide this newer repo E2E capability."
1121-
exit 0
1122-
fi
1123-
${{ matrix.command }}
1042+
uses: ./.github/workflows/openclaw-repo-e2e-reusable.yml
1043+
with:
1044+
ref: ${{ needs.validate_selected_ref.outputs.selected_sha }}
1045+
workflow_repository: ${{ needs.validate_selected_ref.outputs.workflow_repository }}
1046+
workflow_sha: ${{ needs.validate_selected_ref.outputs.workflow_sha }}
1047+
build_profile: full
1048+
suites: >-
1049+
[{"name":"Gateway 1/4","command":"pnpm test:e2e:gateway --shard=1/4"},
1050+
{"name":"Gateway 2/4","command":"pnpm test:e2e:gateway --shard=2/4"},
1051+
{"name":"Gateway 3/4","command":"pnpm test:e2e:gateway --shard=3/4"},
1052+
{"name":"Gateway 4/4","command":"pnpm test:e2e:gateway --shard=4/4"}]
1053+
use_github_hosted_runners: ${{ inputs.use_github_hosted_runners }}
1054+
advisory: ${{ inputs.advisory }}
1055+
allow_unreleased_changelog: ${{ inputs.allow_unreleased_changelog }}
1056+
allow_frozen_target_scenario_omissions: ${{ inputs.allow_frozen_target_scenario_omissions }}
1057+
1058+
validate_repo_e2e_runtime:
1059+
name: UI and plugin E2E
1060+
needs: validate_selected_ref
1061+
if: inputs.include_repo_e2e && inputs.live_suite_filter == ''
1062+
uses: ./.github/workflows/openclaw-repo-e2e-reusable.yml
1063+
with:
1064+
ref: ${{ needs.validate_selected_ref.outputs.selected_sha }}
1065+
workflow_repository: ${{ needs.validate_selected_ref.outputs.workflow_repository }}
1066+
workflow_sha: ${{ needs.validate_selected_ref.outputs.workflow_sha }}
1067+
build_profile: ciArtifacts
1068+
suites: >-
1069+
[{"name":"UI 1/4","command":"pnpm test:ui:e2e --shard=1/4"},
1070+
{"name":"UI 2/4","command":"pnpm test:ui:e2e --shard=2/4"},
1071+
{"name":"UI 3/4","command":"pnpm test:ui:e2e --shard=3/4"},
1072+
{"name":"UI 4/4","command":"pnpm test:ui:e2e --shard=4/4"},
1073+
{"name":"Agent plugin Gateway","command":"pnpm test:e2e:agent-plugin-gateway","target_script":"test:e2e:agent-plugin-gateway"}]
1074+
use_github_hosted_runners: ${{ inputs.use_github_hosted_runners }}
1075+
advisory: ${{ inputs.advisory }}
1076+
allow_unreleased_changelog: ${{ inputs.allow_unreleased_changelog }}
1077+
allow_frozen_target_scenario_omissions: ${{ inputs.allow_frozen_target_scenario_omissions }}
11241078

11251079
validate_special_e2e:
11261080
needs: validate_selected_ref
@@ -3027,7 +2981,7 @@ jobs:
30272981
name: Bind full release candidate evidence
30282982
needs: [validate_selected_ref, prepare_docker_e2e_image]
30292983
if: inputs.emit_candidate_evidence && needs.prepare_docker_e2e_image.result == 'success'
3030-
runs-on: ubuntu-24.04
2984+
runs-on: ${{ !inputs.use_github_hosted_runners && github.repository == 'openclaw/openclaw' && vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
30312985
timeout-minutes: 15
30322986
permissions:
30332987
actions: read
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: OpenClaw Repo E2E (Reusable)
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
required: true
8+
type: string
9+
workflow_repository:
10+
required: true
11+
type: string
12+
workflow_sha:
13+
required: true
14+
type: string
15+
build_profile:
16+
required: true
17+
type: string
18+
suites:
19+
required: true
20+
type: string
21+
use_github_hosted_runners:
22+
required: true
23+
type: boolean
24+
advisory:
25+
required: true
26+
type: boolean
27+
allow_unreleased_changelog:
28+
required: true
29+
type: boolean
30+
allow_frozen_target_scenario_omissions:
31+
required: true
32+
type: boolean
33+
34+
permissions:
35+
actions: read
36+
contents: read
37+
38+
env:
39+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
40+
OPENCLAW_BUILD_PRIVATE_QA: "1"
41+
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
42+
OPENCLAW_VITEST_MAX_WORKERS: "2"
43+
OPENCLAW_DOCKER_E2E_ALLOW_UNRELEASED_CHANGELOG: ${{ inputs.allow_unreleased_changelog }}
44+
OPENCLAW_ALLOW_FROZEN_TARGET_SCENARIO_OMISSIONS: ${{ inputs.allow_frozen_target_scenario_omissions && '1' || '0' }}
45+
OPENCLAW_UPGRADE_SURVIVOR_TARGET_ROOT: ${{ github.workspace }}
46+
47+
jobs:
48+
build:
49+
name: Build repo E2E (${{ inputs.build_profile }})
50+
continue-on-error: ${{ inputs.advisory }}
51+
runs-on: ${{ inputs.use_github_hosted_runners && 'ubuntu-24.04' || 'blacksmith-32vcpu-ubuntu-2404' }}
52+
timeout-minutes: 90
53+
outputs:
54+
artifact_id: ${{ steps.upload.outputs.artifact-id }}
55+
artifact_run_id: ${{ github.run_id }}
56+
steps:
57+
- &checkout_target
58+
name: Checkout selected ref
59+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60+
with:
61+
ref: ${{ inputs.ref }}
62+
fetch-depth: 1
63+
- &checkout_harness
64+
name: Checkout trusted artifact harness
65+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
66+
with:
67+
repository: ${{ inputs.workflow_repository }}
68+
ref: ${{ inputs.workflow_sha }}
69+
path: .release-harness
70+
fetch-depth: 1
71+
persist-credentials: false
72+
sparse-checkout: scripts
73+
- name: Setup Node environment
74+
uses: ./.github/actions/setup-node-env
75+
with:
76+
cache-mode: restore
77+
node-version: "24.19.0"
78+
install-bun: "true"
79+
build-all-cache-scope: full
80+
- name: Build dist for repo E2E
81+
env:
82+
BUILD_PROFILE: ${{ inputs.build_profile }}
83+
NODE_OPTIONS: --max-old-space-size=8192
84+
# Gateway package/type consumers retain full declarations; runtime consumers keep SDK checks.
85+
run: |
86+
set -euo pipefail
87+
case "$BUILD_PROFILE" in
88+
full) pnpm build ;;
89+
ciArtifacts) pnpm build:ci-artifacts ;;
90+
*) echo "Unsupported repo E2E build profile: $BUILD_PROFILE" >&2; exit 1 ;;
91+
esac
92+
- name: Pack repo E2E build
93+
env:
94+
BUILD_PROFILE: ${{ inputs.build_profile }}
95+
run: node .release-harness/scripts/repo-e2e-artifacts.mts pack "$RUNNER_TEMP/repo-e2e-build" "$BUILD_PROFILE"
96+
- name: Upload repo E2E build
97+
id: upload
98+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
99+
with:
100+
name: repo-e2e-${{ inputs.build_profile }}-${{ github.run_id }}-${{ github.run_attempt }}
101+
path: ${{ runner.temp }}/repo-e2e-build/
102+
compression-level: 0
103+
if-no-files-found: error
104+
retention-days: 7
105+
106+
test:
107+
name: Repo E2E (${{ matrix.name }})
108+
needs: build
109+
continue-on-error: ${{ inputs.advisory }}
110+
runs-on: ${{ inputs.use_github_hosted_runners && 'ubuntu-24.04' || 'blacksmith-32vcpu-ubuntu-2404' }}
111+
timeout-minutes: 90
112+
strategy:
113+
fail-fast: false
114+
max-parallel: 4
115+
matrix:
116+
include: ${{ fromJSON(inputs.suites) }}
117+
steps:
118+
- *checkout_target
119+
- *checkout_harness
120+
- name: Setup Node environment
121+
uses: ./.github/actions/setup-node-env
122+
with:
123+
cache-mode: restore
124+
node-version: "24.19.0"
125+
install-bun: "true"
126+
- name: Download repo E2E build
127+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
128+
with:
129+
artifact-ids: ${{ needs.build.outputs.artifact_id }}
130+
run-id: ${{ needs.build.outputs.artifact_run_id }}
131+
github-token: ${{ github.token }}
132+
path: ${{ runner.temp }}/repo-e2e-build/
133+
- name: Restore repo E2E build
134+
env:
135+
BUILD_PROFILE: ${{ inputs.build_profile }}
136+
run: node .release-harness/scripts/repo-e2e-artifacts.mts restore "$RUNNER_TEMP/repo-e2e-build" "$BUILD_PROFILE"
137+
- name: Install Playwright Chromium
138+
run: pnpm --dir ui exec playwright install --with-deps chromium
139+
- name: Build sandbox image
140+
run: scripts/sandbox-setup.sh
141+
- name: Run repo E2E suite
142+
env:
143+
OPENCLAW_E2E_WORKERS: "2"
144+
OPENCLAW_E2E_USE_PREBUILT_DIST: "1"
145+
TARGET_REQUIRED_SCRIPT: ${{ matrix.target_script || '' }}
146+
run: |
147+
set -euo pipefail
148+
if [[ -n "$TARGET_REQUIRED_SCRIPT" ]] && ! node -e '
149+
const packageJson = JSON.parse(require("node:fs").readFileSync("package.json", "utf8"));
150+
if (typeof packageJson.scripts?.[process.argv[1]] !== "string") process.exit(1);
151+
' "$TARGET_REQUIRED_SCRIPT"; then
152+
if [[ "$OPENCLAW_ALLOW_FROZEN_TARGET_SCENARIO_OMISSIONS" != "1" ]]; then
153+
echo "::error::Selected target does not provide required repo E2E capability: $TARGET_REQUIRED_SCRIPT."
154+
exit 1
155+
fi
156+
echo "::notice::Skipping $TARGET_REQUIRED_SCRIPT: selected target does not provide this newer repo E2E capability."
157+
exit 0
158+
fi
159+
${{ matrix.command }}

0 commit comments

Comments
 (0)