Package validation #27
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: macOS/Ubuntu/Windows | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Build: | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup the .NET 8 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Build for .NET 8 on macOS and Ubuntu | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
dotnet build src/ZLibDotNet/ZLibDotNet.csproj -c Release | |
dotnet build tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net8.0 | |
- name: Build for .NET Framework 4.6.2 and .NET 8 on Windows (x86 and x64) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
dotnet build tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -r win-x86 --no-self-contained | |
dotnet build tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -r win-x64 --no-self-contained | |
- name: Test on .NET 8 on macOS and Ubuntu | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
dotnet test tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net8.0 --no-build --no-restore | |
- name: Test on .NET Framework 4.6.2 and .NET 8 on Windows (x86 and x64) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
dotnet test tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net462 -r win-x86 --no-build --no-restore | |
dotnet test tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net462 -r win-x64 --no-build --no-restore | |
dotnet test tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net8.0 -r win-x86 --no-build --no-restore | |
dotnet test tests/ZLibDotNet.UnitTests/ZLibDotNet.UnitTests.csproj -c Release -f net8.0 -r win-x64 --no-build --no-restore |