Skip to content

Commit 53c6a8c

Browse files
authored
Merge pull request #25 from Sergio0694/dev/improve-ci
Improve CI script and bump Roslyn tooling
2 parents 2c844f5 + 4653889 commit 53c6a8c

File tree

2 files changed

+12
-35
lines changed

2 files changed

+12
-35
lines changed

Diff for: .github/workflows/dotnet.yml

+10-33
Original file line numberDiff line numberDiff line change
@@ -8,59 +8,40 @@ env:
88

99
jobs:
1010

11-
# Build the whole PolySharp solution, in Debug
12-
build-solution-debug:
11+
# Build the whole PolySharp solution
12+
build-solution:
13+
strategy:
14+
matrix:
15+
configuration: [Debug, Release]
1316
runs-on: windows-2022
1417
steps:
1518
- name: Git checkout
1619
uses: actions/checkout@v3
17-
- name: Setup .NET 6 SDK
18-
uses: actions/setup-dotnet@v3
19-
with:
20-
dotnet-version: 6.0.x
2120
- name: Build
22-
run: dotnet build -c Debug /bl
21+
run: dotnet build -c ${{matrix.configuration}} /bl
2322
shell: cmd
2423
- name: Upload MSBuild binary log
2524
uses: actions/upload-artifact@v3
2625
with:
27-
name: msbuild_log
26+
name: msbuild_log_${{matrix.configuration}}
2827
path: msbuild.binlog
2928
if-no-files-found: error
3029

31-
# Build the whole PolySharp solution, in Release
32-
build-solution-release:
33-
runs-on: windows-2022
34-
steps:
35-
- name: Git checkout
36-
uses: actions/checkout@v3
37-
- name: Setup .NET 6 SDK
38-
uses: actions/setup-dotnet@v3
39-
with:
40-
dotnet-version: 6.0.x
41-
- name: Build
42-
run: dotnet build -c Release /p:Configuration=Release
43-
shell: cmd
44-
4530
# Build the .msbuildproj projects to generate all the NuGet packages
4631
build-packages:
4732
if: success()
48-
needs: [build-solution-debug, build-solution-release]
33+
needs: [build-solution]
4934
runs-on: windows-2022
5035
steps:
5136
- name: Git checkout
5237
uses: actions/checkout@v3
53-
- name: Setup .NET 6 SDK
54-
uses: actions/setup-dotnet@v3
55-
with:
56-
dotnet-version: 6.0.x
5738
- name: Build PolySharp package
5839
run: dotnet build src\PolySharp.Package\PolySharp.Package.msbuildproj -c Release
5940
shell: cmd
6041
- name: Upload package artifacts
6142
uses: actions/upload-artifact@v3
6243
with:
63-
name: nuget_preview
44+
name: nuget_packages
6445
path: artifacts\*.nupkg
6546
if-no-files-found: error
6647

@@ -74,17 +55,13 @@ jobs:
7455
steps:
7556
- name: Git checkout
7657
uses: actions/checkout@v3
77-
- name: Setup .NET 6 SDK
78-
uses: actions/setup-dotnet@v3
79-
with:
80-
dotnet-version: 6.0.x
8158
- name: Create local NuGet feed
8259
run: mkdir artifacts
8360
shell: cmd
8461
- name: Download package artifacts
8562
uses: actions/download-artifact@v3
8663
with:
87-
name: nuget_preview
64+
name: nuget_packages
8865
path: artifacts
8966
- name: Build PolySharp.NuGet
9067
run: dotnet build tests\PolySharp.NuGet\PolySharp.NuGet.csproj -c Release

Diff for: Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.4.0-4.final" PrivateAssets="all" />
27-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.4.0-4.final" PrivateAssets="all" />
26+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.4.0" PrivateAssets="all" />
27+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.4.0" PrivateAssets="all" />
2828
</ItemGroup>
2929

3030
<!-- Centralized location for all generated artifacts -->

0 commit comments

Comments
 (0)