Skip to content

ci: skip macOS rust unless native paths change - #119

Open
DevVig wants to merge 1 commit into
mainfrom
ci/speed-fixes
Open

DevVig wants to merge 1 commit into
mainfrom
ci/speed-fixes

Conversation

@DevVig

@DevVig DevVig commented Oct 29, 2026

Copy link
Copy Markdown
Owner

What

Run the expensive macos-latest rust cargo job only on push to main or when a PR touches Rust, Tauri, or this workflow. Keep the required check rust (macos-latest) reporting success on every other PR.

Why

rust (macos-latest) is a required Protect-main check, so the matrix leg was running on every PR — including docs, adapters, and UI-only changes. Audit (section g): 0.8 min typical / 2.8 min on heavier PRs; about 5–17 macOS minutes/month in the sample (6 PR runs).

How

  • changes job diffs the PR against its base (always macos=true on push to main).
  • Paths that run real macOS rust: crates/, root Cargo.toml/Cargo.lock, rust-toolchain.toml, apps/microbridge-ui/src-tauri/, .github/workflows/ci.yml, plus .cargo/ / rustfmt.toml / clippy.toml if added later.
  • Linux rust stays rust (ubuntu-latest) on every PR (matrix is ubuntu-only).
  • Separate job named rust (macos-latest) always runs so the required check is never skipped. It uses macos-latest when changes.macos is true; otherwise it reports success on ubuntu-latest in a few seconds.

A job-level if: that skipped this job would leave the required check unreported and block merge. Step-level if plus a conditional runs-on keeps the name stable.

How was this tested?

  • Path-filter regex checked against representative paths (crates/Tauri/ci.yml match; docs/UI/adapters/Formula do not).
  • Workflow YAML structure: rust (macos-latest) has no job-level if; ubuntu matrix no longer includes macos-latest.
  • This PR changes ci.yml, so CI will exercise the real macOS rust path. The skip path will show up on later docs/UI/adapter-only PRs.

Savings

Before After (skip)
Per PR without native changes 0.8–2.8 min macos-latest ~seconds on ubuntu
Sample month (6 PRs) ~5–17 macOS minutes macOS only when Rust/Tauri/ci.yml change (this PR, cargo Dependabot, native work)

UI/adapter Dependabot PRs skip macOS; cargo Dependabot still runs it.

Not in this PR

Checklist

  • No application code; workflow YAML only
  • Protocol changes update both mb-protocol and docs/protocol.md
  • Adapter PRs: the adapter checklist is satisfied
  • Nothing added to the daemon's idle footprint (CPU, RSS, network)
Open in Web Open in Cursor 

Keep the required check rust (macos-latest) reporting on every PR, but run
the macos-latest cargo job only on push to main or when Rust, Tauri, or
this workflow change.

Co-authored-by: Jonathan Borgwing <DevVig@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 01:38
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 101 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6d2bb156-44a0-4df2-b936-5ac0afa5a691
Commits

Reviewing files that changed from the base of the PR and between 09f8edd and 00e6e0d.

Files selected for processing: 1
  • .github/workflows/ci.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants