Skip to content

The agent that grows with you

feat(release): select desktop build jobs per arch with one jobs input

ethernet04ee0d7166ed
diff --git a/.github/workflows/desktop-bundled-release.yml b/.github/workflows/desktop-bundled-release.yml
index 120b090cb7e..df91661f980 100644
--- a/.github/workflows/desktop-bundled-release.yml
+++ b/.github/workflows/desktop-bundled-release.yml
@@ -16,7 +16,7 @@ name: Desktop Bundled Release
# build-linux → DISABLED for now (dummy skips)
# assemble-win32-bundle → native universal bundles
# (needs build-win32): all downloadable builds stage without touching feeds.
-# smoke-darwin / smoke-win32 / smoke-win32-universal → native install + chat
+# smoke-darwin / smoke-win32 (per arch) → native install + chat
# publish-win32-updater → tested canary bytes + feed
# (needs BOTH Windows smoke matrices); stable promotion is sequenced by
# the stable publication controller after GitHub publication.
@@ -93,6 +93,10 @@ on:
manifest-sha256:
default: ''
type: string
+ jobs:
+ description: 'Comma-separated job groups. Default: every group.'
+ type: string
+ default: 'darwin-arm64,darwin-x64,win32-arm64,win32-x64,win32-bundle,linux-x64,linux-arm64,termux'
outputs:
manifest-url:
value: ${{ jobs.candidate-manifest.outputs.manifest-url }}
@@ -134,11 +138,11 @@ on:
required: false
type: string
default: '{}'
- termux_only:
- description: 'Build and publish only the Termux package'
+ jobs:
+ description: 'Comma-separated job groups. Default: every group.'
required: false
- type: boolean
- default: false
+ type: string
+ default: 'darwin-arm64,darwin-x64,win32-arm64,win32-x64,win32-bundle,linux-x64,linux-arm64,termux'
termux_upgrade_from_tag:
description: 'Published release tag whose R2 Termux package must upgrade to this build'
required: false
@@ -159,7 +163,7 @@ permissions:
concurrency:
# One dispatch: a disposable run's identity is its channel name, so a
# re-dispatch of the same channel serializes instead of racing the namespace.
- group: desktop-bundled-release-${{ inputs.channel || inputs.disposable_channel || inputs.tag || inputs.build_commit || 'canary' }}-${{ inputs.release-phase || 'canary' }}
+ group: desktop-bundled-release-${{ inputs.channel || inputs.disposable_channel || inputs.tag || inputs.build_commit || 'canary' }}-${{ inputs.release-phase || 'canary' }}-${{ inputs.jobs }}
cancel-in-progress: false
env:
@@ -200,6 +204,15 @@ jobs:
# The archive ref: the attempt ref for stable phases, the payload tag
# for canary and commit builds. Every releases/tag/<ref>/ write reads it.
archive-tag: ${{ steps.admission.outputs.archive-tag }}
+ # One admission-parsed switch per job group; every job gates on its own.
+ darwin-arm64: ${{ steps.admission.outputs.darwin-arm64 }}
+ darwin-x64: ${{ steps.admission.outputs.darwin-x64 }}
+ win32-arm64: ${{ steps.admission.outputs.win32-arm64 }}
+ win32-x64: ${{ steps.admission.outputs.win32-x64 }}
+ win32-bundle: ${{ steps.admission.outputs.win32-bundle }}
+ linux-x64: ${{ steps.admission.outputs.linux-x64 }}
+ linux-arm64: ${{ steps.admission.outputs.linux-arm64 }}
+ termux: ${{ steps.admission.outputs.termux }}
channel-build: ${{ ((inputs.disposable_channel != '' || inputs.channel != '') && steps.allocate.outputs.channel_build) || '' }}
channel-request-sha256: ${{ ((inputs.disposable_channel != '' || inputs.channel != '') && steps.allocate.outputs.channel_request_sha256) || '' }}
disposable-run: ${{ (inputs.disposable_channel != '' && github.run_id) || inputs.disposable_run || '' }}
@@ -244,7 +257,7 @@ jobs:
BUILD_COMMIT: ${{ inputs.build_commit }}
TAG: ${{ inputs.tag }}
RELEASE_PHASE: ${{ inputs.release-phase }}
- TERMUX_ONLY: ${{ inputs.termux_only }}
+ JOBS: ${{ inputs.jobs }}
TERMUX_UPGRADE_FROM_TAG: ${{ inputs.termux_upgrade_from_tag }}
UPLOAD_RELEASE: ${{ inputs.upload_release }}
BUNDLE_ENV_JSON: ${{ inputs.bundle_env }}
@@ -268,7 +281,7 @@ jobs:
CHANNEL_BUILD: ${{ steps.allocate.outputs.channel_build || '' }}
CHANNEL_REQUEST_SHA256: ${{ steps.allocate.outputs.channel_request_sha256 || '' }}
CLOUDFLARE_R2_PUBLIC_URL: ${{ vars.CLOUDFLARE_R2_PUBLIC_URL }}
- TERMUX_ONLY: ${{ inputs.termux_only }}
+ JOBS: ${{ inputs.jobs }}
BUNDLE_ENV_JSON: ${{ inputs.bundle_env }}
RELEASE_PHASE: ${{ inputs.release-phase }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
@@ -279,6 +292,8 @@ jobs:
if [ -n "${R2_DISPOSABLE_RUN:-}" ] && [ -z "${CHANNEL_BUILD:-}" ]; then
echo '::error::disposable_run requires a pinned channel build'; exit 1
fi
+ # The one parser for the `jobs` input; every job gates on these outputs.
+ python -m scripts.releases.job_groups >> "$GITHUB_OUTPUT"
printf 'public-root=%s\npublic-base=%s\n' "$CLOUDFLARE_R2_PUBLIC_URL" "$CLOUDFLARE_R2_PUBLIC_URL" >> "$GITHUB_OUTPUT"
printf 'archive-tag=%s\n' "${RELEASE_CLAIM_TAG:-$RELEASE_TAG}" >> "$GITHUB_OUTPUT"
if [ -n "${CHANNEL_BUILD:-}" ]; then
@@ -374,9 +389,12 @@ jobs:
#
# Cache permissions are literal job-token scopes, not checkout/save-step policy.
# Share execution via anchors, and keep the original IDs as downstream gates.
- build-win32-release:
- name: bundled ${{ matrix.target.label }}
- if: inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate') && inputs.build_commit == '' && inputs.channel == ''
+ build-win32-x64-release:
+ name: bundled win32-x64
+ if: >-
+ needs.validate.outputs.win32-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && inputs.build_commit == '' && inputs.channel == ''
needs: [validate]
runs-on: ${{ matrix.target.runner }}
environment: release-signing
@@ -388,8 +406,6 @@ jobs:
target:
- label: win32-x64
runner: windows-2025
- - label: win32-arm64
- runner: windows-11-arm
env: &win32-env
CHANNEL_BUILD: ${{ needs.validate.outputs.channel-build }}
HERMES_DESKTOP_VARIANT: bundled
@@ -670,11 +686,32 @@ jobs:
--name "$TARGET" --root apps/desktop/release "${args[@]}"
fi
- build-win32-commit:
- name: bundled ${{ matrix.target.label }} (commit)
+ build-win32-arm64-release:
+ name: bundled win32-arm64
+ if: >-
+ needs.validate.outputs.win32-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && inputs.build_commit == '' && inputs.channel == ''
+ needs: [validate]
+ runs-on: ${{ matrix.target.runner }}
+ environment: release-signing
+ cache-mode: write
+ timeout-minutes: 900
+ strategy: &win32-strategy-arm64
+ fail-fast: false
+ matrix:
+ target:
+ - label: win32-arm64
+ runner: windows-11-arm
+ env: *win32-env
+ steps: *win32-steps
+
+ build-win32-x64-commit:
+ name: bundled win32-x64 (commit)
if: >-
!cancelled() && needs.validate.result == 'success'
- && inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && needs.validate.outputs.win32-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.build_commit != '' || inputs.channel != '')
needs: [validate]
runs-on: ${{ matrix.target.runner }}
@@ -685,23 +722,40 @@ jobs:
env: *win32-env
steps: *win32-steps
- build-win32:
- name: bundled win32 result
+ build-win32-arm64-commit:
+ name: bundled win32-arm64 (commit)
+ if: >-
+ !cancelled() && needs.validate.result == 'success'
+ && needs.validate.outputs.win32-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && (inputs.build_commit != '' || inputs.channel != '')
+ needs: [validate]
+ runs-on: ${{ matrix.target.runner }}
+ environment: release-signing
+ cache-mode: read
+ timeout-minutes: 900
+ strategy: *win32-strategy-arm64
+ env: *win32-env
+ steps: *win32-steps
+
+ build-win32-x64:
+ name: bundled win32-x64 result
# always() crosses the deliberately skipped trust branch; failed admission
# still skips this result, just as it skipped the original native builder.
if: >-
- always() && inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ always() && needs.validate.outputs.win32-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& needs.validate.result == 'success'
# The trust-branch legs are read through needs.*.result below, so they must
# stay in the list — the result job gates on their outcomes, not its own.
- needs: [validate, build-win32-release, build-win32-commit]
+ needs: [validate, build-win32-x64-release, build-win32-x64-commit]
runs-on: ubuntu-24.04
permissions: {}
timeout-minutes: 5
env:
SELECTED_BUILD_SUCCEEDED: >-
- ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-win32-release.result == 'success' && needs.build-win32-commit.result == 'skipped')
- || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-win32-commit.result == 'success' && needs.build-win32-release.result == 'skipped') }}
+ ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-win32-x64-release.result == 'success' && needs.build-win32-x64-commit.result == 'skipped')
+ || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-win32-x64-commit.result == 'success' && needs.build-win32-x64-release.result == 'skipped') }}
steps: &native-build-result-steps
- name: Require exactly the selected native build to succeed
shell: bash
@@ -711,6 +765,26 @@ jobs:
exit 1
fi
+ build-win32-arm64:
+ name: bundled win32-arm64 result
+ # always() crosses the deliberately skipped trust branch; failed admission
+ # still skips this result, just as it skipped the original native builder.
+ if: >-
+ always() && needs.validate.outputs.win32-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && needs.validate.result == 'success'
+ # The trust-branch legs are read through needs.*.result below, so they must
+ # stay in the list — the result job gates on their outcomes, not its own.
+ needs: [validate, build-win32-arm64-release, build-win32-arm64-commit]
+ runs-on: ubuntu-24.04
+ permissions: {}
+ timeout-minutes: 5
+ env:
+ SELECTED_BUILD_SUCCEEDED: >-
+ ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-win32-arm64-release.result == 'success' && needs.build-win32-arm64-commit.result == 'skipped')
+ || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-win32-arm64-commit.result == 'success' && needs.build-win32-arm64-release.result == 'skipped') }}
+ steps: *native-build-result-steps
+
# ── macOS builders (REAL) ──────────────────────────────────────────────────
# Native per-arch darwin builds via scripts/bundles/desktop.py (the
# one driver: same `--mac dmg zip` pass a local mac build runs). Each leg
@@ -722,9 +796,12 @@ jobs:
# merge-multiple download) and publish-darwin-updater merges them into
# releases/darwin/<channel>/<channel>-mac.yml — artifacts first, feed
# pointer last, whole channel green before anything publishes.
- build-darwin-release:
- name: bundled ${{ matrix.target.label }}
- if: inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate') && inputs.build_commit == '' && inputs.channel == ''
+ build-darwin-arm64-release:
+ name: bundled darwin-arm64
+ if: >-
+ needs.validate.outputs.darwin-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && inputs.build_commit == '' && inputs.channel == ''
needs: [validate]
runs-on: ${{ matrix.target.runner }}
environment: release-signing
@@ -736,8 +813,6 @@ jobs:
target:
- label: darwin-arm64
runner: macos-15
- - label: darwin-x64
- runner: macos-15-intel
env: &darwin-env
CHANNEL_BUILD: ${{ needs.validate.outputs.channel-build }}
HERMES_DESKTOP_VARIANT: bundled
@@ -1006,11 +1081,32 @@ jobs:
--name "$TARGET" --root apps/desktop/release "${args[@]}"
fi
- build-darwin-commit:
- name: bundled ${{ matrix.target.label }} (commit)
+ build-darwin-x64-release:
+ name: bundled darwin-x64
+ if: >-
+ needs.validate.outputs.darwin-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && inputs.build_commit == '' && inputs.channel == ''
+ needs: [validate]
+ runs-on: ${{ matrix.target.runner }}
+ environment: release-signing
+ cache-mode: write
+ timeout-minutes: 360
+ strategy: &darwin-strategy-x64
+ fail-fast: false
+ matrix:
+ target:
+ - label: darwin-x64
+ runner: macos-15-intel
+ env: *darwin-env
+ steps: *darwin-steps
+
+ build-darwin-arm64-commit:
+ name: bundled darwin-arm64 (commit)
if: >-
!cancelled() && needs.validate.result == 'success'
- && inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && needs.validate.outputs.darwin-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.build_commit != '' || inputs.channel != '')
needs: [validate]
runs-on: ${{ matrix.target.runner }}
@@ -1021,46 +1117,91 @@ jobs:
env: *darwin-env
steps: *darwin-steps
- build-darwin:
- name: bundled darwin result
+ build-darwin-x64-commit:
+ name: bundled darwin-x64 (commit)
+ if: >-
+ !cancelled() && needs.validate.result == 'success'
+ && needs.validate.outputs.darwin-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && (inputs.build_commit != '' || inputs.channel != '')
+ needs: [validate]
+ runs-on: ${{ matrix.target.runner }}
+ environment: release-signing
+ cache-mode: read
+ timeout-minutes: 360
+ strategy: *darwin-strategy-x64
+ env: *darwin-env
+ steps: *darwin-steps
+
+ build-darwin-arm64:
+ name: bundled darwin-arm64 result
# always() crosses the deliberately skipped trust branch; failed admission
# still skips this result, just as it skipped the original native builder.
if: >-
- always() && inputs.termux_only != true && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ always() && needs.validate.outputs.darwin-arm64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& needs.validate.result == 'success'
- needs: [validate, build-darwin-release, build-darwin-commit]
+ # The trust-branch legs are read through needs.*.result below, so they must
+ # stay in the list — the result job gates on their outcomes, not its own.
+ needs: [validate, build-darwin-arm64-release, build-darwin-arm64-commit]
runs-on: ubuntu-24.04
permissions: {}
timeout-minutes: 5
env:
SELECTED_BUILD_SUCCEEDED: >-
- ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-darwin-release.result == 'success' && needs.build-darwin-commit.result == 'skipped')
- || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-darwin-commit.result == 'success' && needs.build-darwin-release.result == 'skipped') }}
+ ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-darwin-arm64-release.result == 'success' && needs.build-darwin-arm64-commit.result == 'skipped')
+ || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-darwin-arm64-commit.result == 'success' && needs.build-darwin-arm64-release.result == 'skipped') }}
+ steps: *native-build-result-steps
+
+ build-darwin-x64:
+ name: bundled darwin-x64 result
+ # always() crosses the deliberately skipped trust branch; failed admission
+ # still skips this result, just as it skipped the original native builder.
+ if: >-
+ always() && needs.validate.outputs.darwin-x64 == 'true'
+ && (inputs.release-phase == '' || inputs.release-phase == 'candidate')
+ && needs.validate.result == 'success'
+ # The trust-branch legs are read through needs.*.result below, so they must
+ # stay in the list — the result job gates on their outcomes, not its own.
+ needs: [validate, build-darwin-x64-release, build-darwin-x64-commit]
+ runs-on: ubuntu-24.04
+ permissions: {}
+ timeout-minutes: 5
+ env:
+ SELECTED_BUILD_SUCCEEDED: >-
+ ${{ (inputs.build_commit == '' && inputs.channel == '' && needs.build-darwin-x64-release.result == 'success' && needs.build-darwin-x64-commit.result == 'skipped')
+ || ((inputs.build_commit != '' || inputs.channel != '') && needs.build-darwin-x64-commit.result == 'success' && needs.build-darwin-x64-release.result == 'skipped') }}
steps: *native-build-result-steps
# ── Linux builders (DISABLED for now) ─────────────────────────────────────
- build-linux:
- name: bundled linux (disabled for now)
+ build-linux-x64:
+ name: bundled linux-x64 (disabled for now)
+ if: needs.validate.outputs.linux-x64 == 'true'
needs: validate
runs-on: ubuntu-24.04
timeout-minutes: 5
- strategy:
- fail-fast: false
- matrix:
- target:
- - { label: linux-x64 } # runner: ubuntu-24.04
- - { label: linux-arm64 } # runner: ubuntu-24.04-arm
steps:
- name: Disabled
shell: bash
run: echo "::notice::linux bundled builds are disabled for now — re-enable in desktop-bundled-release.yml"
- smoke-darwin:
- name: Smoke macOS ${{ matrix.arch }} ${{ matrix.format }}
- needs: [validate, build-darwin]
+ build-linux-arm64:
+ name: bundled linux-arm64 (disabled for now)
+ if: needs.validate.outputs.linux-arm64 == 'true'
+ needs: validate
+ runs-on: ubuntu-24.04
+ timeout-minutes: 5
+ steps:
+ - name: Disabled
+ shell: bash
+ run: echo "::notice::linux bundled builds are disabled for now — re-enable in desktop-bundled-release.yml"
+
+ smoke-darwin-arm64:
+ name: Smoke macOS arm64 dmg/zip
+ needs: [validate, build-darwin-arm64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-darwin.result == 'success' && inputs.termux_only != true
+ && needs.build-darwin-arm64.result == 'success' && needs.validate.outputs.darwin-arm64 == 'true'
&& (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
permissions:
@@ -1068,12 +1209,11 @@ jobs:
strategy:
fail-fast: false
matrix:
- arch: [arm64, x64]
format: [dmg, zip]
uses: ./.github/workflows/desktop-bundle-smoke.yml
with:
platform: darwin
- arch: ${{ matrix.arch }}
+ arch: arm64
format: ${{ matrix.format }}
sha: ${{ needs.validate.outputs.sha }}
tag: ${{ inputs.tag }}
@@ -1087,12 +1227,12 @@ jobs:
public-root: ${{ needs.validate.outputs.public-root }}
disposable-run: ${{ needs.validate.outputs.disposable-run }}
- smoke-win32:
- name: Smoke Windows ${{ matrix.arch }} MSIX
- needs: [validate, build-win32]
+ smoke-darwin-x64:
+ name: Smoke macOS x64 dmg/zip
+ needs: [validate, build-darwin-x64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-win32.result == 'success' && inputs.termux_only != true
+ && needs.build-darwin-x64.result == 'success' && needs.validate.outputs.darwin-x64 == 'true'
&& (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
permissions:
@@ -1100,11 +1240,38 @@ jobs:
strategy:
fail-fast: false
matrix:
- arch: [x64, arm64]
+ format: [dmg, zip]
+ uses: ./.github/workflows/desktop-bundle-smoke.yml
+ with:
+ platform: darwin
+ arch: x64
+ format: ${{ matrix.format }}
+ sha: ${{ needs.validate.outputs.sha }}
+ tag: ${{ inputs.tag }}
+ # The archive ref the handoff was staged under (attempt ref for stable).
+ archive-tag: ${{ needs.validate.outputs.archive-tag }}
+ commit-build: ${{ inputs.build_commit != '' && needs.validate.outputs.channel-build == '' }}
+ channel-build: ${{ needs.validate.outputs.channel-build }}
+ channel-request-sha256: ${{ needs.validate.outputs.channel-request-sha256 }}
+ controller-sha: ${{ github.sha }}
+ public-base: ${{ needs.validate.outputs.public-base }}
+ public-root: ${{ needs.validate.outputs.public-root }}
+ disposable-run: ${{ needs.validate.outputs.disposable-run }}
+
+ 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.release-phase == '' || inputs.release-phase == 'candidate')
+ && (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
+ permissions:
+ contents: read
uses: ./.github/workflows/desktop-bundle-smoke.yml
with:
platform: win32
- arch: ${{ matrix.arch }}
+ arch: x64
format: msix
sha: ${{ needs.validate.outputs.sha }}
tag: ${{ inputs.tag }}
@@ -1118,25 +1285,21 @@ jobs:
public-root: ${{ needs.validate.outputs.public-root }}
disposable-run: ${{ needs.validate.outputs.disposable-run }}
- smoke-win32-universal:
- name: Smoke Windows ${{ matrix.arch }} MSIXBUNDLE
- needs: [validate, assemble-win32-bundle]
+ smoke-win32-arm64:
+ name: Smoke Windows arm64 MSIX
+ needs: [validate, build-win32-arm64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.assemble-win32-bundle.result == 'success' && inputs.termux_only != true
+ && needs.build-win32-arm64.result == 'success' && needs.validate.outputs.win32-arm64 == 'true'
&& (inputs.release-phase == '' || inputs.release-phase == 'candidate')
&& (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '' || inputs.channel != '')
permissions:
contents: read
- strategy:
- fail-fast: false
- matrix:
- arch: [x64, arm64]
uses: ./.github/workflows/desktop-bundle-smoke.yml
with:
platform: win32
- arch: ${{ matrix.arch }}
- format: msixbundle
+ arch: arm64
+ format: msix
sha: ${{ needs.validate.outputs.sha }}
tag: ${{ inputs.tag }}
# The archive ref the handoff was staged under (attempt ref for stable).
@@ -1152,10 +1315,12 @@ jobs:
# Assembly never writes a feed, including for canaries.
assemble-win32-bundle:
name: Assemble and stage the Windows universal bundle
- needs: [validate, build-win32]
+ needs: [validate, build-win32-x64, build-win32-arm64]
if: >-
!cancelled() && needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-win32.result == 'success' && inputs.termux_only != true
+ && needs.validate.outputs.win32-x64 == 'true' && needs.validate.outputs.win32-arm64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true'
+ && needs.build-win32-x64.result == 'success' && 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 != '')
runs-on: windows-2025
@@ -1325,12 +1490,18 @@ jobs:
publish-channel:
name: Publish the complete native-smoked channel build
needs:
- [validate, build-darwin, build-win32, assemble-win32-bundle, smoke-darwin, smoke-win32, smoke-win32-universal]
+ [validate, build-darwin-arm64, build-darwin-x64, build-win32-arm64, build-win32-x64,
+ assemble-win32-bundle, smoke-darwin-arm64, smoke-darwin-x64, smoke-win32-arm64, smoke-win32-x64]
if: >-
!cancelled() && needs.validate.outputs.channel-build != '' && needs.validate.result == 'success'
- && needs.build-darwin.result == 'success' && needs.build-win32.result == 'success'
- && needs.assemble-win32-bundle.result == 'success' && needs.smoke-darwin.result == 'success'
- && needs.smoke-win32.result == 'success' && needs.smoke-win32-universal.result == 'success'
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true'
+ && needs.build-darwin-arm64.result == 'success' && needs.build-darwin-x64.result == 'success'
+ && needs.build-win32-arm64.result == 'success' && needs.build-win32-x64.result == 'success'
+ && needs.assemble-win32-bundle.result == 'success'
+ && needs.smoke-darwin-arm64.result == 'success' && needs.smoke-darwin-x64.result == 'success'
+ && needs.smoke-win32-arm64.result == 'success' && needs.smoke-win32-x64.result == 'success'
runs-on: ubuntu-24.04
environment: release-signing
cache-mode: read
@@ -1371,13 +1542,15 @@ jobs:
publish-win32-updater:
name: Publish the tested Windows canary bundle
- needs: [validate, assemble-win32-bundle, smoke-win32, smoke-win32-universal]
+ needs: [validate, assemble-win32-bundle, smoke-win32-arm64, smoke-win32-x64]
if: >-
!cancelled() && inputs.build_commit == '' && inputs.channel == '' && inputs.upload_release == true
- && inputs.release-phase == '' && inputs.termux_only != true
+ && inputs.release-phase == ''
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true'
&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''
&& needs.assemble-win32-bundle.result == 'success'
- && needs.smoke-win32.result == 'success' && needs.smoke-win32-universal.result == 'success'
+ && needs.smoke-win32-arm64.result == 'success' && needs.smoke-win32-x64.result == 'success'
runs-on: ubuntu-24.04
environment: release-signing
timeout-minutes: 15
@@ -1450,12 +1623,14 @@ jobs:
# publish in parallel by design (distinct feed files).
publish-darwin-updater:
name: Publish the macOS updater feed
- needs: [validate, build-darwin, smoke-darwin]
+ needs: [validate, build-darwin-arm64, build-darwin-x64, smoke-darwin-arm64, smoke-darwin-x64]
if: >-
!cancelled() && inputs.build_commit == '' && inputs.channel == '' && inputs.upload_release == true
- && inputs.release-phase == '' && inputs.termux_only != true
+ && inputs.release-phase == ''
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-darwin.result == 'success' && needs.smoke-darwin.result == 'success'
+ && needs.build-darwin-arm64.result == 'success' && needs.build-darwin-x64.result == 'success'
+ && needs.smoke-darwin-arm64.result == 'success' && needs.smoke-darwin-x64.result == 'success'
runs-on: ubuntu-24.04
environment: release-signing
timeout-minutes: 15
@@ -1517,7 +1692,7 @@ jobs:
termux-deb:
name: Build + publish the termux .deb (aarch64)
needs: [validate]
- if: inputs.channel == '' && inputs.disposable_channel == '' && (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '')
+ if: inputs.channel == '' && inputs.disposable_channel == '' && needs.validate.outputs.termux == 'true' && (inputs.upload_release == true || inputs.release-phase == 'candidate' || inputs.build_commit != '')
runs-on: ubuntu-24.04-arm
environment: release-signing
timeout-minutes: 90
@@ -1886,7 +2061,7 @@ jobs:
builds-pending:
name: Mark the builds table as in progress
needs: validate
- if: inputs.build_commit == '' && inputs.upload_release == true && inputs.termux_only != true
+ if: inputs.build_commit == '' && inputs.upload_release == true && needs.validate.outputs.termux == 'true'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -1911,13 +2086,17 @@ jobs:
needs:
[
validate,
- build-win32,
- build-darwin,
- build-linux,
+ build-win32-x64,
+ build-win32-arm64,
+ build-darwin-arm64,
+ build-darwin-x64,
+ build-linux-x64,
+ build-linux-arm64,
assemble-win32-bundle,
- smoke-darwin,
- smoke-win32,
- smoke-win32-universal,
+ smoke-darwin-arm64,
+ smoke-darwin-x64,
+ smoke-win32-arm64,
+ smoke-win32-x64,
publish-win32-updater,
publish-darwin-updater,
termux-deb
@@ -1927,6 +2106,10 @@ jobs:
if: |
always() && inputs.build_commit == '' && inputs.channel == '' && inputs.upload_release == true && inputs.release-phase == ''
&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true' && needs.validate.outputs.termux == 'true'
+ && needs.validate.outputs.linux-x64 == 'true' && needs.validate.outputs.linux-arm64 == 'true'
runs-on: ubuntu-24.04
environment: release-signing
steps:
@@ -1968,18 +2151,26 @@ jobs:
needs:
[
validate,
- build-win32,
- build-darwin,
- build-linux,
+ build-win32-x64,
+ build-win32-arm64,
+ build-darwin-arm64,
+ build-darwin-x64,
+ build-linux-x64,
+ build-linux-arm64,
assemble-win32-bundle,
- smoke-darwin,
- smoke-win32,
- smoke-win32-universal,
+ smoke-darwin-arm64,
+ smoke-darwin-x64,
+ smoke-win32-arm64,
+ smoke-win32-x64,
termux-deb
]
if: |
always() && inputs.build_commit != '' && inputs.channel == '' && inputs.disposable_channel == ''
&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true' && needs.validate.outputs.termux == 'true'
+ && needs.validate.outputs.linux-x64 == 'true' && needs.validate.outputs.linux-arm64 == 'true'
runs-on: ubuntu-24.04
environment: release-signing
permissions:
@@ -2041,21 +2232,28 @@ jobs:
needs:
[
validate,
- build-win32,
- build-darwin,
+ build-win32-x64,
+ build-win32-arm64,
+ build-darwin-arm64,
+ build-darwin-x64,
assemble-win32-bundle,
- smoke-darwin,
- smoke-win32,
- smoke-win32-universal,
+ smoke-darwin-arm64,
+ smoke-darwin-x64,
+ smoke-win32-arm64,
+ smoke-win32-x64,
termux-deb
]
if: >-
!cancelled() && inputs.release-phase == 'candidate'
&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''
- && needs.build-win32.result == 'success' && needs.build-darwin.result == 'success'
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true' && needs.validate.outputs.termux == 'true'
+ && needs.build-win32-x64.result == 'success' && needs.build-win32-arm64.result == 'success'
+ && needs.build-darwin-arm64.result == 'success' && needs.build-darwin-x64.result == 'success'
&& needs.assemble-win32-bundle.result == 'success' && needs.termux-deb.result == 'success'
- && needs.smoke-darwin.result == 'success' && needs.smoke-win32.result == 'success'
- && needs.smoke-win32-universal.result == 'success'
+ && needs.smoke-darwin-arm64.result == 'success' && needs.smoke-darwin-x64.result == 'success'
+ && needs.smoke-win32-arm64.result == 'success' && needs.smoke-win32-x64.result == 'success'
runs-on: ubuntu-latest-32-core
environment: release-signing
timeout-minutes: 90
@@ -2163,12 +2361,15 @@ jobs:
needs:
[
validate,
- build-win32,
- build-darwin,
+ build-darwin-arm64,
+ build-darwin-x64,
+ build-win32-arm64,
+ build-win32-x64,
assemble-win32-bundle,
- smoke-darwin,
- smoke-win32,
- smoke-win32-universal,
+ smoke-darwin-arm64,
+ smoke-darwin-x64,
+ smoke-win32-arm64,
+ smoke-win32-x64,
termux-deb,
candidate-manifest,
stable-publish,
@@ -2186,12 +2387,12 @@ jobs:
run: |
python - <<'PY'
import json, os
+ from scripts.releases.job_groups import JOB_GROUPS, phase_jobs
from scripts.releases.stable import require_success
- phases = {
- 'candidate': ['validate', 'build-win32', 'build-darwin', 'assemble-win32-bundle', 'smoke-darwin', 'smoke-win32', 'smoke-win32-universal', 'termux-deb', 'candidate-manifest'],
- 'publish': ['validate', 'stable-publish', 'stable-store'],
- }
- require_success(json.loads(os.environ['RELEASE_NEEDS']), phases[os.environ['RELEASE_PHASE']])
+ needs = json.loads(os.environ['RELEASE_NEEDS'])
+ outputs = needs['validate'].get('outputs', {})
+ selected = {group: outputs.get(group) == 'true' for group in JOB_GROUPS}
+ require_success(needs, phase_jobs(selected, os.environ['RELEASE_PHASE']))
PY
publish-canary:
@@ -2199,14 +2400,18 @@ jobs:
needs:
[
validate,
- build-win32,
- build-darwin,
- build-linux,
+ build-win32-x64,
+ build-win32-arm64,
+ build-darwin-arm64,
+ build-darwin-x64,
+ build-linux-x64,
+ build-linux-arm64,
builds-table,
assemble-win32-bundle,
- smoke-darwin,
- smoke-win32,
- smoke-win32-universal,
+ smoke-darwin-arm64,
+ smoke-darwin-x64,
+ smoke-win32-arm64,
+ smoke-win32-x64,
publish-win32-updater,
publish-darwin-updater
]
@@ -2215,14 +2420,17 @@ jobs:
&& inputs.build_commit == '' && inputs.channel == ''
&& inputs.upload_release == true
&& contains(inputs.tag, '+canary.')
- && needs.build-win32.result == 'success'
- && needs.build-darwin.result == 'success'
- && needs.build-linux.result == 'success'
+ && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'
+ && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'
+ && needs.validate.outputs.win32-bundle == 'true'
+ && needs.validate.outputs.linux-x64 == 'true' && needs.validate.outputs.linux-arm64 == 'true'
+ && needs.build-win32-x64.result == 'success' && needs.build-win32-arm64.result == 'success'
+ && needs.build-darwin-arm64.result == 'success' && needs.build-darwin-x64.result == 'success'
+ && needs.build-linux-x64.result == 'success' && needs.build-linux-arm64.result == 'success'
&& needs.builds-table.result == 'success'
&& needs.assemble-win32-bundle.result == 'success'
- && needs.smoke-darwin.result == 'success'
- && needs.smoke-win32.result == 'success'
- && needs.smoke-win32-universal.result == 'success'
+ && needs.smoke-darwin-arm64.result == 'success' && needs.smoke-darwin-x64.result == 'success'
+ && needs.smoke-win32-arm64.result == 'success' && needs.smoke-win32-x64.result == 'success'
&& needs.publish-win32-updater.result == 'success'
&& needs.publish-darwin-updater.result == 'success'
runs-on: ubuntu-24.04
diff --git a/scripts/releases/channel_build.py b/scripts/releases/channel_build.py
index 6fbfb55b535..69445a59686 100644
--- a/scripts/releases/channel_build.py
+++ b/scripts/releases/channel_build.py
@@ -49,8 +49,6 @@ def dispatch_command(
"-f",
"upload_release=false",
"-f",
- "termux_only=false",
- "-f",
"termux_upgrade_from_tag=",
]
if bundle_env:
diff --git a/scripts/releases/channel_disposable.py b/scripts/releases/channel_disposable.py
index 8ab0bf5115a..92ebb4ccabb 100644
--- a/scripts/releases/channel_disposable.py
+++ b/scripts/releases/channel_disposable.py
@@ -17,6 +17,7 @@ from pathlib import Path
from hermes_cli.release_channels import canonical_json, channel_key, validate_name
from scripts.releases import commit_build, r2
from scripts.releases.channels import ChannelConflict, ChannelPublisher, R2ChannelStore
+from scripts.releases.job_groups import selects_all
from scripts.releases.r2_scope import R2Scope, channel_public_base, require_run
@@ -95,8 +96,8 @@ def allocate(env: dict[str, str]) -> dict:
raise ValueError("Use a non-protected disposable preview name")
if env.get("CHANNEL_BUILD") or env.get("CHANNEL_REQUEST_SHA256"):
raise ValueError("Allocation cannot reuse a build request or select a storage scope")
- if env.get("TERMUX_ONLY") == "true":
- raise ValueError("Disposable allocation cannot select Termux")
+ if not selects_all(env.get("JOBS")):
+ raise ValueError("Disposable allocation cannot select partial job groups")
# One dispatch now allocates AND builds, so the namespace must survive a
# "re-run failed jobs": lease by the run id alone (no attempt suffix), and
# never accept a caller-supplied path, public URL, or allocation namespace.
diff --git a/scripts/releases/channel_publish.py b/scripts/releases/channel_publish.py
index 2d3198db75d..08bbef08dcf 100644
--- a/scripts/releases/channel_publish.py
+++ b/scripts/releases/channel_publish.py
@@ -12,8 +12,10 @@ from hermes_cli.release_channels import ChannelReader, build_prefix, canonical_j
from scripts.releases import commit_build, handoff, r2
NATIVE_LEGS = ("darwin-arm64", "darwin-x64", "win32-arm64", "win32-x64", "windows-universal")
-REQUIRED_JOBS = ("validate", "build-darwin", "build-win32", "assemble-win32-bundle",
- "smoke-darwin", "smoke-win32", "smoke-win32-universal")
+REQUIRED_JOBS = ("validate", "build-darwin-arm64", "build-darwin-x64",
+ "build-win32-arm64", "build-win32-x64", "assemble-win32-bundle",
+ "smoke-darwin-arm64", "smoke-darwin-x64",
+ "smoke-win32-arm64", "smoke-win32-x64")
def read_request(build_id: str, digest: str, public_base: str, repository: str) -> dict:
@@ -54,10 +56,13 @@ def receiver_request(request: dict) -> bool:
def admit(request: dict, env: dict[str, str]) -> dict[str, str]:
+ from scripts.releases.job_groups import selects_all
+
if (env.get("TAG") or env.get("RELEASE_PHASE")
- or env.get("TERMUX_UPGRADE_FROM_TAG") or env.get("TERMUX_ONLY") == "true"
- or env.get("UPLOAD_RELEASE", "false") != "false"):
- raise ValueError("Channel requests cannot select one-off, release, Termux or bundle overrides")
+ or env.get("TERMUX_UPGRADE_FROM_TAG")
+ or env.get("UPLOAD_RELEASE", "false") != "false"
+ or not selects_all(env.get("JOBS"))):
+ raise ValueError("Channel requests cannot select one-off, release or partial job overrides")
# A one-dispatch disposable run inherits the allocation dispatch's own
# BUILD_COMMIT/BUNDLE_ENV_JSON inputs. They are not overrides when they are
# exactly what the digest-pinned request already says; anything else is.
diff --git a/scripts/releases/channel_releases.py b/scripts/releases/channel_releases.py
index 164545f2dc8..39cf43e5df7 100644
--- a/scripts/releases/channel_releases.py
+++ b/scripts/releases/channel_releases.py
@@ -19,8 +19,12 @@ from scripts.releases.channels import ChannelPublisher, R2ChannelStore
from scripts.releases.versioning import parse_attempt_ref
NATIVE_LEGS = ("darwin-arm64", "darwin-x64", "win32-arm64", "win32-x64", "windows-universal")
-CANARY_NEEDS = ("validate", "build-win32", "build-darwin", "build-linux", "builds-table", "assemble-win32-bundle",
- "smoke-darwin", "smoke-win32", "smoke-win32-universal", "publish-win32-updater", "publish-darwin-updater")
+CANARY_NEEDS = ("validate", "build-win32-x64", "build-win32-arm64",
+ "build-darwin-arm64", "build-darwin-x64",
+ "build-linux-x64", "build-linux-arm64", "builds-table",
+ "assemble-win32-bundle", "smoke-darwin-arm64", "smoke-darwin-x64",
+ "smoke-win32-arm64", "smoke-win32-x64",
+ "publish-win32-updater", "publish-darwin-updater")
def select_channel(publisher: ChannelPublisher, policy: str) -> str:
diff --git a/scripts/releases/commit_build.py b/scripts/releases/commit_build.py
index ab4226ba2f6..5f8791ce9b5 100644
--- a/scripts/releases/commit_build.py
+++ b/scripts/releases/commit_build.py
@@ -188,7 +188,7 @@ def dispatch_command(commit: str, repository: str, branch: str,
require_commit(commit)
command = ["gh", "workflow", "run", WORKFLOW, "--ref", branch, "--repo", repository,
"-f", f"build_commit={commit}", "-f", "tag=", "-f", "upload_release=false",
- "-f", "termux_only=false", "-f", "termux_upgrade_from_tag="]
+ "-f", "termux_upgrade_from_tag="]
if bundle_env:
command += ["-f", "bundle_env=" + json.dumps(validate(bundle_env), sort_keys=True)]
return command
diff --git a/scripts/releases/job_groups.py b/scripts/releases/job_groups.py
new file mode 100644
index 00000000000..94253f82867
--- /dev/null
+++ b/scripts/releases/job_groups.py
@@ -0,0 +1,81 @@
+"""The desktop-bundled-release `jobs` input: one parser for the job groups.
+
+The workflow's admission step is the only place that reads the raw input; it
+emits one `<group>=true|false` output per group and every job gates on its own
+group output. Channel callers use `selects_all` where they refused
+`TERMUX_ONLY=true` before, and the stable phase result uses `phase_jobs` to
+judge only the selected groups.
+"""
+from __future__ import annotations
+
+import os
+
+JOB_GROUPS = ("darwin-arm64", "darwin-x64", "win32-arm64", "win32-x64",
+ "win32-bundle", "linux-x64", "linux-arm64", "termux")
+ALL_JOBS = ",".join(JOB_GROUPS)
+
+# The workflow jobs each group runs, in the names desktop-bundled-release.yml
+# declares. `phase_jobs` turns a selection into the list the stable phase
+# result requires.
+GROUP_JOBS = {
+ "darwin-arm64": ("build-darwin-arm64", "smoke-darwin-arm64"),
+ "darwin-x64": ("build-darwin-x64", "smoke-darwin-x64"),
+ "win32-arm64": ("build-win32-arm64", "smoke-win32-arm64"),
+ "win32-x64": ("build-win32-x64", "smoke-win32-x64"),
+ "win32-bundle": ("assemble-win32-bundle",),
+ "termux": ("termux-deb",),
+}
+
+
+def parse_jobs(raw: str | None) -> dict[str, bool]:
+ """Select job groups from a comma-separated list. ``None`` is the default.
+
+ An unknown name, a duplicate, an empty entry and an explicitly empty list
+ are refused; admission then fails before any build starts.
+ """
+ if raw is None:
+ return {group: True for group in JOB_GROUPS}
+ names = [name.strip() for name in raw.split(",")]
+ if not any(names):
+ raise ValueError(f"jobs must name at least one group: {ALL_JOBS}")
+ selected = {group: False for group in JOB_GROUPS}
+ for name in names:
+ if not name:
+ raise ValueError("jobs contains an empty group name")
+ if name not in selected:
+ raise ValueError(f"unknown job group: {name}")
+ if selected[name]:
+ raise ValueError(f"duplicate job group: {name}")
+ selected[name] = True
+ return selected
+
+
+def selects_all(raw: str | None) -> bool:
+ """True only when the input selects every group."""
+ return all(parse_jobs(raw).values())
+
+
+def phase_jobs(selected: dict[str, bool], phase: str) -> list[str]:
+ """Jobs the stable phase result judges: an unselected group never fails it."""
+ required = ["validate"]
+ if phase == "publish":
+ return required + ["stable-publish", "stable-store"]
+ if phase != "candidate":
+ raise ValueError(f"Unknown release phase: {phase}")
+ for group, jobs in GROUP_JOBS.items():
+ if selected.get(group):
+ required.extend(jobs)
+ if all(selected.get(group) for group in GROUP_JOBS):
+ required.append("candidate-manifest")
+ return required
+
+
+def main() -> None:
+ """Emit one `<group>=true|false` line per group for `$GITHUB_OUTPUT`."""
+ selected = parse_jobs(os.environ.get("JOBS"))
+ for group in JOB_GROUPS:
+ print(f"{group}={'true' if selected[group] else 'false'}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/releases/stable.py b/scripts/releases/stable.py
index 7f2c6f76fb2..7b6a76eba6c 100644
--- a/scripts/releases/stable.py
+++ b/scripts/releases/stable.py
@@ -20,9 +20,10 @@ SHA = re.compile(r"[a-f0-9]{40}")
DIGEST = re.compile(r"[a-f0-9]{64}")
DESKTOP_TARGETS = ("windows/x64", "windows/arm64", "macos/x64", "macos/arm64")
SMOKE_JOBS = {
- "smoke-darwin": "macOS DMG + ZIP (arm64 and x64)",
- "smoke-win32": "Windows MSIX (arm64 and x64)",
- "smoke-win32-universal": "Windows MSIXBUNDLE (arm64 and x64)",
+ "smoke-darwin-arm64": "macOS DMG + ZIP (arm64)",
+ "smoke-darwin-x64": "macOS DMG + ZIP (x64)",
+ "smoke-win32-arm64": "Windows MSIX (arm64)",
+ "smoke-win32-x64": "Windows MSIX (x64)",
}
@@ -97,7 +98,6 @@ def _validated_rows(manifest: dict, tag: str, commit: str, public_base: str,
raise ValueError("Candidate manifest does not match release identity")
if manifest.get("archive") != archive:
raise ValueError("Candidate manifest names a different release archive")
- successful_smoke_results(manifest.get("smoke_results"))
admitted_epoch = manifest.get("releaseEpoch")
expected_windows_version = stable_windows_version(admitted_epoch)
if release_epoch is not None and admitted_epoch != release_epoch:
@@ -139,8 +139,15 @@ def validate_candidates(manifest: dict, tag: str, commit: str, public_base: str,
release_epoch: int | None = None, *, archive: str) -> dict:
"""`tag` is the plain payload identity; `archive` is the releases/tag/<ref>/
prefix every artifact URL must live under. Stable attempts name the attempt
- ref as their archive; the two are separate fields and never overloaded."""
+ ref as their archive; the two are separate fields and never overloaded.
+
+ The smoke requirement lives here and not in the shared row checks:
+ per-arch receipts are staged before the smokes run (decision 11), so a
+ receipt without `smoke_results` is accepted while the final manifest
+ never is.
+ """
rows = _validated_rows(manifest, tag, commit, public_base, release_epoch, archive=archive)
+ successful_smoke_results(manifest.get("smoke_results"))
if any(target not in rows for target in DESKTOP_TARGETS):
raise ValueError("Candidate manifest must cover Windows and macOS on both architectures")
return rows
diff --git a/scripts/render-builds-table.py b/scripts/render-builds-table.py
index 526dccd3542..0b6e2c7b44d 100644
--- a/scripts/render-builds-table.py
+++ b/scripts/render-builds-table.py
@@ -198,8 +198,8 @@ _COMMIT_DISABLED = ["Linux x64 (AppImage)", "Linux ARM64 (AppImage)"]
COMMIT_RECEIPT_NAMES = sorted({leg for _label, leg, _pattern in _COMMIT_EXPECTED})
_COMMIT_JOBS = {
- "win32-x64": "build-win32", "win32-arm64": "build-win32",
- "darwin-x64": "build-darwin", "darwin-arm64": "build-darwin",
+ "win32-x64": "build-win32-x64", "win32-arm64": "build-win32-arm64",
+ "darwin-x64": "build-darwin-x64", "darwin-arm64": "build-darwin-arm64",
"windows-universal": "assemble-win32-bundle", "termux": "termux-deb",
}
diff --git a/tests/ci/test_channel_build_publication.py b/tests/ci/test_channel_build_publication.py
index 83680b126bd..d16044515b6 100644
--- a/tests/ci/test_channel_build_publication.py
+++ b/tests/ci/test_channel_build_publication.py
@@ -214,7 +214,7 @@ def test_real_workflow_admission_and_public_smoke_fetch(tmp_path, r2_server, sta
result = run_shell(tmp_path, r2_server, script, env, cwd=clone)
assert result.returncode == 0, result.stdout + result.stderr
assert f"sha={request['commit']}" in (tmp_path / "outputs").read_text(encoding="utf-8")
- for overrides in ({"GITHUB_REF": "refs/heads/feature"}, {"TAG": "v0.1.2"}, {"TERMUX_ONLY": "true"},
+ for overrides in ({"GITHUB_REF": "refs/heads/feature"}, {"TAG": "v0.1.2"}, {"JOBS": "termux"},
{"CHANNEL_REQUEST_SHA256": "f" * 64}):
failed = run_shell(tmp_path, r2_server, script, {**env, **overrides}, cwd=clone)
assert failed.returncode != 0
@@ -495,7 +495,8 @@ def test_tag_and_commit_staging_never_runs_for_a_pinned_channel_build():
"""
workflow = _workflow()
seen = set()
- for job in ("build-win32-commit", "build-darwin-commit"):
+ for job in ("build-win32-x64-commit", "build-win32-arm64-commit",
+ "build-darwin-arm64-commit", "build-darwin-x64-commit"):
for step in workflow["jobs"][job]["steps"]:
run = step.get("run", "") if isinstance(step, dict) else ""
if "scripts.releases.handoff stage" not in run:
diff --git a/tests/ci/test_commit_build_staging.py b/tests/ci/test_commit_build_staging.py
index 2cf21dad06e..aeb3849e9f9 100644
--- a/tests/ci/test_commit_build_staging.py
+++ b/tests/ci/test_commit_build_staging.py
@@ -80,7 +80,7 @@ def test_failed_commit_summary_publishes_downloads_or_run_links(tmp_path, r2_ser
artifact = tmp_path / 'apps/desktop/release/HermesBundled-0.33.0-win-x64.msix'
artifact.parent.mkdir(parents=True)
artifact.write_bytes(b'inert downloadable fixture')
- staged = shell_step(tmp_path, r2_server, 'build-win32-commit', 'Stage Windows packages to R2', env)
+ staged = shell_step(tmp_path, r2_server, 'build-win32-x64-commit', 'Stage Windows packages to R2', env)
assert staged.returncode == 0, staged.stdout + staged.stderr
result = shell_step(tmp_path, r2_server, 'commit-builds-summary',
'Render the full expected-binary matrix', env)
@@ -109,8 +109,8 @@ def test_failed_commit_summary_publishes_downloads_or_run_links(tmp_path, r2_ser
elif line.startswith('| Linux'):
assert 'Disabled' in line and '](' not in line
assert all(key.startswith(f'releases/commit/{sha}/') for key in r2_server.store)
- for name in ('build-win32', 'build-darwin'):
- # The commit/release split collapsed into one leg per platform; the
+ for name in ('build-win32-x64', 'build-win32-arm64', 'build-darwin-arm64', 'build-darwin-x64'):
+ # The commit/release split collapsed into one leg per arch; the
# result job's env still encodes exactly-which-trust-branch-succeeded.
result_job = jobs[name]
assert f"needs.{name}-commit.result" in result_job['env']['SELECTED_BUILD_SUCCEEDED']
@@ -131,14 +131,14 @@ def test_commit_staging_and_summary_bind_every_produced_file_without_channels(tm
release = tmp_path / 'apps/desktop/release'
release.mkdir(parents=True)
producers = [
- ('build-win32-commit', 'Stage Windows packages to R2', 'win32-x64', [
+ ('build-win32-x64-commit', 'Stage Windows packages to R2', 'win32-x64', [
'HermesBundled-0.33.0-win-x64.msix']),
- ('build-win32-commit', 'Stage Windows packages to R2', 'win32-arm64', [
+ ('build-win32-arm64-commit', 'Stage Windows packages to R2', 'win32-arm64', [
'HermesBundled-0.33.0-win-arm64.msix']),
- ('build-darwin-commit', 'Stage macOS packages and feed inputs to R2', 'darwin-arm64', [
+ ('build-darwin-arm64-commit', 'Stage macOS packages and feed inputs to R2', 'darwin-arm64', [
'HermesBundled-0.33.0-mac-arm64.dmg', 'HermesBundled-0.33.0-mac-arm64.zip',
'HermesBundled-0.33.0-mac-arm64.zip.blockmap']),
- ('build-darwin-commit', 'Stage macOS packages and feed inputs to R2', 'darwin-x64', [
+ ('build-darwin-x64-commit', 'Stage macOS packages and feed inputs to R2', 'darwin-x64', [
'HermesBundled-0.33.0-mac-x64.dmg', 'HermesBundled-0.33.0-mac-x64.zip',
'HermesBundled-0.33.0-mac-x64.zip.blockmap']),
('assemble-win32-bundle', 'Stage universal bundles to R2', 'windows-universal', [
@@ -176,9 +176,12 @@ def test_commit_staging_and_summary_bind_every_produced_file_without_channels(tm
summary = tmp_path / 'summary.md'
summary_env = {**env, 'GITHUB_STEP_SUMMARY': str(summary), 'RELEASE_NEEDS': json.dumps({
- 'validate': {'result': 'success'}, 'build-win32': {'result': 'success'},
- 'build-darwin': {'result': 'success'}, 'assemble-win32-bundle': {'result': 'success'},
- 'termux-deb': {'result': 'success'}, 'build-linux': {'result': 'success'},
+ 'validate': {'result': 'success'}, 'build-win32-x64': {'result': 'success'},
+ 'build-win32-arm64': {'result': 'success'}, 'build-darwin-arm64': {'result': 'success'},
+ 'build-darwin-x64': {'result': 'success'},
+ 'assemble-win32-bundle': {'result': 'success'},
+ 'termux-deb': {'result': 'success'}, 'build-linux-x64': {'result': 'success'},
+ 'build-linux-arm64': {'result': 'success'},
})}
result = shell_step(tmp_path, r2_server, 'commit-builds-summary',
'Render the full expected-binary matrix', summary_env)
@@ -214,8 +217,8 @@ def test_commit_staging_and_summary_bind_every_produced_file_without_channels(tm
r2_server.store.pop(f'releases/commit/{sha}/handoff-darwin-x64.json')
summary.unlink()
summary_env['RELEASE_NEEDS'] = json.dumps({'validate': {'result': 'success'},
- 'build-darwin': {'result': 'failure'}})
+ 'build-darwin-x64': {'result': 'failure'}})
incomplete = shell_step(tmp_path, r2_server, 'commit-builds-summary',
'Render the full expected-binary matrix', summary_env)
assert incomplete.returncode == 0, incomplete.stdout + incomplete.stderr
- assert 'failed: build-darwin' in summary.read_text(encoding='utf-8-sig')
+ assert 'failed: build-darwin-x64' in summary.read_text(encoding='utf-8-sig')
diff --git a/tests/ci/test_desktop_bundle_smoke.py b/tests/ci/test_desktop_bundle_smoke.py
index bfb9226d1d3..780a5dd1145 100644
--- a/tests/ci/test_desktop_bundle_smoke.py
+++ b/tests/ci/test_desktop_bundle_smoke.py
@@ -16,9 +16,11 @@ import pytest
from tests.ci.test_commit_build_staging import ROOT, shell_step
from tests.ci.test_desktop_release_tag_admission import _BASH, _child_env, _workflow
from tests.scripts.test_release_r2 import r2_server # noqa: F401
+from scripts.releases.job_groups import JOB_GROUPS
SHA = 'a' * 40
TAG = 'v0.28.0+canary.20260818T101010Z'
+ALL_JOBS = ','.join(JOB_GROUPS)
def smoke_workflow():
@@ -56,14 +58,25 @@ def gate(expression, inputs, needs, *, cancelled=False, job_if=True):
def admitted(jobs):
- return {name: {'result': 'success', 'outputs': {'sha': SHA}} for name in jobs}
+ return {name: {'result': 'success',
+ 'outputs': {'sha': SHA, **{group: 'true' for group in JOB_GROUPS}}}
+ for name in jobs}
+
+
+def selected_needs(jobs, name, selected):
+ """Admitted needs whose validate outputs select only `selected` groups."""
+ needs = admitted(jobs[name]['needs'])
+ needs['validate']['outputs'] = {group: ('true' if group in selected else 'false')
+ for group in JOB_GROUPS}
+ return needs
def test_native_consumers_and_publication_fail_closed_across_trust_skips(tmp_path):
jobs = _workflow()['jobs']
- base_inputs = {'build_commit': '', 'upload_release': True, 'release-phase': '', 'termux_only': False, 'tag': TAG}
- consumers = ['smoke-darwin', 'smoke-win32', 'smoke-win32-universal', 'assemble-win32-bundle',
- 'publish-win32-updater', 'publish-darwin-updater', 'candidate-manifest']
+ base_inputs = {'build_commit': '', 'upload_release': True, 'release-phase': '', 'jobs': ALL_JOBS, 'tag': TAG}
+ consumers = ['smoke-darwin-arm64', 'smoke-darwin-x64', 'smoke-win32-arm64', 'smoke-win32-x64',
+ 'assemble-win32-bundle', 'publish-win32-updater', 'publish-darwin-updater',
+ 'candidate-manifest']
for name in consumers:
job = jobs[name]
inputs = {**base_inputs, 'release-phase': 'candidate' if name == 'candidate-manifest' else ''}
@@ -80,45 +93,55 @@ def test_native_consumers_and_publication_fail_closed_across_trust_skips(tmp_pat
needs['validate']['outputs'] = {}
assert not gate(job['if'], inputs, needs), name
- scope_jobs = consumers[:4]
+ scope_jobs = consumers[:5]
for name in scope_jobs:
needs = admitted(jobs[name]['needs'])
- for phase, commit, upload, termux, allowed in [
- ('', SHA, False, False, True), ('candidate', '', False, False, True),
- ('', '', True, False, True), ('', '', False, False, False),
- ('publish', '', False, False, False), ('promote', '', False, False, False),
- ('', SHA, False, True, False),
+ for phase, commit, upload, allowed in [
+ ('', SHA, False, True), ('candidate', '', False, True),
+ ('', '', True, True), ('', '', False, False),
+ ('publish', '', False, False), ('promote', '', False, False),
]:
inputs = {**base_inputs, 'release-phase': phase, 'build_commit': commit,
- 'upload_release': upload, 'termux_only': termux}
+ 'upload_release': upload}
assert gate(jobs[name]['if'], inputs, needs) is allowed, (name, inputs)
+ # A group the caller did not select stays skipped; its consumers refuse.
+ for name in ('smoke-darwin-arm64', 'smoke-darwin-x64', 'smoke-win32-arm64', 'smoke-win32-x64',
+ 'assemble-win32-bundle'):
+ assert not gate(jobs[name]['if'], base_inputs,
+ selected_needs(jobs, name, {'termux'})), name
for name in ('publish-win32-updater', 'publish-darwin-updater'):
for key, value in [('build_commit', SHA), ('upload_release', False),
- ('termux_only', True), ('release-phase', 'candidate'), ('release-phase', 'promote')]:
+ ('release-phase', 'candidate'), ('release-phase', 'promote')]:
assert not gate(jobs[name]['if'], {**base_inputs, key: value}, admitted(jobs[name]['needs']))
+ groups = ['darwin-arm64', 'darwin-x64'] if name == 'publish-darwin-updater' \
+ else ['win32-arm64', 'win32-x64', 'win32-bundle']
+ for group in groups:
+ assert not gate(jobs[name]['if'], base_inputs,
+ selected_needs(jobs, name, {group})), (name, group)
for platform in ('win32', 'darwin'):
- job = jobs[f'build-{platform}']
- outcomes = ('success', 'failure', 'skipped', 'cancelled')
- for commit, release, commit_result in itertools.product(
- ('', SHA), outcomes, outcomes):
- needs = admitted(job['needs'])
- needs[f'build-{platform}-release'] = {'result': release}
- needs[f'build-{platform}-commit'] = {'result': commit_result}
- selected = gate(job['env']['SELECTED_BUILD_SUCCEEDED'], {'build_commit': commit}, needs, job_if=False)
- expected = (commit == '' and release == 'success' and commit_result == 'skipped') or (
- commit != '' and commit_result == 'success' and release == 'skipped')
- assert selected is expected
- result = subprocess.run([_BASH, '-e', '-c', job['steps'][0]['run']], cwd=tmp_path,
- env=_child_env(SELECTED_BUILD_SUCCEEDED=str(selected).lower()),
- capture_output=True, text=True, timeout=5)
- assert (result.returncode == 0) is expected
+ for arch in ('x64', 'arm64'):
+ job = jobs[f'build-{platform}-{arch}']
+ outcomes = ('success', 'failure', 'skipped', 'cancelled')
+ for commit, release, commit_result in itertools.product(
+ ('', SHA), outcomes, outcomes):
+ needs = admitted(job['needs'])
+ needs[f'build-{platform}-{arch}-release'] = {'result': release}
+ needs[f'build-{platform}-{arch}-commit'] = {'result': commit_result}
+ selected = gate(job['env']['SELECTED_BUILD_SUCCEEDED'], {'build_commit': commit}, needs, job_if=False)
+ expected = (commit == '' and release == 'success' and commit_result == 'skipped') or (
+ commit != '' and commit_result == 'success' and release == 'skipped')
+ assert selected is expected
+ result = subprocess.run([_BASH, '-e', '-c', job['steps'][0]['run']], cwd=tmp_path,
+ env=_child_env(SELECTED_BUILD_SUCCEEDED=str(selected).lower()),
+ capture_output=True, text=True, timeout=5)
+ assert (result.returncode == 0) is expected
def test_signature_cache_saves_only_in_the_writable_build():
jobs = _workflow()['jobs']
for branch, commit in [('release', ''), ('commit', SHA)]:
- job = jobs[f'build-win32-{branch}']
+ job = jobs[f'build-win32-x64-{branch}']
steps = job['steps']
cache_steps = [step for step in steps
if 'payload-signatures' in step.get('with', {}).get('path', '')]
@@ -145,15 +168,14 @@ def test_smoke_matrix_native_routes_and_driver_only_dependencies():
workflow = smoke_workflow()
jobs = _workflow()['jobs']
executions = []
- for name in ('smoke-darwin', 'smoke-win32', 'smoke-win32-universal'):
+ for name in ('smoke-darwin-arm64', 'smoke-darwin-x64', 'smoke-win32-arm64', 'smoke-win32-x64'):
caller = jobs[name]
- assert caller['strategy']['fail-fast'] is False
assert caller['permissions'] == {'contents': 'read'} and 'secrets' not in caller
- matrix = caller['strategy']['matrix']
- for arch, fmt in itertools.product(matrix['arch'], matrix.get('format', [caller['with']['format']])):
- executions.append((caller['with']['platform'], arch, fmt))
+ formats = caller.get('strategy', {}).get('matrix', {}).get('format', [caller['with']['format']])
+ for fmt in formats:
+ executions.append((caller['with']['platform'], caller['with']['arch'], fmt))
assert set(executions) == {(platform, arch, fmt) for arch in ('arm64', 'x64')
- for platform, formats in [('darwin', ('dmg', 'zip')), ('win32', ('msix', 'msixbundle'))]
+ for platform, formats in [('darwin', ('dmg', 'zip')), ('win32', ('msix',))]
for fmt in formats}
for name, job in workflow['jobs'].items():
# validate is the admission job (rejects unsupported targets before any
@@ -228,7 +250,7 @@ def test_public_smoke_fetches_the_receipt_bound_native_format(tmp_path, r2_serve
(release / filename).write_bytes(payload)
(release / ('Store-' + filename)).write_bytes(b'not eligible')
universal = fmt == 'msixbundle'
- job = 'assemble-win32-bundle' if universal else f'build-{platform}-commit'
+ job = 'assemble-win32-bundle' if universal else f'build-{platform}-{arch}-commit'
stage = 'Stage universal bundles to R2' if universal else (
'Stage Windows packages to R2' if platform == 'win32' else 'Stage macOS packages and feed inputs to R2')
if platform == 'darwin':
@@ -281,25 +303,48 @@ def test_download_faults_never_export_an_accepted_artifact(tmp_path, r2_server,
def test_stable_phase_and_canary_gates_require_smoke_but_preserve_other_phases(tmp_path, r2_server):
jobs = _workflow()['jobs']
- required = {
- 'candidate': ['validate', 'build-win32', 'build-darwin', 'assemble-win32-bundle',
- 'smoke-darwin', 'smoke-win32', 'smoke-win32-universal', 'termux-deb', 'candidate-manifest'],
- 'publish': ['validate', 'stable-publish', 'stable-store'],
+ group_jobs = {
+ 'darwin-arm64': ['build-darwin-arm64', 'smoke-darwin-arm64'],
+ 'darwin-x64': ['build-darwin-x64', 'smoke-darwin-x64'],
+ 'win32-arm64': ['build-win32-arm64', 'smoke-win32-arm64'],
+ 'win32-x64': ['build-win32-x64', 'smoke-win32-x64'],
+ 'win32-bundle': ['assemble-win32-bundle'],
+ 'termux': ['termux-deb'],
}
- for phase, selected in required.items():
- needs = {name: {'result': 'success' if name in selected else 'skipped'}
- for name in jobs['stable-phase-result']['needs']}
- for failed in [None, *selected]:
- changed = copy.deepcopy(needs)
- if failed:
- changed[failed]['result'] = 'cancelled'
- result = shell_step(tmp_path, r2_server, 'stable-phase-result', 'Require every phase job', {
- 'RELEASE_NEEDS': json.dumps(changed), 'RELEASE_PHASE': phase})
- assert (result.returncode == 0) is (failed is None), (phase, failed, result.stderr)
+
+ def run_phase(phase, selected, failed=None):
+ needs = {name: {'result': 'success'} for name in jobs['stable-phase-result']['needs']}
+ needs['validate']['outputs'] = {group: ('true' if group in selected else 'false')
+ for group in group_jobs}
+ for group, members in group_jobs.items():
+ if group not in selected:
+ for member in members:
+ needs[member]['result'] = 'skipped'
+ if failed:
+ needs[failed]['result'] = 'cancelled'
+ return shell_step(tmp_path, r2_server, 'stable-phase-result', 'Require every phase job',
+ {'RELEASE_NEEDS': json.dumps(needs), 'RELEASE_PHASE': phase})
+
+ every = set(group_jobs)
+ assert run_phase('candidate', every).returncode == 0
+ assert run_phase('publish', every).returncode == 0
+ assert run_phase('publish', every - {'termux'}).returncode == 0
+ for group in group_jobs:
+ # A group that was not selected is not a failure of the phase.
+ assert run_phase('candidate', every - {group}).returncode == 0, group
+ for failed in ('smoke-darwin-arm64', 'build-win32-x64', 'candidate-manifest'):
+ assert run_phase('candidate', every, failed=failed).returncode != 0, failed
+ assert run_phase('candidate', every, failed='stable-publish').returncode == 0
+ # A partial selection still judges the groups it selected.
+ assert run_phase('candidate', {'darwin-arm64'}).returncode == 0
+ assert run_phase('candidate', {'darwin-arm64'}, failed='smoke-darwin-arm64').returncode != 0
+ assert run_phase('publish', set(), failed='stable-store').returncode != 0
+
inputs = {'build_commit': '', 'upload_release': True, 'tag': TAG}
needs = admitted(jobs['publish-canary']['needs'])
assert gate(jobs['publish-canary']['if'], inputs, needs)
- for name in ('smoke-darwin', 'smoke-win32', 'smoke-win32-universal'):
+ for name in ('smoke-darwin-arm64', 'smoke-darwin-x64', 'smoke-win32-arm64', 'smoke-win32-x64',
+ 'build-linux-x64', 'build-linux-arm64'):
for state in ('failure', 'skipped', 'cancelled'):
faulty = copy.deepcopy(needs)
faulty[name]['result'] = state
diff --git a/tests/ci/test_desktop_release_tag_admission.py b/tests/ci/test_desktop_release_tag_admission.py
index e07f1184788..0353366dcca 100644
--- a/tests/ci/test_desktop_release_tag_admission.py
+++ b/tests/ci/test_desktop_release_tag_admission.py
@@ -244,8 +244,8 @@ def test_downloadable_windows_builds_refuse_to_ship_unsigned(tmp_path: Path):
"""The Windows signer only warns without AZURE_SIGN_*; every lane whose
artifacts are downloadable must therefore fail before building, under
the same gate the macOS leg uses for its signing credentials."""
- step = _require_step("build-win32-release", "Require Azure signing")
- assert step["if"] == _require_step("build-darwin-release", "Require signing credentials")["if"]
+ step = _require_step("build-win32-x64-release", "Require Azure signing")
+ assert step["if"] == _require_step("build-darwin-arm64-release", "Require signing credentials")["if"]
assert "build-commit" not in step["if"] and "release-phase == 'candidate'" in step["if"]
names = list(step["env"])
assert {"AZURE_SIGN_ENDPOINT", "AZURE_SIGN_ACCOUNT", "AZURE_SIGN_PROFILE", "AZURE_CLIENT_ID"} <= set(names)
diff --git a/tests/ci/test_desktop_store_eligibility.py b/tests/ci/test_desktop_store_eligibility.py
index 47e777c20d6..e0eca6ed6e4 100644
--- a/tests/ci/test_desktop_store_eligibility.py
+++ b/tests/ci/test_desktop_store_eligibility.py
@@ -54,7 +54,7 @@ def test_native_windows_build_selects_store_only_for_stable(tmp_path):
jobs = _workflow()['jobs']
scripts = {
kind: next(step['run'] for step in jobs[job]['steps'] if step.get('name') == 'Build and package')
- for kind, job in [('release', 'build-win32-release'), ('commit', 'build-win32-commit')]
+ for kind, job in [('release', 'build-win32-x64-release'), ('commit', 'build-win32-x64-commit')]
}
cases = [
('v0.28.0', '', True, 'release'),
diff --git a/tests/ci/test_tag_builds_summary.py b/tests/ci/test_tag_builds_summary.py
index d364cde402a..31974a33b5a 100644
--- a/tests/ci/test_tag_builds_summary.py
+++ b/tests/ci/test_tag_builds_summary.py
@@ -51,8 +51,10 @@ def test_admitted_failure_publishes_tag_info_without_promoting_channel(tmp_path,
gh.write_text(f'#!/bin/sh\nexec {shlex.quote(sys.executable)} {shlex.quote(str(driver))} "$@"\n')
gh.chmod(0o755)
needs = {name: {"result": "success"} for name in job["needs"]}
- needs["build-win32"]["result"] = "failure"
- needs["build-darwin"]["result"] = "failure"
+ needs["build-win32-x64"]["result"] = "failure"
+ needs["build-win32-arm64"]["result"] = "failure"
+ needs["build-darwin-arm64"]["result"] = "failure"
+ needs["build-darwin-x64"]["result"] = "failure"
needs["termux-deb"]["result"] = "failure"
needs["publish-win32-updater"]["result"] = "skipped"
result = shell_step(tmp_path, r2_server, "builds-table", "Render", {
@@ -69,7 +71,7 @@ def test_admitted_failure_publishes_tag_info_without_promoting_channel(tmp_path,
release_url = r2.public_url_for("https://github.com/o/r/releases/tag", tag)
assert f'href="{release_url}"' in page
assert "Build incomplete" in page
- assert "build-win32 (failure)" in page and "publish-win32-updater (skipped)" in page
+ assert "build-win32-x64 (failure)" in page and "publish-win32-updater (skipped)" in page
assert "No downloadable artifacts" in page
for name, info in needs.items():
if info["result"] != "success":
diff --git a/tests/ci/test_termux_input_archive.py b/tests/ci/test_termux_input_archive.py
index 05a799223cc..af08485e6a3 100644
--- a/tests/ci/test_termux_input_archive.py
+++ b/tests/ci/test_termux_input_archive.py
@@ -59,7 +59,7 @@ def test_archive_gate_uses_bootstrap_python_and_trusted_exact_revision():
assert validate["environment"] == "release-signing"
checkout = validate["steps"][0]
assert "actions/checkout" in checkout["uses"]
- for name in ("build-win32", "build-darwin", "termux-deb"):
+ for name in ("build-win32-x64", "build-darwin-arm64", "termux-deb"):
assert "archive-inputs" not in release[name].get("needs", [])
action = YAML(typ="base").load((ROOT / ".github/actions/setup-pm/action.yml").read_text(encoding="utf-8"))
diff --git a/tests/scripts/test_job_groups.py b/tests/scripts/test_job_groups.py
new file mode 100644
index 00000000000..05dfe14cc1c
--- /dev/null
+++ b/tests/scripts/test_job_groups.py
@@ -0,0 +1,60 @@
+"""Behavior contract for the `jobs` input parser (no workflow YAML is read)."""
+import pytest
+
+from scripts.releases.job_groups import ALL_JOBS, JOB_GROUPS, parse_jobs, phase_jobs, selects_all
+
+
+def test_the_default_selects_every_group():
+ for raw in (None, ALL_JOBS):
+ selected = parse_jobs(raw)
+ assert set(selected) == set(JOB_GROUPS)
+ assert all(selected.values())
+
+
+def test_one_group_selects_only_itself():
+ selected = parse_jobs("termux")
+ assert selected["termux"] is True
+ assert all(value is False for group, value in selected.items() if group != "termux")
+ selected = parse_jobs("darwin-arm64, win32-bundle")
+ assert selected == {**{group: False for group in JOB_GROUPS},
+ "darwin-arm64": True, "win32-bundle": True}
+
+
+def test_duplicates_unknown_names_and_empty_are_refused():
+ with pytest.raises(ValueError, match="duplicate"):
+ parse_jobs("darwin-arm64,darwin-arm64")
+ with pytest.raises(ValueError, match="unknown job group: mac"):
+ parse_jobs("mac")
+ with pytest.raises(ValueError, match="at least one group"):
+ parse_jobs("")
+ with pytest.raises(ValueError, match="empty group name"):
+ parse_jobs("termux,")
+ with pytest.raises(ValueError, match="unknown job group"):
+ parse_jobs("termux,smoke-win32")
+
+
+def test_selects_all_refuses_partial_selections():
+ assert selects_all(None) is True
+ assert selects_all(ALL_JOBS) is True
+ assert selects_all("termux") is False
+ assert selects_all("darwin-arm64,darwin-x64,win32-arm64,win32-x64") is False
+ with pytest.raises(ValueError):
+ selects_all("bogus")
+
+
+def test_phase_jobs_judge_only_the_selected_groups():
+ every = {group: True for group in JOB_GROUPS}
+ candidate = phase_jobs(every, "candidate")
+ assert candidate == ["validate", "build-darwin-arm64", "smoke-darwin-arm64",
+ "build-darwin-x64", "smoke-darwin-x64",
+ "build-win32-arm64", "smoke-win32-arm64",
+ "build-win32-x64", "smoke-win32-x64",
+ "assemble-win32-bundle", "termux-deb", "candidate-manifest"]
+ termux_only = {**{group: False for group in JOB_GROUPS}, "termux": True}
+ assert phase_jobs(termux_only, "candidate") == ["validate", "termux-deb"]
+ # candidate-manifest stays required only when every group it needs ran.
+ partial = {**{group: False for group in JOB_GROUPS}, "darwin-arm64": True}
+ assert phase_jobs(partial, "candidate") == ["validate", "build-darwin-arm64", "smoke-darwin-arm64"]
+ assert phase_jobs(every, "publish") == ["validate", "stable-publish", "stable-store"]
+ with pytest.raises(ValueError, match="Unknown release phase"):
+ phase_jobs(every, "promote")
diff --git a/tests/scripts/test_release_artifacts.py b/tests/scripts/test_release_artifacts.py
index 6a9349d97de..a82bb399176 100644
--- a/tests/scripts/test_release_artifacts.py
+++ b/tests/scripts/test_release_artifacts.py
@@ -22,7 +22,7 @@ from scripts.bundles import release_artifacts as artifacts
ROOT = Path(__file__).resolve().parents[2]
SMOKE_RESULTS = {name: {'result': 'success'} for name in (
- 'smoke-darwin', 'smoke-win32', 'smoke-win32-universal')}
+ 'smoke-darwin-arm64', 'smoke-darwin-x64', 'smoke-win32-arm64', 'smoke-win32-x64')}
RELEASE_EPOCH = 1_787_965_323
WINDOWS_VERSION = '2026.5761.123.0'
@@ -373,7 +373,7 @@ def test_candidate_smoke_admission_fails_before_publication(tmp_path, r2_server,
key = f"releases/tag/{manifest['archive']}/release-candidates.json"
raw = r2_server.store[key][0]
for fault, message in [('legacy', 'Candidate manifest'), ('missing', 'Candidate smoke results'),
- ('failed', 'smoke-win32=failure'), ('identity', 'release identity'),
+ ('failed', 'smoke-win32-x64=failure'), ('identity', 'release identity'),
('tampered', 'digest mismatch')]:
invalid = copy.deepcopy(manifest)
if fault == 'legacy':
@@ -382,7 +382,7 @@ def test_candidate_smoke_admission_fails_before_publication(tmp_path, r2_server,
elif fault == 'missing':
invalid.pop('smoke_results', None)
elif fault == 'failed':
- invalid['smoke_results'] = {**SMOKE_RESULTS, 'smoke-win32': {'result': 'failure'}}
+ invalid['smoke_results'] = {**SMOKE_RESULTS, 'smoke-win32-x64': {'result': 'failure'}}
else:
invalid['commit'] = 'b' * 40
data = json.dumps(invalid).encode()
diff --git a/tests/scripts/test_release_build_commit.py b/tests/scripts/test_release_build_commit.py
index fc114957503..a2cac370fd2 100644
--- a/tests/scripts/test_release_build_commit.py
+++ b/tests/scripts/test_release_build_commit.py
@@ -121,7 +121,7 @@ def test_commit_build_dispatch_is_repository_independent(fixture_repo):
expected = ['gh', 'workflow', 'run', 'desktop-bundled-release.yml',
'--ref', 'main', '--repo', 'fixture-owner/fixture-repo',
'-f', f'build_commit={tip}', '-f', 'tag=', '-f', 'upload_release=false',
- '-f', 'termux_only=false', '-f', 'termux_upgrade_from_tag=']
+ '-f', 'termux_upgrade_from_tag=']
result, calls = invoke('--build-commit', tip, '--publish')
assert result.returncode == 0, result.stderr
dispatches = [call for call in calls if call[1:3] == ['workflow', 'run']]
@@ -136,7 +136,7 @@ def test_commit_build_dispatch_is_repository_independent(fixture_repo):
assert dispatches == [['gh', 'workflow', 'run', 'desktop-bundled-release.yml',
'--ref', 'main', '--repo', 'NousResearch/hermes-agent',
'-f', f'build_commit={tip}', '-f', 'tag=', '-f', 'upload_release=false',
- '-f', 'termux_only=false', '-f', 'termux_upgrade_from_tag=']]
+ '-f', 'termux_upgrade_from_tag=']]
# (Fork-conditional removal) The disposable routing test retired with it: a
diff --git a/tests/scripts/test_render_builds_binding.py b/tests/scripts/test_render_builds_binding.py
index 95cd567861e..ef0dcaf568a 100644
--- a/tests/scripts/test_render_builds_binding.py
+++ b/tests/scripts/test_render_builds_binding.py
@@ -54,12 +54,13 @@ def test_failed_legs_from_release_needs(needs, expected):
def test_download_survives_smoke_failure_without_claiming_acceptance(state, status):
receipt = {'schema': 2, 'commit': SHA, 'name': 'win32-x64',
'files': [{'path': PACKAGE, 'size': 1, 'sha256': '0' * 64}]}
- needs = {} if state is None else {'smoke-win32': {'result': state}}
+ needs = {} if state is None else {'smoke-win32-x64': {'result': state}}
inputs = ([PREFIX + PACKAGE], 'https://cdn.example', SHA, {'win32-x64': receipt})
summary = rbt.render_commit_summary(*inputs, smoke_results=needs)
page = rbt.render_commit_page(SHA, inputs[0], inputs[1], inputs[3], smoke_results=needs)
- assert f'| Windows MSIX (arm64 and x64) | {status} |' in summary
- assert f'<td>Windows MSIX (arm64 and x64)</td><td>{status}</td>' in page
+ assert f'| Windows MSIX (x64) | {status} |' in summary
+ assert '| Windows MSIX (arm64) | Not run (no result) |' in summary
+ assert f'<td>Windows MSIX (x64)</td><td>{status}</td>' in page
for output in (summary, page):
assert '✅ Built' in output and 'https://cdn.example/' + PREFIX + PACKAGE in output
assert 'unsigned Store envelopes are not install-smoked' in output
diff --git a/tests/scripts/test_stable_release.py b/tests/scripts/test_stable_release.py
index fe3872d254b..d82577734fb 100644
--- a/tests/scripts/test_stable_release.py
+++ b/tests/scripts/test_stable_release.py
@@ -46,7 +46,7 @@ def candidates(tag, commit, digest, archive=None):
"archive": ref,
"packages": packages,
"smoke_results": {name: {"result": "success"} for name in (
- "smoke-darwin", "smoke-win32", "smoke-win32-universal")}}
+ "smoke-darwin-arm64", "smoke-darwin-x64", "smoke-win32-arm64", "smoke-win32-x64")}}
def test_gate_requires_every_success_including_real_cli(tmp_path):
@@ -149,6 +149,31 @@ def test_a_win32_bundle_receipt_with_one_arch_is_refused():
manifest["releaseEpoch"], archive="rc.2-v1.2.4")
+def test_a_receipt_is_accepted_without_smoke_results():
+ commit = "b" * 40
+ manifest = candidates("v1.2.4", commit, "2" * 64, archive="rc.2-v1.2.4")
+ for receipt, targets in RECEIPTS:
+ rows = _receipt_rows(manifest, targets)
+ # Receipts are staged before the smokes run; they carry no smoke results.
+ del rows["smoke_results"]
+ assert validate_receipt(rows, receipt, manifest["tag"], commit, BASE,
+ manifest["releaseEpoch"], archive="rc.2-v1.2.4")
+
+
+def test_the_final_manifest_still_requires_every_smoke_result():
+ commit = "b" * 40
+ manifest = candidates("v1.2.4", commit, "2" * 64, archive="rc.2-v1.2.4")
+ del manifest["smoke_results"]
+ with pytest.raises(ValueError, match="smoke"):
+ validate_candidates(manifest, manifest["tag"], commit, BASE,
+ manifest["releaseEpoch"], archive="rc.2-v1.2.4")
+ failed = candidates("v1.2.4", commit, "2" * 64, archive="rc.2-v1.2.4")
+ failed["smoke_results"]["smoke-win32-x64"] = {"result": "failure"}
+ with pytest.raises(ValueError, match="smoke-win32-x64=failure"):
+ validate_candidates(failed, failed["tag"], commit, BASE,
+ failed["releaseEpoch"], archive="rc.2-v1.2.4")
+
+
def test_an_unknown_receipt_is_refused():
commit = "b" * 40
manifest = candidates("v1.2.4", commit, "2" * 64, archive="rc.2-v1.2.4")