Browse Source

Merge pull request #4033 from icsharpcode/decompiler-tests-server-gc

Use server GC for the decompiler test suite (workstation GC on the shared Windows CI runner)
pull/4036/head
Christoph Wille 4 weeks ago committed by GitHub
parent
commit
c2fd475d25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      .github/workflows/build-ilspy.yml
  2. 6
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

7
.github/workflows/build-ilspy.yml

@ -99,6 +99,13 @@ jobs: @@ -99,6 +99,13 @@ jobs:
- name: Execute unit tests
id: unit-tests
# All test hosts of the solution run concurrently on a 4-core runner. Server GC (enabled by
# ICSharpCode.Decompiler.Tests for machines it has to itself) keeps that host at 100% CPU
# and starves the neighbours: the process-module walks in ILSpy.Tests.Windows blow their
# 60 s budget and ILSpy.Tests takes almost twice as long, while the decompiler suite itself
# gains little here. The environment variable overrides the runtimeconfig setting.
env:
DOTNET_gcServer: 0
run: >
dotnet test --solution ilspy.sln
--configuration ${{ matrix.configuration }}

6
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -18,6 +18,12 @@ @@ -18,6 +18,12 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<!-- The suite runs dozens of allocation-heavy decompiles concurrently (one NUnit worker per
logical CPU, each roundtrip adding WholeProjectDecompiler's own Parallel.ForEach). Workstation
GC stops the whole process for every gen0/gen1 collection any worker triggers; measured on a
24-thread machine that was ~300 s of pause in a ~550 s run. Server GC gives each core its own
heap and collects in parallel. -->
<ServerGarbageCollection>true</ServerGarbageCollection>
<!-- NU1902/1903 are "Package 'X' has a known security vulnerability". In our tests, we don't care. -->
<!-- CA1416 fires because the TFM dropped its -windows suffix: Windows-only helpers (SdkUtility,
Tester.SignAssembly/FindMSBuild/RunWithTestRunner) and Windows-only test inputs (Console.CapsLock

Loading…
Cancel
Save