-
Notifications
You must be signed in to change notification settings - Fork 16
118 lines (111 loc) · 4.38 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
# 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 net481
- 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-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 net481
- 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