Skip to content

Commit b1424a2

Browse files
authored
V7 generator - Update workflow to address parallelism issues for windows-latest during build (#1229)
* No longer GeneratePackageOnBuild * Run dotnet clean before running dotnet build * Removed .NET 4.5 references * BuildInParallel set to false in csproj
1 parent 27be571 commit b1424a2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/build-net8.0.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,16 @@ jobs:
3131
with:
3232
dotnet-version: 8.0.x
3333

34+
- name: Clean
35+
run: dotnet clean
36+
3437
- name: Restore dependencies
35-
run: dotnet restore
38+
run: dotnet restore -m:1 # -m:1 disables parallelism and ensures only one build touches /obj.
3639

3740
- name: Build (debug) in .NET 8.0
38-
run: dotnet build --configuration Debug --framework net8.0 --no-restore
41+
run: dotnet build --no-restore -m:1 --framework net8.0
42+
env:
43+
UseSharedCompilation: false # We are dealing with two sources of parallelism (see matrix) - Adyen.GeneratedMSBuildEditorConfig.editorconfig gets a .lock-file, this prevents another parallel process from accessing the build during the .lock.
3944

4045
- name: Run unit tests in .NET 8.0
41-
run: dotnet test --no-build --configuration Debug --framework net8.0 --no-restore Adyen.Test/Adyen.Test.csproj
46+
run: dotnet test --no-build --framework net8.0 Adyen.Test/Adyen.Test.csproj

Adyen/Adyen.csproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<Version>33.0.0</Version>
1111
<AssemblyVersion>33.0.0</AssemblyVersion>
1212
<FileVersion>33.0.0</FileVersion>
13-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1413
<IncludeSymbols>true</IncludeSymbols>
1514
<IncludeSource>true</IncludeSource>
15+
<BuildInParallel>false</BuildInParallel>
1616
<Description>The Adyen API Library for .NET Core allows developers to interact with the Adyen APIs, including Hosted Payment Pages and the Terminal API.</Description>
1717
<PackageProjectUrl>https://github.com/Adyen/adyen-dotnet-api-library</PackageProjectUrl>
1818
<RepositoryUrl>https://github.com/Adyen/adyen-dotnet-api-library</RepositoryUrl>
@@ -45,13 +45,6 @@
4545
<PackageReference Include="System.Text.Json" Version="8.0.6" />
4646
</ItemGroup>
4747

48-
<!-- .NET 4.5 references, compilation flags and build options -->
49-
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
50-
<Reference Include="System" />
51-
<Reference Include="Microsoft.CSharp" />
52-
<Reference Include="System.Web" />
53-
</ItemGroup>
54-
5548
<ItemGroup>
5649
<None Include="adyen-logo.png" Pack="true" Visible="false" PackagePath="" />
5750
<None Include="..\README.md" Pack="true" PackagePath="" />

0 commit comments

Comments
 (0)