Skip to content

ci: Optimize CI runtime/cost by introducing fast-fail sequencing and path-based gating for expensive jobs#10015

Open
vincentkoc wants to merge 4 commits intoopenclaw:mainfrom
vincentkoc:vk/improve-ci-cd
Open

ci: Optimize CI runtime/cost by introducing fast-fail sequencing and path-based gating for expensive jobs#10015
vincentkoc wants to merge 4 commits intoopenclaw:mainfrom
vincentkoc:vk/improve-ci-cd

Conversation

@vincentkoc
Copy link
Contributor

@vincentkoc vincentkoc commented Feb 6, 2026

CI now runs a fast core gate first and only runs heavy suites when changes touch runtime code. This reduces wasted runner time/cost and skips expensive jobs for docs-only PRs which is now locking github due to high volume PRs.

Changes

  • Added workflow concurrency cancellation to stop superseded runs: group: ci-${{ github.workflow }}-${{ github.ref }} and cancel-in-progress: true
  • Added a changes job using dorny/paths-filter@v3 with output run_expensive.
  • run_expensive is true only for runtime-impacting paths (for example: src/**, extensions/**, apps/**, workflows/config/lock/build files).
  • Split CI checks into: checks-core (always): pnpm protocol:check, pnpm format and checks-full (conditional): pnpm tsgo, pnpm build && pnpm lint, node vitest, bun vitest
  • Made checks-full depend on and run after core checks: needs: [checks-core, changes] and if: needs.changes.outputs.run_expensive == 'true'
  • Gated expensive platform jobs behind checks-full + changes: checks-windows, checks-macos, macos-app, android
  • Preserved existing PR-only conditions for macOS jobs.

New Workflow

image

Greptile Overview

Greptile Summary

This PR refactors .github/workflows/ci.yml to reduce CI runtime/cost by adding (1) workflow-level concurrency cancellation, (2) a changes job using dorny/paths-filter@v3 to decide whether to run expensive suites, and (3) splitting checks into an always-on checks-core gate (protocol + format) and a conditional checks-full gate (tsgo/build+lint/tests) that runs only when run_expensive is true. Expensive platform jobs (Windows/macOS/macOS app/Android) are then gated behind checks-full + the path filter output, while preserving PR-only behavior for macOS jobs.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Reviewed the full updated ci.yml and compared to the prior workflow; the earlier blocking issues (concurrency collision, missing checkout for paths-filter, and push-event gating) appear addressed in this commit. The remaining changes are straightforward job splitting and conditional gating without introducing obvious broken references or invalid expressions.
  • No files require special attention

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@vincentkoc
Copy link
Contributor Author

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@vincentkoc
Copy link
Contributor Author

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@vincentkoc
Copy link
Contributor Author

@greptileai

@vincentkoc
Copy link
Contributor Author

Rebase in progress, will ping another comment in next few minutes once completed and remove this comment.

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.

1 participant

Comments