Skip to content

Speed up GH build pipeline #3813

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
merged 10 commits into from
Jun 6, 2025
Merged

Conversation

finestructure
Copy link
Member

@finestructure finestructure commented May 30, 2025

Unfortunately, we can't benefit from this new flag that uses pre-built SwiftSyntax libraries at the moment.

Due to our dependence on SwiftPM's branch release/6.1, we depend on SwiftSyntax release/6.1, which does not have a prebuilt library and we end up building it ourselves, as before 😞

@finestructure
Copy link
Member Author

I've asked on the forums if prebuilts might become available for release/6.1. If not, that's another reason to try and drop SwiftPM as a dependency.

https://forums.swift.org/t/preview-swift-syntax-prebuilts-for-macros/80202/21

@finestructure
Copy link
Member Author

finestructure commented May 30, 2025

Actually, this might work. We have good reason to fork SwiftPM already - there are two open PRs we need and they're unlikely to be be merged and cherrypicked to release/6.1 anyway:

Especially the latter we need. We are currently not getting Postgres-NIO package updates due to that.

So since we need that fork, we might as well change SwiftPM's dependency on SwiftSyntax to a release version that has a prebuilt instead of the release/6.1 branch. For what we actually use from SwiftPM this will make no difference.

@finestructure finestructure reopened this May 30, 2025
@finestructure finestructure force-pushed the enable-experimental-prebuilts branch from 3da5237 to 02e010f Compare May 30, 2025 11:22
@finestructure
Copy link
Member Author

I'm not sure if this is working at the moment. Not sure if it's still the wrong SwiftSyntax version or something else. We're getting

CleanShot 2025-05-30 at 14 00 52@2x

on this branch here, vs

CleanShot 2025-05-30 at 14 01 18@2x

on main. The release build is ~10% faster, true, but this might just be jitter?

@finestructure finestructure force-pushed the enable-experimental-prebuilts branch from 02e010f to 09def83 Compare June 5, 2025 14:43
@MahdiBM
Copy link

MahdiBM commented Jun 5, 2025

I just bumped into this PR and I want to shamelessly plug this article we published yesterday: https://swiftonserver.com/faster-github-actions-ci-for-swift-projects/

I believe it'll have a way bigger impact on your build times than using prebuilts, although they don't contradict eachother.
I'd say it'll lower both build times to less than 5 mins, possibly even around 3 mins.

@finestructure
Copy link
Member Author

Ah, that looks very interesting! I’ve been meaning to look into caching and his seems to be exactly what we need :) Thanks @MahdiBM !

@finestructure finestructure force-pushed the enable-experimental-prebuilts branch from 09def83 to f7e27f7 Compare June 6, 2025 09:50
@finestructure
Copy link
Member Author

Ok, this works great (down from ~17min, see above)

CleanShot 2025-06-06 at 12 45 55@2x

@finestructure
Copy link
Member Author

Much better, now QueryPerformaceTests is the bottle neck

CleanShot 2025-06-06 at 13 28 17@2x

@finestructure finestructure changed the title Enable experimental prebuilts Speed up GH build pipeline Jun 6, 2025
@finestructure
Copy link
Member Author

End result:

CleanShot 2025-06-06 at 14 07 13@2x
CleanShot 2025-06-06 at 14 07 24@2x

@finestructure finestructure marked this pull request as ready for review June 6, 2025 12:07
@finestructure finestructure enabled auto-merge June 6, 2025 12:08
@finestructure finestructure requested a review from daveverwer June 6, 2025 12:08
@finestructure finestructure merged commit 5e0acb5 into main Jun 6, 2025
6 checks passed
@finestructure finestructure deleted the enable-experimental-prebuilts branch June 6, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants