Repository navigation
ci: bound mini execution with parallel hosted macOS fallback #1126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
XuPeng-SH
merged 11 commits into
matrixorigin:main
from
loveRhythm1990:ci/macos-self-hosted-migration
Oct 24, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
baea7de
ci: migrate trusted macOS lanes to self-hosted ARM runners
loveRhythm1990 8ab8874
fix(ci): bound macOS routing and reconcile missing results
loveRhythm1990 3485fa4
fix(ci): recover missing Mac checks and parallelize hosted fallback
loveRhythm1990 50466af
fix(ci): enforce hosted rerun admission and link fork results
loveRhythm1990 92ad6e4
test(cli): make PTY draft setup independent of paste timing
loveRhythm1990 80ff991
fix(deps): remove vulnerable crypto-bigint paths from JWT and MySQL
loveRhythm1990 aedcee4
ci: route all macOS test jobs directly to self-hosted runners
loveRhythm1990 ca3fb5b
fix(ci): bootstrap repository Rust toolchain on self-hosted runners
loveRhythm1990 b7efd37
ci: select self-hosted macOS runners by contributor author ID
loveRhythm1990 8a40aaf
ci: bound mini queue time and restore parallel hosted fallback
loveRhythm1990 58b1c7f
fix(ci): isolate push runners and preserve compiler and run identity
loveRhythm1990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| self-hosted-runner: | ||
| labels: [mac-arm64-mini] | ||
| # GitHub supports cache-mode; actionlint 1.7.12 predates the syntax. | ||
| paths: | ||
| .github/workflows/macos-mini.yml: | ||
| ignore: | ||
| - 'unexpected key "cache-mode" for "workflow" section' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Install repository Rust toolchain | ||
| description: Bootstrap rustup and install the toolchain from rust-toolchain.toml | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install pinned Rust toolchain | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| ci_cargo_bin="${CARGO_HOME:-$HOME/.cargo}/bin" | ||
| export PATH="$ci_cargo_bin:$PATH" | ||
| if ! command -v rustup >/dev/null 2>&1; then | ||
| curl --proto '=https' --tlsv1.2 --retry 3 --location --silent --show-error --fail \ | ||
| https://sh.rustup.rs | sh -s -- --default-toolchain none --no-modify-path -y | ||
| fi | ||
| echo "$ci_cargo_bin" >> "$GITHUB_PATH" | ||
| # Resolve the repository pin rather than a runner service override. | ||
| unset RUSTUP_TOOLCHAIN | ||
| # Older rustup installs implicitly on show; newer versions require the | ||
| # explicit install. Both read the repository file, including components. | ||
| rustup show active-toolchain || rustup toolchain install | ||
| ci_rust_toolchain="$(rustup show active-toolchain)" | ||
| ci_rust_toolchain="${ci_rust_toolchain%% *}" | ||
| test -n "$ci_rust_toolchain" | ||
| export RUSTUP_TOOLCHAIN="$ci_rust_toolchain" | ||
| echo "RUSTUP_TOOLCHAIN=$RUSTUP_TOOLCHAIN" >> "$GITHUB_ENV" | ||
| rustc --version | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: macOS mini worker | ||
| run-name: Mac mini for Test Suite ${{ inputs.source_run_id }}/${{ inputs.source_attempt }} ${{ inputs.source_sha }} | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| source_run_id: | ||
| required: true | ||
| type: string | ||
| source_attempt: | ||
| required: true | ||
| type: string | ||
| source_sha: | ||
| required: true | ||
| type: string | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
| cache-mode: read | ||
| concurrency: | ||
| group: macos-mini-${{ inputs.source_run_id }}-${{ inputs.source_attempt }} | ||
| cancel-in-progress: false | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| env: | ||
| CARGO_INCREMENTAL: "0" | ||
| CARGO_TERM_COLOR: always | ||
| jobs: | ||
| execute: | ||
| runs-on: [self-hosted, macOS, ARM64, mac-arm64-mini] | ||
| timeout-minutes: 65 | ||
| steps: | ||
| - name: Checkout control policy | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| path: .ci-control | ||
| persist-credentials: false | ||
| - name: Validate mini dispatch | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| SOURCE_RUN_ID: ${{ inputs.source_run_id }} | ||
| SOURCE_ATTEMPT: ${{ inputs.source_attempt }} | ||
| SOURCE_SHA: ${{ inputs.source_sha }} | ||
| run: python3 .ci-control/scripts/ci/macos_dispatch.py admit --run-id "$SOURCE_RUN_ID" --attempt "$SOURCE_ATTEMPT" --sha "$SOURCE_SHA" | ||
| - name: Checkout candidate | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ inputs.source_sha }} | ||
| persist-credentials: false | ||
| - name: Prepare Rust | ||
| uses: ./.github/actions/rust-setup | ||
| with: | ||
| shared-key: ci-terminal-pty | ||
| save-cache: "false" | ||
| install-nextest: "false" | ||
| - name: Prepare Node | ||
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| - name: Run all macOS lanes | ||
| run: bash scripts/ci/run-macos-lanes.sh all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: macOS mini scheduler | ||
| on: | ||
| workflow_run: | ||
| workflows: [Test Suite] | ||
| types: [in_progress, completed] | ||
| permissions: | ||
| contents: read | ||
| actions: write | ||
| pull-requests: read | ||
| concurrency: | ||
| group: macos-scheduler-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }} | ||
| cancel-in-progress: false | ||
| jobs: | ||
| schedule: | ||
| if: github.event.workflow_run.run_attempt == 1 && github.event.workflow_run.event == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 70 | ||
| steps: | ||
| # Only the default-branch controller is loaded; it never executes PR code. | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
| - name: Schedule and bound the mini attempt | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| DISPATCH_MODE: ${{ github.event.action == 'completed' && 'cleanup' || 'schedule' }} | ||
| SOURCE_RUN_ID: ${{ github.event.workflow_run.id }} | ||
| SOURCE_ATTEMPT: ${{ github.event.workflow_run.run_attempt }} | ||
| run: python3 scripts/ci/macos_dispatch.py "$DISPATCH_MODE" --run-id "$SOURCE_RUN_ID" --attempt "$SOURCE_ATTEMPT" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.