Store downloaded binaries in folder with runtime suffix so that the t… #30
Workflow file for this run
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: Build and run tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
net: | |
name: .NET | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-13, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
3.1.x | |
8.0.x | |
- name: Restore | |
run: dotnet restore | |
- name: Build and run tests | |
run: dotnet test --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results' | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: net-test-results-${{ matrix.os }} | |
path: ${{ github.workspace }}/**/tests/TestResults/* | |
if-no-files-found: error | |
net-macos-arm64: | |
name: .NET macOS ARM64 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-latest ] | |
runs-on: ${{ matrix.os }} | |
env: | |
DotNetSdkX64: "~/.dotnet-sdk/x64" | |
DotNetSdkArm64: "~/.dotnet-sdk/arm64" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Manually setup .NET 8.0 and 3.1 SDKs | |
run: > | |
curl -fsSLO https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh && chmod +x dotnet-install.sh && \ | |
./dotnet-install.sh --architecture arm64 --skip-non-versioned-files --channel 8.0 --install-dir $DotNetSdkArm64 && \ | |
./dotnet-install.sh --architecture x64 --skip-non-versioned-files --channel 3.1 --install-dir $DotNetSdkX64 && \ | |
./dotnet-install.sh --architecture x64 --skip-non-versioned-files --channel 8.0 --install-dir $DotNetSdkX64 | |
- name: Restore | |
run: $DotNetSdkArm64/dotnet restore | |
- name: Build and run arm64 tests | |
run: $DotNetSdkArm64/dotnet test -f net8.0 --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results_arm64' | |
- name: Build and run x64 tests | |
run: $DotNetSdkX64/dotnet test --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results_x64' | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: net-test-results-${{ matrix.os }} | |
path: ${{ github.workspace }}/**/tests/TestResults/* | |
if-no-files-found: error |