-
-
Notifications
You must be signed in to change notification settings - Fork 117
ci: switch to fast-actions/setup-dotnet for better performance
#1806
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey @xC0dex thanks for the PR. Cool initiative for sure. I am not sure if the action for us brings much benefit. Checking our setup time for dotnet, it ranges from around 3 seconds on linux/macos to 13 seconds on Windows. So we would optimize for the smaller chunk of 3% of our runtime at best. If you are checking against the initial run on this PR, it is even slower (maybe due to caching, ...). So right now, we can keep an eye on your new action, but I don't see any major benefit for us ATM. |
|
Hey @linkdotnet, Thanks a lot for the feedback, it’s greatly appreciated.
I’m curious where these numbers come from, because I’m seeing higher timings in recent runs. For example, this run (current action) shows 21 seconds: And this one (new action) shows 16 seconds: It’s also worth noting that the very first run needs to upload the cache. All subsequent runs are faster. I ran some benchmarks using a similar setup, and here are the results:
|
|
Yeah :D maybe I was a bit tooooo lucky :D I assume also that there is some caching in the "official" version. |
|
Here other two runs: <10 seconds each. The >20s might be because it was the first run after the monthly patch update. |
|
That's interesting. Thanks for sharing. I fully understand that there is no need for bUnit to switch 👍 It's probably more interesting if you have to pay for the execution time. |
Ah good to know. I really appreciate that you took the time and even went forward and did the implementation and I still think that it fills a gap! For sure, something I will keep an eye on! |

Pull request description
This PR switches from the
actions/setup-dotnetGitHub Action tofast-actions/setup-dotnetto improve performance and reduce setup time.bUnit is a multi-targeted project, and the current workflow downloads three full SDKs (10, 9, and 8). In practice, bUnit only requires the latest SDK, along with the .NET 8 and 9 Runtimes, to run its tests. The existing setup also requires maintaining both a
global.jsonfile and explicit SDK version inputs, which adds unnecessary duplication.fast-actions/setup-dotnetsupports decoupling SDK and Runtime installation and integrates cleanly with global.json, simplifying the configuration.This PR introduces the following changes:
fast-actions/-setupinstead ofactions/setup-dotnetglobal.jsonto determine the SDK versionaspnetcore-versionto install the required runtimesOf course, I completely understand if you'd prefer not to rely on a lesser-known GitHub Action.
PR meta checklist
mainbranch for codeor targeted at
stablebranch for documentation that is live on bunit.dev.Code PR specific checklist