Repository navigation
66 lines (55 loc) · 1.96 KB
/
Copy pathci.yml
File metadata and controls
66 lines (55 loc) · 1.96 KB
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
63
64
65
66
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: build & test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 90
env:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "true"
# Test-spawned CLI runs must not hit the production bug-report API or usage stats.
CHDSHARP_NO_BUG_REPORTS: "1"
CHDSHARP_NO_TELEMETRY: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDKs (8.0, 9.0, 10.0)
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
cache: true
cache-dependency-path: "**/*.csproj"
# The WPF tester targets *-windows, so on Linux/macOS we build only the
# cross-platform projects. CHDSharpTest spawns the CLI from
# CHDSharpCli/bin/<config>/<tfm>/CHDSharp.dll, so it must be built first
# in the same configuration and for all three target frameworks.
- name: Build (cross-platform projects)
if: runner.os != 'Windows'
run: |
dotnet build CHDSharpLib/CHDSharpLib.csproj -c Release
dotnet build CHDSharpCli/CHDSharpCli.csproj -c Release
dotnet build CHDSharpTest/CHDSharpTest.csproj -c Release
dotnet build CHDSharpEncoderTest/CHDSharpEncoderTest.csproj -c Release
- name: Build (full solution)
if: runner.os == 'Windows'
run: dotnet build CSharp_CHDSharp.sln -c Release
- name: Unit tests - CHDSharpTest
run: dotnet test CHDSharpTest/CHDSharpTest.csproj -c Release --no-build
- name: Unit tests - CHDSharpEncoderTest
run: dotnet test CHDSharpEncoderTest/CHDSharpEncoderTest.csproj -c Release --no-build