-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (60 loc) · 2.85 KB
/
windows-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
name: Windows Test
on:
push:
branches: [ master ]
paths:
- 'src/**.csproj'
- 'src/**.cs'
- 'src/**.dll'
- '.github/workflows/windows-test.yml'
jobs:
windows-test:
runs-on: windows-2022
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
strategy:
matrix:
target:
- arch: 'x64'
programFiles: 'C:\Program Files'
- arch: 'x86'
programFiles: 'C:\Program Files (x86)'
steps:
- uses: actions/checkout@v2
- name: Caching
uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/*.csproj') }} #hash of project files
restore-keys: |
${{ runner.os }}-
- name: Setup .NET Sdk
run: |
echo 'PROCESSOR_ARCHITEW6432=${{ matrix.target.arch }}' >> $env:GITHUB_ENV
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';
./dotnet-install.ps1 -Channel 3.1 -Architecture ${{ matrix.target.arch }} -InstallDir "${{ matrix.target.programFiles }}\dotnet"
./dotnet-install.ps1 -Channel 5.0 -Architecture ${{ matrix.target.arch }} -InstallDir "${{ matrix.target.programFiles }}\dotnet"
./dotnet-install.ps1 -Channel 6.0 -Architecture ${{ matrix.target.arch }} -InstallDir "${{ matrix.target.programFiles }}\dotnet"
./dotnet-install.ps1 -Channel 7.0 -Architecture ${{ matrix.target.arch }} -InstallDir "${{ matrix.target.programFiles }}\dotnet"
./dotnet-install.ps1 -Channel 8.0 -Architecture ${{ matrix.target.arch }} -InstallDir "${{ matrix.target.programFiles }}\dotnet"
dotnet --list-sdks
#- name: Setup .NET Sdk
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: |
# 3.1.x
# 5.x
# 6.x
# 7.x
# 8.x
- name: Test .NET 8 ${{ matrix.target.arch }}
run: dotnet test -v quiet -f net8.0 --logger "console;verbosity=detailed" --runtime win-${{ matrix.target.arch }}
- name: Test .NET 7 ${{ matrix.target.arch }}
run: dotnet test -v quiet -f net7.0 --logger "console;verbosity=detailed" --runtime win-${{ matrix.target.arch }}
- name: Test .NET 6 ${{ matrix.target.arch }}
run: dotnet test -v quiet -f net6.0 --logger "console;verbosity=detailed" --runtime win-${{ matrix.target.arch }}
- name: Test .NET 5 ${{ matrix.target.arch }}
run: dotnet test -v quiet -f net5.0 --logger "console;verbosity=detailed" --runtime win-${{ matrix.target.arch }}
- name: Test .NET Core 3.1 ${{ matrix.target.arch }}
run: dotnet test -v quiet -f netcoreapp3.1 --logger "console;verbosity=detailed" --runtime win-${{ matrix.target.arch }}