Skip to content

Build the docs site in parallel and validate it on every PR - #5772

Merged
mattleibow merged 2 commits into
mainfrom
mattleibow-site-build-resilient-apps
Nov 16, 2026
Merged

mattleibow merged 2 commits into
mainfrom
mattleibow-site-build-resilient-apps

Conversation

@mattleibow

@mattleibow mattleibow commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

The docs site stopped publishing after the Uno 7 migration. Push builds fail at the Uno Gallery WASM smoke test, which expects the removed package_*/uno-config.js layout (#5771). PRs did not catch this because the complete site was built only for same-repository PRs with automation/staging; the migration came from a fork and its site check was skipped.

Separate validation from publishing and build the docs and apps in parallel:

  • setup computes variables and whether publishing is allowed. Every PR event builds, including forks and label changes; the staging label controls deployment, not validation.
  • docs builds DocFX without checking out submodules or building native libraries.
  • wasm-natives builds the WASM native libraries once, then an app matrix publishes Gallery (Blazor), Gallery (Uno Platform), and SkiaFiddle. Each app uploads its output only after publishing and any configured smoke test succeed.
  • assemble combines the docs and successful app artifacts, warning about missing apps.
  • deploy writes production content or a PR preview to docs-live only when publishing is allowed and the run is not a dry run. PR previews also require successful app builds.
  • Pages - Go Live! verifies that the upstream publishing job actually succeeded before publishing docs-live to GitHub Pages. A successful validation-only run or dry run no longer redeploys the site. It checks the completed run attempt, including reruns; missing publishing jobs or API errors fail explicitly.

Publishing policy:

Source Builds Publishes
Push to main Yes Production
Unlabeled same-repository PR Yes No
Same-repository PR with automation/staging Yes Preview, only if all builds pass
Fork PR, with or without the label Yes Never
Manual build Yes Production only from main, or an explicitly selected labeled same-repository PR preview
Dry run Yes Never

On main and manual dispatch, failed app/native builds remain non-blocking: omit unavailable apps so the docs can still publish. DocFX failures always block publication. On PRs, app/native failures fail the workflow rather than being ignored. Requiring these checks for merge remains a separate branch-protection configuration change; this PR does not change repository protection.

Cleanup workflows continue to republish docs-live when removing previews. Manual Go Live is restricted to main. Fork PRs retain read-only build permissions; GitHub may require approval before running workflows for new external contributors.

The Go Live change takes effect after this PR lands on the default branch. The Uno 7 smoke-test/layout repair is separate: until #5771 is fixed, Uno app checks are expected to fail on PRs and failed apps will be omitted from production.

Update documentation/dev/site.md with the build/deploy policy and both publishing stages.

Related issues

Related to #5771

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — workflow and developer documentation only; no public API or runtime behavior changes.

Testing

  • git diff --check — passed.
  • actionlint -shellcheck='' .github/workflows/build-site.yml .github/workflows/build-site-go-live.yml — passed. Shellcheck is disabled for this syntax/expression validation; the existing deployment shell scripts are not being rewritten.
  • Executed the actual setup Bash, Go Live JavaScript, and gate expressions in a temporary Python/Node scenario harness — all 39 scenarios passed. Covered main/feature dispatch, ordinary and labeled same-repository/fork PRs, invalid manual PR selections, failed/skipped apps, dry runs, skipped/failed/successful publishing jobs, cleanup/sweep jobs, exact run attempts, and missing/unknown upstream job failures. No permanent mocked script-test infrastructure was added.
  • Queried the actual original PR run and its attempt-specific jobs endpoint — confirmed workflow paths and skipped Deploy job metadata match the Go Live gate.
  • Full site publishing was not run locally; it requires the GitHub runner and deployment environment. The PR workflow provides the site build. The separate Uno smoke-test failure from Pages - Deploy fails on main since Uno 7 migration: Uno smoke test expects removed package_*/uno-config.js #5771 remains expected until repaired.
  • Managed/native test suites were not run because no managed/native implementation changed. No permanent regression tests were added; workflow syntax checks, targeted execution of the actual gating code, and real CI cover this CI-only change.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

The Pages workflow built the docs and all three WASM apps serially in one
job, and only built PRs with the automation/staging label. When the Uno 7
migration broke the Uno Gallery smoke test (#5771), nothing caught it on the
PR and every main run since has failed, so the docs stopped publishing.

Split the build into setup, docs, wasm-natives, an app matrix and a quick
assemble job. Each app uploads its output only after it builds and passes
its smoke test; assemble copies whichever apps exist and warns about any
that are missing. Every PR, including forks, now builds and smoke-tests the
site and fails on any error. Publishing still requires a same-repo PR with
automation/staging, or a push/dispatch. On main, app jobs are
continue-on-error so a broken app is omitted rather than blocking the docs.

Relates to #5771

Co-authored-by: Copilot App <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

Every PR builds and smoke-tests the site. Add the automation/staging label to also publish a documentation preview for this PR.

Removing the label removes the preview. While the label is present, each new commit updates it.


This comment is automatically updated by the documentation staging workflow.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5772

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5772"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-5772/packages --name skiasharp-pr-5772
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-5772

Build every PR event, including forks and label changes. Only publish production from main or staging for explicitly labeled same-repository PRs, and require successful app builds before publishing a PR preview.\n\nGate Go Live on the upstream publishing job rather than workflow success so validation-only and dry-run builds do not redeploy Pages.

Co-authored-by: Copilot App <[email protected]>
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5772

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 39 slower · 🟢 38 faster

  • 🟢 ColorMathBenchmark.ToColor(Colors: 4096) · Linux · 14.21 µs → 5.20 µs (-63%)
  • 🟢 PathBoundsBenchmark.TightBounds(Points: 1024) · Linux · 12.46 µs → 6.71 µs (-46%)
  • 🟢 ColorParseBenchmark.Parse(Iterations: 1000) · Linux · 77.87 µs → 43.84 µs (-44%)
  • 🟢 ColorMathBenchmark.PreMultiply(Colors: 4096) · Linux · 12.85 µs → 7.70 µs (-40%)
  • 🟢 PathBoundsBenchmark.TightBounds(Points: 64) · Linux · 972.9 ns → 606.6 ns (-38%)
  • …and 72 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 14.21 µs 5.20 µs 🟢 -63%
PathBoundsBenchmark.TightBounds(Points: 1024) 12.46 µs 6.71 µs 🟢 -46%
ColorParseBenchmark.Parse(Iterations: 1000) 77.87 µs 43.84 µs 🟢 -44%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.85 µs 7.70 µs 🟢 -40%
PathBoundsBenchmark.TightBounds(Points: 64) 972.9 ns 606.6 ns 🟢 -38%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.45 µs 7.21 µs 🟢 -37%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.13 µs 8.31 µs 🟢 -37%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.50 µs 2.95 µs 🟢 -35%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 248.61 µs 163.18 µs 🟢 -34%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.73 µs 1.79 µs 🟢 -34%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 72.11 µs 48.29 µs 🟢 -33%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 245.48 µs 164.65 µs 🟢 -33%
MatrixOpsBenchmark.Concat(Count: 4096) 217.23 µs 145.98 µs 🟢 -33%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 234.55 µs 158.60 µs 🟢 -32%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 216.0 ns 146.1 ns 🟢 -32%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 97.06 µs 65.70 µs 🟢 -32%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 908.98 µs 616.49 µs 🟢 -32%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 7.58 ms 5.17 ms 🟢 -32%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 14.68 µs 10.13 µs 🟢 -31%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 342.37 µs 237.03 µs 🟢 -31%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.29 ms 901.97 µs 🟢 -30%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.95 ms 1.36 ms 🟢 -30%
MatrixMapPointsBenchmark.MapVector(Points: 256) 11.07 µs 7.78 µs 🟢 -30%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 176.19 µs 124.13 µs 🟢 -30%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.62 ms 1.85 ms 🟢 -29%
…and 9 more

Windows

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 97.87 µs 130.16 µs 🔴 +33%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 169.5 ns 219.4 ns 🔴 +29%
PathBoundsBenchmark.TightBounds(Points: 1024) 15.52 µs 20.05 µs 🔴 +29%
PathBoundsBenchmark.TightBounds(Points: 64) 1.52 µs 1.88 µs 🔴 +24%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 8.64 µs 10.35 µs 🔴 +20%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 141.42 µs 168.59 µs 🔴 +19%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 251.73 µs 292.03 µs 🔴 +16%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.32 µs 2.64 µs 🔴 +14%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 9.89 ms 10.96 ms 🔴 +11%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.29 µs 14.71 µs 🔴 +11%
MatrixOpsBenchmark.Concat(Count: 4096) 217.86 µs 240.31 µs 🔴 +10%
CanvasDrawBenchmark.Draw(Shapes: 512) 21.22 ms 23.40 ms 🔴 +10%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.99 µs 14.29 µs 🔴 +10%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.66 ms 2.93 ms 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 129.74 µs 142.45 µs 🔴 +10%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.28 µs 12.26 µs 🔴 +9%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.88 ms 3.05 ms 🔴 +6%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 324.61 µs 343.56 µs 🔴 +6%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.22 ms 1.29 ms 🔴 +6%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 39.18 µs 41.43 µs 🔴 +6%
ColorParseBenchmark.Parse(Iterations: 1000) 79.40 µs 83.60 µs 🔴 +5%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.51 ms 2.64 ms 🔴 +5%

macOS

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 170.28 µs 225.41 µs 🔴 +32%
ColorMathBenchmark.ToColor(Colors: 4096) 19.95 µs 25.93 µs 🔴 +30%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 559.98 µs 726.17 µs 🔴 +30%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 8.32 ms 5.90 ms 🟢 -29%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.02 µs 6.24 µs 🔴 +24%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.66 ms 1.30 ms 🟢 -22%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 720.67 µs 873.28 µs 🔴 +21%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.38 ms 1.67 ms 🔴 +20%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 113.57 µs 134.97 µs 🔴 +19%
MatrixOpsBenchmark.Concat(Count: 4096) 131.66 µs 155.75 µs 🔴 +18%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 153.7 ns 180.9 ns 🔴 +18%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 198.02 µs 232.52 µs 🔴 +17%
CanvasDrawBenchmark.Draw(Shapes: 512) 10.93 ms 12.82 ms 🔴 +17%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 72.73 µs 82.12 µs 🔴 +13%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.78 ms 1.58 ms 🟢 -11%
ColorMathBenchmark.PreMultiply(Colors: 4096) 9.10 µs 10.00 µs 🔴 +10%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.33 ms 6.84 ms 🔴 +8%
ColorParseBenchmark.Parse(Iterations: 1000) 81.57 µs 75.35 µs 🟢 -8%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 800.61 µs 745.07 µs 🟢 -7%
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.64 µs 2.82 µs 🔴 +7%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 43.70 µs 46.51 µs 🔴 +6%

📈 Full interactive perf-dashboard & run details →

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical workflow flaws can mix build revisions, let non-publishing runs displace queued deployments, and allow cancelled runs to publish.

3 open issues
What changed in this PR

This PR separates site validation from publishing so every PR, including forks, builds the documentation and apps. It allows production docs to publish when an app fails; the Uno layout repair remains separate in #5771.

Changes:

  • Splits the site build into setup, DocFX, shared WASM natives, parallel app builds, assembly, and deployment.
  • Restricts publishing by source and preview policy, and gates Go Live on a successful upstream publishing job.
  • Documents the build policy and two-stage publishing process.
File Description
documentation/​dev/​site.md Documents site components, validation rules, and publishing stages.
.github/​workflows/​build-site.yml Separates parallel builds, artifact assembly, and conditional deployment.
.github/​workflows/​build-site-go-live.yml Checks the upstream publishing job before deploying GitHub Pages.

Review effort: Balanced

Comment on lines +73 to +75
deploy:
needs: check
if: needs.check.outputs.publish == 'true'
is_staging: ${{ steps.vars.outputs.is_staging }}
pr_number: ${{ steps.vars.outputs.pr_number }}
publish: ${{ steps.vars.outputs.publish }}
checkout_ref: ${{ steps.vars.outputs.checkout_ref }}
group: "docs-deploy-${{ needs.setup.outputs.is_staging == 'true' && format('pr-{0}', needs.setup.outputs.pr_number) || 'main' }}"
cancel-in-progress: true
if: |
always() &&
@mattleibow
mattleibow merged commit ebafb15 into main Nov 16, 2026
94 of 119 checks passed
@mattleibow
mattleibow deleted the mattleibow-site-build-resilient-apps branch November 16, 2026 21:31
@github-actions github-actions Bot added this to the 4.159.0-rc.1 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants