-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (106 loc) · 3.96 KB
/
main.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build and Test
on:
push:
branches:
- main
- master
jobs:
build-arh-dotnet:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x' # or whichever version you need for .NET
- run: echo '${{ steps.stepid.outputs.dotnet-version }}'
- name: Build .NET Standard DLL
run: dotnet build -c Release AdvancedRestHandler/AdvancedRestHandler.csproj
build-arh-dotnet-core:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1' # or whichever version you need for .NET Core
- run: echo '${{ steps.stepid.outputs.dotnet-version }}'
- name: Build .NET Standard DLL
run: dotnet build -c Release AdvancedRestHandler/AdvancedRestHandler.csproj
build-arh-dotnet-framework:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet.exe for use with actions
uses: nuget/setup-nuget@v2
- name: Update NuGet
run: nuget.exe update -self
- name: Restore NuGet packages
run: nuget restore AdvancedRestHandler/AdvancedRestHandler.csproj
- name: Build the Project
run: msbuild AdvancedRestHandler/AdvancedRestHandler.csproj
build-test-dotnet:
runs-on: ubuntu-latest
needs: build-arh-dotnet
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x' # or whichever version you need for .NET
- run: echo '${{ steps.stepid.outputs.dotnet-version }}'
- name: Build .NET Project
run: dotnet build -c Release Tests/AdvancedRestHandler.Test_Net/AdvancedRestHandler.Test_Net.csproj
build-test-dotnet-core:
runs-on: ubuntu-latest
needs: build-arh-dotnet-core
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1' # or whichever version you need for .NET Core
- run: echo '${{ steps.stepid.outputs.dotnet-version }}'
- name: Build .NET Core Project
run: dotnet build -c Release Tests/AdvancedRestHandler.Test_NetCore/AdvancedRestHandler.Test_NetCore.csproj
build-test-dotnet-framework:
runs-on: windows-latest
needs: build-arh-dotnet-framework
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet.exe for use with actions
uses: nuget/setup-nuget@v2
- name: Update NuGet
run: nuget.exe update -self
- name: Restore NuGet packages
run: nuget restore Tests/AdvancedRestHandler.Test_NetFramework/AdvancedRestHandler.Test_NetFramework.csproj -SolutionDirectory .
- name: Build the Project
run: msbuild Tests/AdvancedRestHandler.Test_NetFramework/AdvancedRestHandler.Test_NetFramework.csproj
###### MATRIX STRATEGY .... CHECK IF ARH SUPPORTS
# name: NuGet Restore
# on: [ push, pull_request ]
# jobs:
# build:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ windows-latest, ubuntu-latest, macOS-latest ]
# nuget: [ latest, preview, 4.x, 5.3.1 ]
# name: NuGet@${{ matrix.nuget }} sample
# steps:
# - uses: actions/checkout@master
# - name: Setup NuGet.exe
# uses: nuget/setup-nuget@v2
# with:
# nuget-version: ${{ matrix.nuget }}
# - run: nuget restore MyProject.sln