Skip to content

Conversation

philprime
Copy link
Member

@philprime philprime commented Aug 27, 2025

📜 Description

Migrates the build.yml workflow to use dorny/paths-filter for conditional execution on pull requests and introduces a build-required-check job for branch protection.

💡 Motivation and Context

This is part of the ongoing effort (see #5951) to replace on.pull_request.paths filtering with files-changed jobs. The aim is to optimize CI runs by only executing build jobs when relevant files change, while ensuring a consistent required check for branch protection rules. This implementation follows the pattern established in #5893 for tests.yml and api-stability.yml.

💚 How did you test it?

The changes were implemented by following the exact pattern from existing workflows (auto-update-tools.yml, tests.yml, api-stability.yml). The [skip ci] keyword was used in the commit message to prevent immediate CI runs during the migration. The expected behavior is that the build workflow will now run conditionally for pull requests based on file changes and provide a reliable required check.

Fixes #5956

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

Open in Cursor Open in Web

#skip-changelog

- Add run_build_for_prs filter to .github/file-filters.yml containing all paths from build.yml's current pull_request paths
- Remove paths filtering from build.yml so workflow runs always for all pull requests
- Add files-changed job that detects file changes using the new filter
- Make all main jobs conditional with file change detection and needs dependency
- Add build-required-check job at end that validates completion using if: always() pattern
- Follow exact pattern from api-stability.yml and test.yml workflows

This enables reliable required checks for build workflow that can be used in branch protection rules.
@philprime philprime self-assigned this Aug 27, 2025
@philprime philprime marked this pull request as ready for review August 27, 2025 17:43
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.723%. Comparing base (9cbff30) to head (623f6b2).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5997       +/-   ##
=============================================
+ Coverage   86.682%   86.723%   +0.040%     
=============================================
  Files          424       424               
  Lines        36712     36712               
  Branches     17356     17358        +2     
=============================================
+ Hits         31823     31838       +15     
+ Misses        4841      4830       -11     
+ Partials        48        44        -4     

see 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cbff30...623f6b2. Read the comment docs.

@philprime philprime enabled auto-merge (squash) August 28, 2025 14:26
@philprime philprime merged commit daeb716 into main Aug 28, 2025
142 checks passed
@philprime philprime deleted the cursor/implement-required-checks-for-build-workflow-6f49 branch August 28, 2025 14:44
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1237.08 ms 1259.31 ms 22.22 ms
Size 23.75 KiB 928.15 KiB 904.40 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
748df9d 1231.63 ms 1259.47 ms 27.84 ms
9e6569a 1216.07 ms 1242.50 ms 26.43 ms
45482a6 1225.88 ms 1254.27 ms 28.39 ms
aa0b738 1236.78 ms 1253.08 ms 16.31 ms
a3dfd57 1230.78 ms 1244.91 ms 14.14 ms
1936411 1231.51 ms 1253.27 ms 21.76 ms
ccf1278 1226.84 ms 1248.51 ms 21.67 ms
884b224 1221.11 ms 1255.88 ms 34.77 ms
605fa27 1226.31 ms 1251.35 ms 25.05 ms
a2a3bfb 1227.94 ms 1261.26 ms 33.32 ms

App size

Revision Plain With Sentry Diff
748df9d 23.75 KiB 902.48 KiB 878.74 KiB
9e6569a 23.75 KiB 904.54 KiB 880.79 KiB
45482a6 23.75 KiB 919.91 KiB 896.16 KiB
aa0b738 23.74 KiB 872.75 KiB 849.00 KiB
a3dfd57 23.75 KiB 913.63 KiB 889.87 KiB
1936411 23.74 KiB 913.39 KiB 889.64 KiB
ccf1278 23.75 KiB 877.15 KiB 853.40 KiB
884b224 23.75 KiB 879.55 KiB 855.80 KiB
605fa27 23.75 KiB 908.03 KiB 884.28 KiB
a2a3bfb 23.75 KiB 872.67 KiB 848.92 KiB

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.

chore(ci): Add required checks job for build
3 participants