From 1abae0aa71f89ba5d23e8740bd1b467a06128065 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:33:17 -0600 Subject: [PATCH 1/5] ci: build on the shared ci-workflows Windows workflow Locked restore, warnings-as-errors build, dotnet format, tests with the 100% coverage gate and the NuGet pack run on the KOF Windows host runner; v* tags attach the packages and SHA256SUMS to the Gitea release. Removes the note on the retired central native verification. Co-Authored-By: Claude Opus 5.5 --- .gitea/NATIVE-CI.md | 15 --------------- .gitea/workflows/build.yaml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 .gitea/NATIVE-CI.md create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/NATIVE-CI.md b/.gitea/NATIVE-CI.md deleted file mode 100644 index 724c51b..0000000 --- a/.gitea/NATIVE-CI.md +++ /dev/null @@ -1,15 +0,0 @@ -# Native CI verification - -AppKit is a .NET solution whose tests need a Windows host. Its native verification is **centralized**: this repository -carries no workflow that selects a host or a runner label. - -- The owner-level `native.yaml` in the KofTwentyTwo CI policy repository dispatches the shared `dotnet` profile for - `KofTwentyTwo/AppKit` with inputs declared centrally (solution, test projects, coverage packages, platform). -- It runs on pushes to the protected branches, on manual dispatch, and on pull requests opened from a branch of this same - repository. A pull request from a fork never runs on a host: a Linux `fork-deny` job fails it instead. -- The `native-result` check aggregates the native job. It fails unless the AppKit native job succeeded, so a skipped, - failed or cancelled native run cannot pass. -- The primary `ci-result` check (source/config lint and secrets scan) continues to run on every pull request. - -Both `ci-result` and `native-result` are required checks for `main`. Changing what runs, where, or with which inputs is -done in the CI policy repository, never in a pull request to this repository. diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..cbd7995 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,22 @@ +name: build +on: + push: + branches: ['**'] + tags: ['v*'] +jobs: + windows: + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/windows.yaml@native-workflows + secrets: inherit + with: + commands: | + dotnet restore AppKit.slnx -p:Platform=x64 --locked-mode + dotnet build AppKit.slnx -p:Platform=x64 -warnaserror --no-restore + # The WinUI sample is built directly so the format workspace can load its generated XAML code. + dotnet build samples/AppKit.Sample.WinUI/AppKit.Sample.WinUI.csproj -p:Platform=x64 -warnaserror --no-restore + $env:Platform = 'x64' + dotnet format AppKit.slnx --verify-no-changes --severity warn --no-restore + Remove-Item Env:Platform + dotnet test tests/KofTwentyTwo.AppKit.Tests --no-build --settings coverage.runsettings --collect:"XPlat Code Coverage" --logger trx --results-directory TestResults + ./build/Assert-Coverage.ps1 -ResultsDirectory TestResults -Packages KofTwentyTwo.AppKit,KofTwentyTwo.AppKit.Updates + dotnet pack AppKit.slnx -c Release -p:Platform=x64 -o artifacts/nuget + artifacts: artifacts/nuget/*.nupkg -- 2.54.0 From 7d951a618dec234573e0c1c4a5751cd75598c0aa Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:35:34 -0600 Subject: [PATCH 2/5] ci: run the coverage gate as a separate pwsh process Assert-Coverage.ps1 reports a shortfall with exit 1, which only stops the build when the script runs as a native process. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index cbd7995..154a59b 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,6 +17,6 @@ jobs: dotnet format AppKit.slnx --verify-no-changes --severity warn --no-restore Remove-Item Env:Platform dotnet test tests/KofTwentyTwo.AppKit.Tests --no-build --settings coverage.runsettings --collect:"XPlat Code Coverage" --logger trx --results-directory TestResults - ./build/Assert-Coverage.ps1 -ResultsDirectory TestResults -Packages KofTwentyTwo.AppKit,KofTwentyTwo.AppKit.Updates + pwsh -NoProfile -File ./build/Assert-Coverage.ps1 -ResultsDirectory TestResults -Packages KofTwentyTwo.AppKit,KofTwentyTwo.AppKit.Updates dotnet pack AppKit.slnx -c Release -p:Platform=x64 -o artifacts/nuget artifacts: artifacts/nuget/*.nupkg -- 2.54.0 From 9c97b06cb5408d20ef191ce3cced42b621d37193 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:43:19 -0600 Subject: [PATCH 3/5] ci: pack the tag version on vX.Y.Z tags Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 154a59b..83d42f7 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,5 +18,7 @@ jobs: Remove-Item Env:Platform dotnet test tests/KofTwentyTwo.AppKit.Tests --no-build --settings coverage.runsettings --collect:"XPlat Code Coverage" --logger trx --results-directory TestResults pwsh -NoProfile -File ./build/Assert-Coverage.ps1 -ResultsDirectory TestResults -Packages KofTwentyTwo.AppKit,KofTwentyTwo.AppKit.Updates - dotnet pack AppKit.slnx -c Release -p:Platform=x64 -o artifacts/nuget + # A vX.Y.Z tag packs that version; other pushes pack the 0.1.0-dev default. + $version = if ($env:GITHUB_REF_TYPE -eq 'tag') { @("-p:Version=$($env:GITHUB_REF_NAME.TrimStart('v'))") } else { @() } + dotnet pack AppKit.slnx -c Release -p:Platform=x64 -o artifacts/nuget @version artifacts: artifacts/nuget/*.nupkg -- 2.54.0 From cbec0cd623f3e53d15b03f86cf251a406bad25ae Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:46:01 -0600 Subject: [PATCH 4/5] ci: call the shared workflow from ci-workflows main Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 83d42f7..a973703 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -5,7 +5,7 @@ on: tags: ['v*'] jobs: windows: - uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/windows.yaml@native-workflows + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/windows.yaml@main secrets: inherit with: commands: | -- 2.54.0 From 5dcbe6a1cdc075e4706d93da5a1ad54896cedf5f Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:49:39 -0600 Subject: [PATCH 5/5] ci: pin the shared workflow to v1 Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a973703..5218bb3 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -5,7 +5,7 @@ on: tags: ['v*'] jobs: windows: - uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/windows.yaml@main + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/windows.yaml@v1 secrets: inherit with: commands: | -- 2.54.0