Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ on:
required: false
default: ""
type: string
# Set only when pr_runner is persistent: the jobs of attempt 1 that take
# it, as " <key> <key> ". Every other job takes pr_retry_runner, so a
# run can use the owned machines that are free and overflow the rest
# (pr_runner_pool.py, CI_PR_POOL_OWNED_SPLIT).
pr_owned_jobs:
required: false
default: ""
type: string
pr_xcode_app:
required: false
default: ""
Expand Down Expand Up @@ -134,7 +142,7 @@ jobs:
# compile on the pool and Xcode seed-derived-data.yml builds with, so both
# can adopt its DerivedData seed below. Merge groups and dispatches on
# other branches keep the macos-15 lane.
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && (github.run_attempt > 1 && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && ((github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' admission ')) && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
# A changed-suites run adds its tests after the compile: the same
# 30-minute batch ceiling the separate worker had.
timeout-minutes: ${{ inputs.unit_in_admission == 'true' && 105 || 75 }}
Expand Down Expand Up @@ -177,7 +185,7 @@ jobs:
# keys on the toolchain and the build path instead, so a product built
# here at the canonical root matches on any pool with the same Xcode.
# The macOS runner guard still requires it to track runs-on.
CMUX_PRODUCT_RUNNER: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && (github.run_attempt > 1 && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
CMUX_PRODUCT_RUNNER: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && ((github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' admission ')) && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
# What the changed-suites steps at the end of this job read, with the
# values `app-host unit tests` gives its changed-suites worker, shard 8.
# The compile reads none of them: it runs plain xcodebuild and bakes the
Expand Down Expand Up @@ -1231,9 +1239,11 @@ jobs:
# compile admission to macOS 26. To spread shards over providers again,
# every pool involved must carry the admission's exact Xcode; the
# restore step refuses an older one with both versions named.
# A re-run of failed shards after compile admission passed on an owned
# pool keeps its outputs; pr_retry_runner moves them to Blacksmith.
runs-on: ${{ github.run_attempt > 1 && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
# When compile admission ran on an owned pool, a shard the picker did not
# place there (no machine left, or CI_PR_POOL_OWNED_GUI=0), and a re-run
# of failed shards, take pr_retry_runner: Blacksmith on the lane's Xcode,
# which is the Xcode the owned label names.
runs-on: ${{ (github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, format(' shard-{0} ', matrix.shard))) && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
timeout-minutes: 75
strategy:
# A pull request wants every shard's failures in one run. A merge group
Expand Down Expand Up @@ -1315,7 +1325,7 @@ jobs:
- name: Verify GitHub-hosted route
env:
RUNNER_ENVIRONMENT: ${{ runner.environment }}
REQUESTED_RUNNER: ${{ github.run_attempt > 1 && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
REQUESTED_RUNNER: ${{ (github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, format(' shard-{0} ', matrix.shard))) && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
RUNNER_CONTEXT_NAME: ${{ runner.name }}
run: |
set -euo pipefail
Expand Down Expand Up @@ -2227,8 +2237,9 @@ jobs:
# and no GUI console session. It still needs the compiled product, so it
# reuses macos-compile-admission's artifact like the app-host shards do,
# on the pool and Xcode that built it: the test bundle only loads under
# the Xcode that linked it.
runs-on: ${{ github.run_attempt > 1 && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
# the Xcode that linked it. On an owned-pool run it may take
# pr_retry_runner instead, as the shards do.
runs-on: ${{ (github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' cli-product ')) && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
timeout-minutes: 40
env:
CMUX_NODE_PRODUCT_CACHE_ROOT: ${{ vars.CMUX_NODE_PRODUCT_CACHE_ROOT }}
Expand All @@ -2244,7 +2255,7 @@ jobs:
- name: Verify GitHub-hosted route
env:
RUNNER_ENVIRONMENT: ${{ runner.environment }}
REQUESTED_RUNNER: ${{ github.run_attempt > 1 && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
REQUESTED_RUNNER: ${{ (github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' cli-product ')) && inputs.pr_retry_runner || needs.macos-compile-admission.outputs.runner }}
RUNNER_CONTEXT_NAME: ${{ runner.name }}
run: |
set -euo pipefail
Expand Down Expand Up @@ -2995,7 +3006,7 @@ jobs:
# full-suite dispatch follows admission onto the pull-request pool and
# Xcode. The product consumer guard in the CI change-area tests fails when
# the two drift.
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && (github.run_attempt > 1 && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_DISPLAY || 'blacksmith-6vcpu-macos-15') }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && ((github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' lag ')) && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_DISPLAY || 'blacksmith-6vcpu-macos-15') }}
timeout-minutes: 75
env:
CMUX_NODE_PRODUCT_CACHE_ROOT: ${{ vars.CMUX_NODE_PRODUCT_CACHE_ROOT }}
Expand All @@ -3008,7 +3019,7 @@ jobs:
steps:
- name: Validate display runner identity
env:
REQUESTED_RUNNER: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && (github.run_attempt > 1 && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_DISPLAY || 'blacksmith-6vcpu-macos-15') }}
REQUESTED_RUNNER: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') && ((github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' lag ')) && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_DISPLAY || 'blacksmith-6vcpu-macos-15') }}
RUNNER_CONTEXT_NAME: ${{ runner.name }}
run: |
set -euo pipefail
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,17 @@ jobs:
unit_strict_steps: ${{ steps.suite.outputs.unit_strict_steps }}
# Only ever true for a changed-suites run the diff selected, which never
# takes the canary drop above.
unit_in_admission: ${{ steps.suite.outputs.unit_in_admission }}
# A compile admission on an owned Mac never runs app-host suites: glaeda
# gives it the compile token, not the gui token, so the suites would
# collide with a GUI shard on the same mini. The changed suites run on
# the one shard (shard 8) instead, owned or Blacksmith (pr_runner_pool.py).
unit_in_admission: ${{ steps.macos-pool.outputs.persistent != 'true' && steps.suite.outputs.unit_in_admission || 'false' }}
coverage_gap: ${{ steps.suite.outputs.coverage_gap }}
compile_admitted: ${{ steps.unchanged_inputs.outputs.compile_admitted == 'true' && 'true' || steps.admitted.outputs.compile_admitted }}
source_parent1: ${{ steps.source-identity.outputs.parent1 }}
# The macOS pool every pull-request macOS job in this run uses, chosen
# once so a run is never split across pools (see pr_runner_pool.py).
# once so a Blacksmith run is never split across pools. On an owned pool
# only the jobs in macos_pr_owned_jobs take it (see pr_runner_pool.py).
# Empty keeps each job's own MACOS_RUNNER_PR fallback: every event but a
# pull request, and any uncertainty.
macos_pr_runner: ${{ steps.macos-pool.outputs.runner }}
Expand All @@ -90,6 +95,9 @@ jobs:
# a re-run of failed jobs takes, since it reuses these outputs and must
# not queue on the owned pool unwatched.
macos_pr_retry_runner: ${{ steps.macos-pool.outputs.retry_runner }}
# Set only when the pool is persistent: the jobs of attempt 1 that take
# it (" admission shard-1 ... "); every other job takes the retry runner.
macos_pr_owned_jobs: ${{ steps.macos-pool.outputs.owned_jobs }}
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -590,6 +598,11 @@ jobs:
# Xcode whose version names their label (glaeda-std-xcode-26.6).
POOL_OWNED: ${{ vars.CI_PR_POOL_OWNED }}
OWNED_SLOTS: ${{ vars.CI_OWNED_POOL_SLOTS }}
# 1 lets a run take the owned machines that are free and send its
# other jobs to Blacksmith, instead of all or nothing (off unless 1).
POOL_OWNED_SPLIT: ${{ vars.CI_PR_POOL_OWNED_SPLIT }}
# 0 keeps GUI jobs (app-host shards, tests-build-and-lag) off them.
POOL_OWNED_GUI: ${{ vars.CI_PR_POOL_OWNED_GUI }}
CMUX_CI_XCODE_APP_PR: ${{ github.event.pull_request.head.repo.full_name == github.repository && vars.CMUX_CI_XCODE_APP_PR || '' }}
# Handed to the macOS 15 pool's jobs only when the run lands there.
CMUX_CI_XCODE_APP_MACOS_15: ${{ vars.CMUX_CI_XCODE_APP_MACOS_15 }}
Expand All @@ -599,6 +612,7 @@ jobs:
RUN_FULL_SUITE: ${{ steps.suite.outputs.full_suite }}
RUN_UNIT_SUITE: ${{ steps.suite.outputs.unit_suite }}
RUN_UNIT_IN_ADMISSION: ${{ steps.suite.outputs.unit_in_admission }}
RUN_UNIT_SELECTORS: ${{ steps.suite.outputs.unit_selectors }}
RUN_CLAUDE_WRAPPER: ${{ steps.standalone.outputs.claude_wrapper }}
RUN_CLI: ${{ steps.detect.outputs.cli }}
RUN_REMOTE_DAEMON: ${{ steps.standalone.outputs.remote_daemon }}
Expand Down Expand Up @@ -911,6 +925,7 @@ jobs:
with:
pr_runner: ${{ needs.changes.outputs.macos_pr_runner }}
pr_retry_runner: ${{ needs.changes.outputs.macos_pr_retry_runner }}
pr_owned_jobs: ${{ needs.changes.outputs.macos_pr_owned_jobs }}
native_tests: ${{ needs.changes.outputs.remote_daemon_native == 'true' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}

cli:
Expand All @@ -920,6 +935,7 @@ jobs:
with:
pr_runner: ${{ needs.changes.outputs.macos_pr_runner }}
pr_retry_runner: ${{ needs.changes.outputs.macos_pr_retry_runner }}
pr_owned_jobs: ${{ needs.changes.outputs.macos_pr_owned_jobs }}
pr_xcode_app: ${{ needs.changes.outputs.macos_pr_xcode_app }}

web:
Expand All @@ -936,7 +952,7 @@ jobs:
name: Claude wrapper regressions
needs: [changes, static-preflight]
if: ${{ !cancelled() && needs.changes.result == 'success' && needs.static-preflight.result == 'success' && (needs.changes.outputs.claude_wrapper == 'true' || (needs.changes.outputs.macos == 'true' && needs.changes.outputs.full_suite == 'true')) }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(needs.changes.outputs.macos_pr_runner, 'blacksmith-') && needs.changes.outputs.macos_pr_runner || 'blacksmith-6vcpu-macos-15') || github.event_name == 'pull_request' && github.run_attempt > 1 && needs.changes.outputs.macos_pr_retry_runner || github.event_name == 'pull_request' && (needs.changes.outputs.macos_pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(needs.changes.outputs.macos_pr_runner, 'blacksmith-') && needs.changes.outputs.macos_pr_runner || 'blacksmith-6vcpu-macos-15') || github.event_name == 'pull_request' && (github.run_attempt > 1 || !contains(needs.changes.outputs.macos_pr_owned_jobs, ' claude-wrapper ')) && needs.changes.outputs.macos_pr_retry_runner || github.event_name == 'pull_request' && (needs.changes.outputs.macos_pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
timeout-minutes: 10
steps:
- name: Checkout wrapper and test inputs
Expand Down Expand Up @@ -1071,6 +1087,7 @@ jobs:
release_archs: ${{ inputs.release_archs }}
pr_runner: ${{ needs.changes.outputs.macos_pr_runner }}
pr_retry_runner: ${{ needs.changes.outputs.macos_pr_retry_runner }}
pr_owned_jobs: ${{ needs.changes.outputs.macos_pr_owned_jobs }}
pr_xcode_app: ${{ needs.changes.outputs.macos_pr_xcode_app }}

tests:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/cli-pipe-regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ on:
required: false
default: ""
type: string
# Set only when pr_runner is persistent: the jobs of attempt 1 that take
# it, as " <key> <key> ". Every other job takes pr_retry_runner, so a
# run can use the owned machines that are free and overflow the rest
# (pr_runner_pool.py, CI_PR_POOL_OWNED_SPLIT).
pr_owned_jobs:
required: false
default: ""
type: string
pr_xcode_app:
required: false
default: ""
Expand All @@ -33,7 +41,7 @@ concurrency:

jobs:
cli-pipe-regressions:
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || github.event_name == 'pull_request' && (github.run_attempt > 1 && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'macos-26' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (startsWith(inputs.pr_runner, 'blacksmith-') && inputs.pr_runner || 'blacksmith-6vcpu-macos-15') || github.event_name == 'pull_request' && ((github.run_attempt > 1 || !contains(inputs.pr_owned_jobs, ' cli-pipe ')) && inputs.pr_retry_runner || inputs.pr_runner || vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15') || vars.CI_PAID_MACOS_OVERFLOW == '1' && vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15') }}
timeout-minutes: 30
env:
CMUX_CI_XCODE_APP: ${{ github.event_name == 'pull_request' && (inputs.pr_xcode_app || github.event.pull_request.head.repo.full_name == github.repository && vars.CMUX_CI_XCODE_APP_PR || vars.CMUX_CI_XCODE_APP_MACOS_15) || vars.CMUX_CI_XCODE_APP_MACOS_15 }}
Expand Down
Loading
Loading