Skip to content

Commit 23b8838

Browse files
committed
cleanup of the builds to optimize them
1 parent edd025d commit 23b8838

File tree

3 files changed

+45
-11
lines changed

3 files changed

+45
-11
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,40 @@ jobs:
2222
with:
2323
dotnet-version: ${{ env.DOTNET_VERSION }}
2424

25-
- name: Restore dependencies
26-
run: dotnet restore ResultR.slnx
25+
- name: Setup MSBuild
26+
uses: microsoft/setup-msbuild@v2
27+
28+
- name: Setup NuGet
29+
uses: NuGet/setup-nuget@v2
30+
31+
- name: Restore .NET projects
32+
run: |
33+
dotnet restore ResultR/ResultR.csproj
34+
dotnet restore ResultR.Validation/ResultR.Validation.csproj
35+
dotnet restore ResultR.Tests/ResultR.Tests.csproj
36+
dotnet restore ResultR.Validation.Tests/ResultR.Validation.Tests.csproj
37+
dotnet restore ResultR.Benchmarks/ResultR.Benchmarks.csproj
38+
working-directory: src
39+
40+
- name: Restore VSToolkit (NuGet)
41+
run: nuget restore ResultR.VSToolkit/ResultR.VSToolkit.csproj
42+
working-directory: src
43+
44+
- name: Build .NET projects
45+
run: |
46+
dotnet build ResultR/ResultR.csproj --configuration Release --no-restore
47+
dotnet build ResultR.Validation/ResultR.Validation.csproj --configuration Release --no-restore
48+
dotnet build ResultR.Tests/ResultR.Tests.csproj --configuration Release --no-restore
49+
dotnet build ResultR.Validation.Tests/ResultR.Validation.Tests.csproj --configuration Release --no-restore
50+
dotnet build ResultR.Benchmarks/ResultR.Benchmarks.csproj --configuration Release --no-restore
2751
working-directory: src
2852

29-
- name: Build
30-
run: dotnet build ResultR.slnx --configuration Release --no-restore
53+
- name: Build VSToolkit (MSBuild)
54+
run: msbuild ResultR.VSToolkit/ResultR.VSToolkit.csproj /p:Configuration=Release /p:DeployExtension=false
3155
working-directory: src
3256

3357
- name: Test
34-
run: dotnet test ResultR.slnx --configuration Release --no-build --verbosity normal
58+
run: |
59+
dotnet test ResultR.Tests/ResultR.Tests.csproj --configuration Release --no-build --verbosity normal
60+
dotnet test ResultR.Validation.Tests/ResultR.Validation.Tests.csproj --configuration Release --no-build --verbosity normal
3561
working-directory: src

.github/workflows/release-resultr.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@ jobs:
2525
dotnet-version: ${{ env.DOTNET_VERSION }}
2626

2727
- name: Restore dependencies
28-
run: dotnet restore ResultR.slnx
28+
run: |
29+
dotnet restore ResultR/ResultR.csproj
30+
dotnet restore ResultR.Tests/ResultR.Tests.csproj
2931
working-directory: src
3032

3133
- name: Build
32-
run: dotnet build ResultR.slnx --configuration Release --no-restore
34+
run: |
35+
dotnet build ResultR/ResultR.csproj --configuration Release --no-restore
36+
dotnet build ResultR.Tests/ResultR.Tests.csproj --configuration Release --no-restore
3337
working-directory: src
3438

3539
- name: Test
36-
run: dotnet test ResultR.slnx --configuration Release --no-build --verbosity normal
40+
run: dotnet test ResultR.Tests/ResultR.Tests.csproj --configuration Release --no-build --verbosity normal
3741
working-directory: src
3842

3943
- name: Pack

.github/workflows/release-validation.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@ jobs:
2525
dotnet-version: ${{ env.DOTNET_VERSION }}
2626

2727
- name: Restore dependencies
28-
run: dotnet restore ResultR.slnx
28+
run: |
29+
dotnet restore ResultR.Validation/ResultR.Validation.csproj
30+
dotnet restore ResultR.Validation.Tests/ResultR.Validation.Tests.csproj
2931
working-directory: src
3032

3133
- name: Build
32-
run: dotnet build ResultR.slnx --configuration Release --no-restore
34+
run: |
35+
dotnet build ResultR.Validation/ResultR.Validation.csproj --configuration Release --no-restore
36+
dotnet build ResultR.Validation.Tests/ResultR.Validation.Tests.csproj --configuration Release --no-restore
3337
working-directory: src
3438

3539
- name: Test
36-
run: dotnet test ResultR.slnx --configuration Release --no-build --verbosity normal
40+
run: dotnet test ResultR.Validation.Tests/ResultR.Validation.Tests.csproj --configuration Release --no-build --verbosity normal
3741
working-directory: src
3842

3943
- name: Pack ResultR.Validation

0 commit comments

Comments
 (0)