-
Notifications
You must be signed in to change notification settings - Fork 16
153 lines (145 loc) · 5.93 KB
/
dotnet_test.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Test and publish
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
paths-ignore:
- .gitignore
- CODE_OF_CONDUCT.md
- LGPL.txt
- README.md
- THIRD-PARTY-LICENSE-README.md
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore /property:Configuration="Debug vendor unsupported"
- name: Build
run: dotnet build --no-restore --configuration "Debug vendor unsupported" /property:BclBuildImported=Ignore
- name: Test
run: dotnet test --no-build --verbosity normal --configuration "Debug vendor unsupported"
publish-msdial5:
needs: test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore /property:Configuration="Debug vendor unsupported"
- name: Publish
run: dotnet publish src/MSDIAL5/MsdialGuiApp/MsdialGuiApp.csproj -p:PublishProfile=FolderProfile -o artifact --configuration "Release vendor unsupported" --framework net48
- name: Copy licenses
run: Copy-Item -Path LGPL.txt,THIRD-PARTY-LICENSE-README.md,README.md -Destination artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
name: MSDIAL5
path: artifact
publish-msdial5-console:
needs: test
runs-on: ${{ matrix.pair.os }}
strategy:
matrix:
triple: [
{ os: windows-latest, framework: net48, runtime: win-x64 },
{ os: ubuntu-latest, framework: net8, runtime: linux-x64 },
{ os: macos-latest, framework: net8, runtime: osx-x64 }
]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore src/MSDIAL4/MsdialConsoleAppCore/MsdialConsoleAppCore.csproj /property:Configuration="Debug vendor unsupported"
- name: Publish
run: dotnet publish tests/MSDIAL5/MsdialCoreTestApp/MsdialCoreTestApp.csproj -p:DebugSymbols=false -p:DebugType=None -p:ErrorOnDuplicatePublishOutputFiles=false -o artifact --configuration "Release vendor unsupported" --runtime ${{ matrix.triple.runtime }} --framework ${{ matrix.triple.framework }} --self-contained
- name: Copy licenses
run: |
cp LGPL.txt artifact
cp THIRD-PARTY-LICENSE-README.md artifact
cp README.md artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
name: MSDIAL5-Console-${{ matrix.triple.os }}-${{ matrix.triple.framework }}
path: artifact
publish-msdial4:
needs: test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore /property:Configuration="Debug vendor unsupported"
- name: Publish
run: dotnet publish src/MSDIAL4/MsDial/MSDIAL.csproj -o artifact --configuration "Release vendor unsupported" --framework net48
- name: Copy licenses
run: Copy-Item -Path LGPL.txt,THIRD-PARTY-LICENSE-README.md,README.md -Destination artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
name: MSDIAL4
path: artifact
publish-msdial4-console:
needs: test
runs-on: ${{ matrix.pair.os }}
strategy:
matrix:
pair: [ { os: windows-latest, runtime: win-x64 }, { os: ubuntu-latest, runtime: linux-x64 }, { os: macos-latest, runtime: osx-x64 } ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Add package source
run: dotnet nuget add source ${{ github.workspace }}/Assemblies
- name: Restore packages
run: dotnet restore src/MSDIAL4/MsdialConsoleAppCore/MsdialConsoleAppCore.csproj /property:Configuration="Debug vendor unsupported"
- name: Publish
run: dotnet publish src/MSDIAL4/MsdialConsoleAppCore/MsdialConsoleAppCore.csproj -o artifact --configuration "Release vendor unsupported" --framework net8 --self-contained --runtime ${{ matrix.pair.runtime }}
- name: Copy licenses
run: |
cp LGPL.txt artifact
cp THIRD-PARTY-LICENSE-README.md artifact
cp README.md artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
name: MSDIAL4-Console-${{ matrix.pair.os }}
path: artifact