v0.4.2 Core #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |