Skip to content

Commit f349d8d

Browse files
committed
CI: multi-platform matrix for all builds, auto-cancel older runs
- Simplify concurrency to always cancel in-progress runs on same branch - CI-only mode now runs on all 3 platforms (linux/win/osx) - Pack runs as pre-release quality gate on linux for every build - Split Pack and GenerateReleaseManifest into separate steps Made-with: Cursor
1 parent 612adae commit f349d8d

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ permissions:
1212
checks: write
1313

1414
concurrency:
15-
group: ${{ vars.CI_SERIAL == 'true' && format('ci-release-{0}', github.ref) || format('ci-release-{0}', github.run_id) }}
16-
cancel-in-progress: ${{ vars.CI_CANCEL_IN_PROGRESS == 'true' }}
15+
group: ci-${{ github.ref }}
16+
cancel-in-progress: true
1717

1818
env:
1919
DOTNET_NOLOGO: true
@@ -145,7 +145,9 @@ jobs:
145145
ENTRIES+=',{"os":"macos-latest","runtime":"ios","pack":false,"publish":false,"workloads":"ios"}'
146146
fi
147147
else
148-
ENTRIES='{"os":"ubuntu-latest","runtime":"linux-x64","pack":false,"publish":false,"workloads":""}'
148+
ENTRIES='{"os":"ubuntu-latest","runtime":"linux-x64","pack":true,"publish":false,"workloads":""}'
149+
ENTRIES+=',{"os":"windows-latest","runtime":"win-x64","pack":false,"publish":false,"workloads":""}'
150+
ENTRIES+=',{"os":"macos-latest","runtime":"osx-arm64","pack":false,"publish":false,"workloads":""}'
149151
150152
if [ "$ENABLE_ANDROID" = "true" ]; then
151153
ENTRIES+=',{"os":"ubuntu-latest","runtime":"android","pack":false,"publish":false,"workloads":"android"}'
@@ -225,10 +227,15 @@ jobs:
225227
shell: bash
226228
run: ./build.sh CoverageReport --skip Test
227229

228-
- name: Pack and generate manifest
230+
- name: Pack
231+
if: matrix.pack
232+
shell: bash
233+
run: ./build.sh Pack --skip Build Test
234+
235+
- name: Generate release manifest
229236
if: needs.resolve-version.outputs.is_release == 'true' && matrix.pack
230237
shell: bash
231-
run: ./build.sh Pack GenerateReleaseManifest --skip Build Test
238+
run: ./build.sh GenerateReleaseManifest --skip Build Test Pack
232239

233240
- name: Validate package versions
234241
if: needs.resolve-version.outputs.is_release == 'true' && matrix.pack

docs/github-workflows-guide.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ For a quick release walkthrough, see: [Quick Start Release](quick-start-release.
2525

2626
### `CI and Release`
2727
- Triggers: `push` to `main`, `pull_request` targeting `main`, manual `workflow_dispatch`
28-
- Concurrency: **Parallel by default** — multiple pushes can run simultaneously
29-
- For serial execution: Settings → Variables → set `CI_SERIAL=true` (queues by branch)
30-
- To cancel older runs: set `CI_CANCEL_IN_PROGRESS=true`
31-
- PR behavior: Runs Format Check + Build + Test + Coverage Report on ubuntu (with prerelease suffix)
32-
- main push behavior: If `VersionPrefix` has been bumped (tag doesn't exist yet), triggers full-platform matrix Build + Test + Pack + Publish + PackageApp → approval → NuGet push + SBOM + Attestation + tag + GitHub Release → documentation deployment. Otherwise, runs CI-only (build + test).
28+
- Concurrency: Grouped by branch (`ci-${{ github.ref }}`), newer pushes automatically cancel older in-progress runs
29+
- PR behavior: Runs multi-platform Build + Test (Format Check + Coverage Report on linux only, Pack verification on linux) with prerelease suffix
30+
- main push behavior: If `VersionPrefix` has been bumped (tag doesn't exist yet), triggers full-platform matrix Build + Test + Pack + Publish + PackageApp → approval → NuGet push + SBOM + Attestation + tag + GitHub Release → documentation deployment. Otherwise, runs CI-only (multi-platform build + test + linux pack verification).
3331
- Artifacts: Test results (with PR annotations), coverage reports, NuGet packages (with release manifest), platform installer zips, SBOM
3432

3533
### `CodeQL`
@@ -44,14 +42,14 @@ For a quick release walkthrough, see: [Quick Start Release](quick-start-release.
4442
### `resolve-version`
4543
- Reads `VersionPrefix` from `Directory.Build.props`, validates semver format (3-segment: `Major.Minor.Patch`)
4644
- Determines if this is a release: main push + tag `v{version}` does not exist yet = release; otherwise CI-only
47-
- Computes the build matrix: PR uses ubuntu only, release includes win/linux/osx
45+
- Computes the build matrix: all modes use multi-platform (linux/win/osx); release additionally enables publish
4846

4947
### `build-and-test`
5048
- Matrix build: each platform runs Build + Test
5149
- Linux runner additionally runs Format Check (`dotnet format --verify-no-changes`) and Coverage Report
5250
- PR: uses `--VersionSuffix "ci.<run_number>"`
5351
- main push: no suffix (locks the release version)
54-
- Linux runner additionally runs Pack + GenerateReleaseManifest (generates SHA256 manifest)
52+
- Linux runner additionally runs Pack (always, as a pre-release quality gate); GenerateReleaseManifest runs only for releases
5553
- All platforms run Publish + PackageApp, producing installer zips (`app-{runtime}.zip`)
5654
- Test results are displayed directly in PR checks via `dorny/test-reporter`
5755

0 commit comments

Comments
 (0)