feat(overlay): portable ImGui host for Windows x64 + macOS arm64 #14
This file contains hidden or 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: 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 |