-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.94 KB
/
ci.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
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