[PM-33025] ci: Speed up Test workflows#2739
Conversation
# Conflicts: # .github/workflows/test-bwa.yml # .github/workflows/test.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2739 +/- ##
==========================================
- Coverage 80.79% 78.54% -2.25%
==========================================
Files 1019 1142 +123
Lines 64854 72208 +7354
==========================================
+ Hits 52400 56718 +4318
- Misses 12454 15490 +3036 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # project-bwth.yml
withinfocus
left a comment
There was a problem hiding this comment.
Early review, since I was analyzing this for Actions approvals:
- Keep
actions/cache(combined) for Mint and SPM. They're stable, lockfile-keyed, small, and the combined action already avoids re-saving them. Converting them adds two extra steps each and abandons the familiar, post-phase-managed pattern for no benefit. Thesavesteps the PR adds for them are gatedcache-hit != 'true'andref == mainwhich is functionally close to what the combined action already did on its own, minus the PR-branch save (and PR-branch saves of a lockfile-hashed cache are cheap and rare anyway). - Use the
restore/savesplit only forDerivedData, where it's load-bearing.
Does DerivedData need to be keyed by github.sha at all though? The per-SHA key is what forces the manual save. If a more stable key were viable (it usually isn't for DerivedData, since it depends on all sources -- this is why incremental-build caches universally use prefix+save-control), the whole manual apparatus would dissolve.
Only changed those too because I found that wasn't the case, between renovate PRs, SDK updates and team PRs that modified these files a big chunk of those caches came from branches other than
Any ideas? Currently it's trying to avoid the same issue we had with the other caches, save step |
Makes sense and is justified then.
I vibed a bit on this one and alas, no, so you're on the right track most likely. Said vibe:
|
🎟️ Tracking
PM-33025
📔 Objective
Test workflows tune-up inbound! While at it, updated the branch name patterns too. In my testing, some of these changes didn't net obvious runtime gains but they may require merging to main first and analysing future runs.
Performance improvements I confirmed had immediate gains:
mainbranch cache.Improvements that need further testing:
IgnoreFileSystemDeviceInodeChangesso Xcode treats restored DerivedData files as up-to-date - source: https://stackoverflow.com/questions/53753511/is-it-possible-to-copy-an-xcode-derived-data-cacheChanges that were tested but removed:
IgnoreFileSystemDeviceInodeChangesis enough to deal with this. If not, we should look into using the original python script instead of introducing an action: https://github.com/MestreLion/git-tools/blob/main/git-restore-mtime