forked from Sergio0694/PolySharp
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 2 KB
/
dotnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: .NET
on: [push, pull_request]
env:
EXCLUDE_RUN_ID_FROM_PACKAGE: false
EXCLUDE_SUFFIX_FROM_VERSION: false
jobs:
# Build the whole PolySharp solution
build-solution:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Build
run: dotnet build -c ${{matrix.configuration}} /bl
- name: Upload MSBuild binary log
uses: actions/upload-artifact@v3
with:
name: msbuild_log_${{matrix.configuration}}
path: msbuild.binlog
if-no-files-found: error
# Run unit tests
run-tests:
if: success()
needs: [build-solution]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Run unit tests
run: dotnet test -c Release
# Build the .msbuildproj projects to generate all the NuGet packages
build-packages:
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Build PolySharp package
run: dotnet build src\PolySharp.Package\PolySharp.Package.msbuildproj -c Release
- name: Upload package artifacts
uses: actions/upload-artifact@v3
with:
name: nuget_packages
path: artifacts\*.nupkg
if-no-files-found: error
# Download the NuGet packages generated in the previous job and use them
# to build and run the sample project referencing them. This is used as
# a test to ensure the NuGet packages work in a consuming project.
verify-packages:
if: success()
needs: [build-packages]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Create local NuGet feed
run: mkdir artifacts
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: nuget_packages
path: artifacts
- name: Build PolySharp.NuGet
run: dotnet build tests\PolySharp.NuGet\PolySharp.NuGet.csproj -c Release