-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (122 loc) · 3.92 KB
/
Copy pathci.yml
File metadata and controls
139 lines (122 loc) · 3.92 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: Build & Test (.NET 10 · ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
# No packages.lock.json in the repo, so key the NuGet cache on the
# project files + central package manifest instead of a lockfile.
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', 'Directory.Packages.props') }}
restore-keys: |
nuget-${{ runner.os }}-
- name: Restore
run: dotnet restore SwtorLogParser.slnx
# Full solution: core + CLI + portable ImGui overlay + tests.
# Overlay is net10.0; Win32 host is compile-gated to Windows runners only.
- name: Build
run: dotnet build SwtorLogParser.slnx -c Release --no-restore
- name: Test
run: >-
dotnet test SwtorLogParser.Tests/SwtorLogParser.Tests.csproj
-c Release --no-build
--collect:"XPlat Code Coverage"
--results-directory ${{ github.workspace }}/TestResults
- name: Upload coverage
if: always() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: coverage
path: ${{ github.workspace }}/TestResults/**/coverage.cobertura.xml
if-no-files-found: ignore
# Non-blocking: validates Native AOT CLI publish on each release RID.
aot-publish:
name: Native AOT CLI (${{ matrix.rid }})
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
rid: win-x64
- os: macos-latest
rid: osx-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Publish Native AOT
run: dotnet publish SwtorLogParser.Cli -c Release -r ${{ matrix.rid }} -o publish/cli
- name: Upload native binary
if: always()
uses: actions/upload-artifact@v4
with:
name: cli-${{ matrix.rid }}
path: |
publish/cli/SwtorLogParser.Cli
publish/cli/SwtorLogParser.Cli.exe
if-no-files-found: ignore
# Smoke: single-file overlay publish (Silk/GLFW natives) for each ship RID.
overlay-publish:
name: Overlay publish (${{ matrix.rid }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
rid: win-x64
- os: macos-latest
rid: osx-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Publish overlay single-file
run: >
dotnet publish SwtorLogParser.Overlay.ImGui
-c Release
-r ${{ matrix.rid }}
--self-contained
-p:PublishSingleFile=true
-p:IncludeAllContentForSelfExtract=true
-p:EnableCompressionInSingleFile=true
-p:DebugType=none
-o publish/overlay
- name: Upload overlay binary
if: always()
uses: actions/upload-artifact@v4
with:
name: overlay-${{ matrix.rid }}
path: |
publish/overlay/SwtorLogParser.Overlay.ImGui
publish/overlay/SwtorLogParser.Overlay.ImGui.exe
if-no-files-found: ignore