Repository navigation
63 lines (52 loc) · 1.5 KB
/
Copy pathci.yml
File metadata and controls
63 lines (52 loc) · 1.5 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
name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build-test:
name: Build and test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore
run: dotnet restore CSharp_CHDMounter.sln
- name: Build
run: dotnet build CSharp_CHDMounter.sln -c Release --no-restore
- name: Test
run: >
dotnet test CHDMounter.Tests/CHDMounter.Tests.csproj
-c Release --no-build
--logger "trx;LogFileName=test-results.trx"
--results-directory TestResults
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: TestResults/*.trx
if-no-files-found: ignore
cross-platform-build:
name: Cross-platform build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
# Only the app project is portable; the tests and the Tester tool target
# net10.0-windows. This verifies the Linux/macOS build stays green.
- name: Build app
run: dotnet build CHDMounter/CHDMounter.csproj -c Release