Skip to content

The agent that grows with you

ci(release): start the Windows bundle when both arches are built, not after their smokes

Tekniumfe45cf668456
diff --git a/.github/workflows/desktop-bundled-release.yml b/.github/workflows/desktop-bundled-release.yml
index 215de2dc44f..81f14ccc825 100644
--- a/.github/workflows/desktop-bundled-release.yml
+++ b/.github/workflows/desktop-bundled-release.yml
@@ -117,6 +117,10 @@ on:
description: 'Stable only: build no Microsoft Store bundle and submit none (the claim has no windows-store lane).'
type: boolean
default: false
+ windows-smokes-with-bundle:
+ description: 'Stable only: smoke the staged per-arch MSIX packages in the win32-bundle call, beside assembly, instead of after each per-arch build.'
+ type: boolean
+ default: false
outputs:
darwin-arm64-receipt-url:
value: ${{ jobs.stage-receipt-darwin-arm64.outputs.receipt-url }}
@@ -1423,12 +1427,18 @@ jobs:
public-root: ${{ needs.validate.outputs.public-root }}
disposable-run: ${{ needs.validate.outputs.disposable-run }}
+ # Stable passes windows-smokes-with-bundle: its per-arch calls only build, and
+ # the win32-bundle call smokes both staged MSIX beside assembly, so the bundle
+ # does not wait for a smoke after the slower arch's build.
smoke-win32-x64:
name: Smoke Windows x64 MSIX
needs: [validate, build-win32-x64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-win32-x64.result == 'success' && needs.validate.outputs.win32-x64 == 'true'
+ && ((inputs.windows-smokes-with-bundle != true
+ && needs.build-win32-x64.result == 'success' && needs.validate.outputs.win32-x64 == 'true')
+ || (inputs.windows-smokes-with-bundle == true && needs.validate.outputs.win32-bundle == 'true'
+ && (needs.validate.outputs.win32-x64 != 'true' || needs.build-win32-x64.result == 'success')))
&& (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
&& inputs.skip-tests != true
@@ -1457,7 +1467,10 @@ jobs:
needs: [validate, build-win32-arm64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-win32-arm64.result == 'success' && needs.validate.outputs.win32-arm64 == 'true'
+ && ((inputs.windows-smokes-with-bundle != true
+ && needs.build-win32-arm64.result == 'success' && needs.validate.outputs.win32-arm64 == 'true')
+ || (inputs.windows-smokes-with-bundle == true && needs.validate.outputs.win32-bundle == 'true'
+ && (needs.validate.outputs.win32-arm64 != 'true' || needs.build-win32-arm64.result == 'success')))
&& (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
&& inputs.skip-tests != true
@@ -2536,6 +2549,7 @@ jobs:
RELEASE_PHASE: ${{ inputs.release-phase }}
SKIP_TESTS: ${{ inputs.skip-tests }}
SKIP_SIGNED: ${{ inputs.skip-signed }}
+ WINDOWS_SMOKES_WITH_BUNDLE: ${{ inputs.windows-smokes-with-bundle }}
run: |
python - <<'PY'
import json, os
@@ -2546,7 +2560,8 @@ jobs:
selected = {group: outputs.get(group) == 'true' for group in JOB_GROUPS}
require_success(needs, phase_jobs(selected, os.environ['RELEASE_PHASE'],
skip_tests=os.environ['SKIP_TESTS'] == 'true',
- skip_signed=os.environ['SKIP_SIGNED'] == 'true'))
+ skip_signed=os.environ['SKIP_SIGNED'] == 'true',
+ windows_smokes_with_bundle=os.environ.get('WINDOWS_SMOKES_WITH_BUNDLE') == 'true'))
PY
publish-canary:
diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml
index 8ada2c10896..b30ca84da3b 100644
--- a/.github/workflows/stable-release.yml
+++ b/.github/workflows/stable-release.yml
@@ -216,6 +216,7 @@ jobs:
skip-tests: ${{ !fromJSON(needs.admit.outputs.lanes).smoke }}
skip-signed: ${{ !fromJSON(needs.admit.outputs.lanes).windows }}
skip-store: ${{ !fromJSON(needs.admit.outputs.lanes)['windows-store'] }}
+ windows-smokes-with-bundle: true
candidates-win32-x64:
name: Build signed release candidates (win32-x64)
@@ -239,6 +240,7 @@ jobs:
skip-tests: ${{ !fromJSON(needs.admit.outputs.lanes).smoke }}
skip-signed: ${{ !fromJSON(needs.admit.outputs.lanes).windows }}
skip-store: ${{ !fromJSON(needs.admit.outputs.lanes)['windows-store'] }}
+ windows-smokes-with-bundle: true
candidates-win32-bundle:
name: Build signed release candidates (win32-bundle)
@@ -264,6 +266,7 @@ jobs:
skip-tests: ${{ !fromJSON(needs.admit.outputs.lanes).smoke }}
skip-signed: ${{ !fromJSON(needs.admit.outputs.lanes).windows }}
skip-store: ${{ !fromJSON(needs.admit.outputs.lanes)['windows-store'] }}
+ windows-smokes-with-bundle: true
candidates-termux:
name: Build signed release candidates (termux)
diff --git a/scripts/releases/job_groups.py b/scripts/releases/job_groups.py
index a01865a682f..49c0f3abb4a 100644
--- a/scripts/releases/job_groups.py
+++ b/scripts/releases/job_groups.py
@@ -35,6 +35,9 @@ GROUP_SMOKES = {
}
# The per-arch groups whose smoke installs the signed MSIX.
SIGNED_WINDOWS_GROUPS = frozenset({"win32-arm64", "win32-x64"})
+# Stable splits the Windows groups across calls. Its bundle call runs both MSIX smokes from the
+# staged handoffs so assembly does not wait for them after each build.
+BUNDLE_WINDOWS_SMOKES = ("smoke-win32-arm64", "smoke-win32-x64")
def parse_jobs(raw: str | None) -> dict[str, bool]:
@@ -66,13 +69,15 @@ def selects_all(raw: str | None) -> bool:
def phase_jobs(selected: dict[str, bool], phase: str, *, skip_tests: bool = False,
- skip_signed: bool = False) -> list[str]:
+ skip_signed: bool = False, windows_smokes_with_bundle: bool = False) -> list[str]:
"""Jobs the stable phase result judges: an unselected group never fails it.
B4 moved candidate-manifest into stable-release.yml, so the desktop
workflow no longer owns it and the phase result never names it. A claim
that skipped tests runs no smoke, so the smokes are not judged. A claim without the signed
Windows packages smokes none of them (the Store bundle is not install-smoked).
+ With ``windows_smokes_with_bundle`` the MSIX smokes belong to the win32-bundle group, not
+ to the per-arch build groups.
"""
required = ["validate"]
if phase == "publish":
@@ -80,11 +85,17 @@ def phase_jobs(selected: dict[str, bool], phase: str, *, skip_tests: bool = Fals
return required + ["stable-publish"]
if phase != "candidate":
raise ValueError(f"Unknown release phase: {phase}")
+ smokes: dict[str, tuple[str, ...]] = dict(GROUP_SMOKES)
+ if windows_smokes_with_bundle:
+ for group in SIGNED_WINDOWS_GROUPS:
+ del smokes[group]
+ smokes["win32-bundle"] = BUNDLE_WINDOWS_SMOKES
for group, jobs in GROUP_JOBS.items():
if selected.get(group):
required.extend(jobs)
- if not skip_tests and not (skip_signed and group in SIGNED_WINDOWS_GROUPS):
- required.extend(GROUP_SMOKES.get(group, ()))
+ windows = group in SIGNED_WINDOWS_GROUPS or group == "win32-bundle"
+ if not skip_tests and not (skip_signed and windows):
+ required.extend(smokes.get(group, ()))
return required
diff --git a/scripts/releases/stable.py b/scripts/releases/stable.py
index 14a5b94c660..bea0c755d6e 100644
--- a/scripts/releases/stable.py
+++ b/scripts/releases/stable.py
@@ -787,12 +787,13 @@ def transitions(env: dict) -> None:
# The candidate manifest is written after the smokes (decision 23): the smoke
# results it records are the candidate calls' own workflow results — each
# call's stable-phase-result only succeeds when its selected groups' smokes
-# did, so a failed smoke leaves no accepted manifest behind.
-CALL_SMOKE_JOBS = {
- "candidates-darwin-arm64": "smoke-darwin-arm64",
- "candidates-darwin-x64": "smoke-darwin-x64",
- "candidates-win32-arm64": "smoke-win32-arm64",
- "candidates-win32-x64": "smoke-win32-x64",
+# did, so a failed smoke leaves no accepted manifest behind. The Windows MSIX
+# smokes run in the bundle call, beside assembly, not after each per-arch build.
+SMOKE_CALLS = {
+ "smoke-darwin-arm64": "candidates-darwin-arm64",
+ "smoke-darwin-x64": "candidates-darwin-x64",
+ "smoke-win32-arm64": "candidates-win32-bundle",
+ "smoke-win32-x64": "candidates-win32-bundle",
}
CANDIDATE_HANDOFFS = ("win32-x64", "win32-arm64", "darwin-x64", "darwin-arm64",
"termux", "windows-universal")
@@ -816,10 +817,10 @@ def candidate_manifest(env: dict) -> None:
runs = lane_set.jobs_to_run(lanes)
# A call whose package is not a target (the Store variant is not install-smoked) has no smoke.
built = lane_set.targets(lanes)
- calls = {call: job for call, job in CALL_SMOKE_JOBS.items() if runs[call] and SMOKE_TARGETS[job] in built}
- smoke = {job: {"result": "skipped"} for job in CALL_SMOKE_JOBS.values()}
+ calls = {job: call for job, call in SMOKE_CALLS.items() if runs[call] and SMOKE_TARGETS[job] in built}
+ smoke = {job: {"result": "skipped"} for job in SMOKE_CALLS}
if lane_set.runs_smokes(lanes):
- ran = {job: {"result": (needs.get(call) or {}).get("result")} for call, job in calls.items()}
+ ran = {job: {"result": (needs.get(call) or {}).get("result")} for job, call in calls.items()}
require_success(ran, list(ran))
smoke.update(ran)
# Every call the claim built, smoked or not (Termux has no smoke): a green call never stands in
diff --git a/tests/ci/test_stable_release_graph.py b/tests/ci/test_stable_release_graph.py
index 033a76c1121..80d190ed555 100644
--- a/tests/ci/test_stable_release_graph.py
+++ b/tests/ci/test_stable_release_graph.py
@@ -155,6 +155,8 @@ def test_lane_inputs_reach_the_workflows_they_configure():
for name in ("candidates-win32-arm64", "candidates-win32-x64", "candidates-win32-bundle"):
assert jobs[name]["with"]["skip-signed"] == "${{ !fromJSON(needs.admit.outputs.lanes).windows }}", name
assert jobs[name]["with"]["skip-store"] == store_off, name
+ # The MSIX smokes run in the bundle call, so the bundle never waits for them.
+ assert jobs[name]["with"]["windows-smokes-with-bundle"] == "true", name
assert jobs["publish-bundles"]["with"]["skip-store"] == store_off
desktop = workflow("desktop-bundled-release.yml")["jobs"]
assert "inputs.skip-store" in desktop["stable-store"]["if"]
diff --git a/tests/scripts/test_job_groups.py b/tests/scripts/test_job_groups.py
index f2aad5a2ab8..9949e6dd2d3 100644
--- a/tests/scripts/test_job_groups.py
+++ b/tests/scripts/test_job_groups.py
@@ -69,6 +69,22 @@ def test_phase_jobs_judge_only_the_selected_groups():
phase_jobs(every, "promote")
+def test_windows_smokes_with_bundle_move_the_msix_smokes_to_the_bundle_call():
+ """Stable's per-arch calls then only build, and its bundle call fails on either MSIX smoke."""
+ none = {group: False for group in JOB_GROUPS}
+ per_arch = phase_jobs({**none, "win32-x64": True}, "candidate", windows_smokes_with_bundle=True)
+ assert per_arch == ["validate", "build-win32-x64"]
+ bundle = {**none, "win32-bundle": True}
+ assert phase_jobs(bundle, "candidate", windows_smokes_with_bundle=True) == [
+ "validate", "assemble-win32-bundle", "smoke-win32-arm64", "smoke-win32-x64"]
+ # Without the signed lane, or with tests off, the bundle call smokes nothing.
+ for skip in ({"skip_signed": True}, {"skip_tests": True}):
+ assert phase_jobs(bundle, "candidate", windows_smokes_with_bundle=True, **skip) == [
+ "validate", "assemble-win32-bundle"], skip
+ # Callers that build everything in one call keep the smokes on the per-arch groups.
+ assert phase_jobs(bundle, "candidate") == ["validate", "assemble-win32-bundle"]
+
+
@pytest.mark.parametrize("jobs, expected", [(None, "true"), ("termux", "false"),
("darwin-arm64,darwin-x64", "false")])
def test_admission_emits_all_jobs_only_for_a_full_selection(monkeypatch, capsys, jobs, expected):
diff --git a/website/docs/developer-guide/stable-releases.md b/website/docs/developer-guide/stable-releases.md
index 4beb11eb8a1..5add96e6090 100644
--- a/website/docs/developer-guide/stable-releases.md
+++ b/website/docs/developer-guide/stable-releases.md
@@ -306,6 +306,10 @@ cannot delay a bundle; the price is that a broken `main` still pays for signed
candidates that `acceptance` then refuses.
The `smoke-win32-universal` job is gone; the per-arch MSIX smokes cover each
arch, and the Windows install arms install the `.msixbundle` on both arches.
+Stable runs those two MSIX smokes in its `win32-bundle` call, beside assembly,
+not in the per-arch calls: assembly starts as soon as both arches are built
+instead of waiting for the slower arch's smoke, and the bundle call (so
+`candidate-manifest`) still fails when either smoke fails.
## Tag namespaces and receipts