-
Notifications
You must be signed in to change notification settings - Fork 541
Description
Description:
We just recently upgraded to v3 of this action and it resulted in significantly slower dotnet builds. NOTE: It's not the setup-dotnet action that is slow, but the subsequent build step.
Task version:
v2 is fast, v3.0.0 is slow
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Repro steps:
I created a small workflow that demonstrates the problem: https://github.com/dylan-smith/setup-dotnet-repro/blob/main/.github/workflows/blank.yml
It has a build-v2 job and a build-v3 job, the only difference is the version of the setup-dotnet task in them. All they do is checkout a dotnet repo, setup-dotnet, then run a dotnet publish command. The dotnet publish command is significantly slower when setup-dotnet@v3 is used.
steps:
- uses: actions/checkout@v3
with:
repository: github/gh-gei
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet publish src/ado2gh/ado2gh.csproj -c Release -o dist/win-x64/ -r win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true
Windows/Ubuntu runners are more than 2x as slow when using setup-dotnet@v3. Mac runners don't seem to be affected.
Ubuntu: 47s -> 97s
Windows: 96s -> 256s
Mac: 135s -> 139s
The workflow run/logs can be seen here: https://github.com/dylan-smith/setup-dotnet-repro/actions/runs/4609178383
Expected behavior:
I wouldn't expect the version of setup-dotnet to affect dotnet build times, or if it did I would expect newer versions to improve build perf not decrease it.
