Skip to content

Split the pipeline up on release builds - #3247

Merged
mattleibow merged 26 commits into
mainfrom
dev/ci-split
Apr 24, 2025
Merged

mattleibow merged 26 commits into
mainfrom
dev/ci-split

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Description of Change

With all the scripts and steps added internally for security, compliance and product tracing, the yaml just got too big.

This PR splits out the various stages into templates, and then depending on the actual pipeline being run it will either be the Native -> Package -> Tests pipeline (release builds), or the complete pipeline (public builds).

@mattleibow
mattleibow merged commit cca7747 into main Apr 24, 2025
@mattleibow
mattleibow deleted the dev/ci-split branch April 24, 2025 15:52
mattleibow added a commit that referenced this pull request Apr 25, 2025
* Split the pipeline up on release builds (#3247)

* [azure-pipelines-native] Add CI triggers for primary branches (#3248)

* [azure-pipelines-native] Add CI triggers for primary branches

* Remove dev branches from CI trigger

* Update azure-pipelines-native.yml

---------

Co-authored-by: Matthew Leibowitz <[email protected]>

* Add a cron job to make sure all is well (#3249)

---------

Co-authored-by: Peter Collins <[email protected]>
mattleibow added a commit that referenced this pull request Jun 11, 2026
Fix SKIASHARP_VERSION yaml missed by the m148 bump (#4144)

Context: #4125
Context: #3247
Context: #3574

The m148 milestone bump (#4125) updated every version number in
scripts/VERSIONS.txt to 4.148.0 but left scripts/azure-templates-variables.yml
at SKIASHARP_VERSION: 4.147.0 — even though that variable's own comment requires
it to match the nuget version in VERSIONS.txt. It is a compile-time constant
feeding the BUILD_NUMBER counter expression and cannot be derived dynamically,
so the stale value silently mismatches the rest of the release.

This was not a manual oversight: the update-skia Phase 6 script
(.agents/skills/update-skia/scripts/update-versions.ps1) was pointed at a file
that no longer exists. #3247 moved SKIASHARP_VERSION out of the deleted
scripts/azure-pipelines-variables.yml into scripts/azure-templates-variables.yml
(Apr 2025). When the script was authored in #3574 (Mar 2026) it referenced the
old, already-deleted filename, and its `Test-Path ... else { skip }` guard made
the miss invisible — so the m148 run skipped the file with no error and no gate
failure.

~~ The fix ~~

  * Bump SKIASHARP_VERSION to 4.148.0 in scripts/azure-templates-variables.yml.
  * Repoint update-versions.ps1 Step 3 at scripts/azure-templates-variables.yml,
    replace only the SKIASHARP_VERSION line via a targeted regex, and hard-fail
    (Write-Error) if the file is missing instead of silently skipping — a future
    rename now breaks loudly.
  * Replace the stale-only verification (which merely checked the old milestone
    number was gone) with a positive assertion that SKIASHARP_VERSION exactly
    equals the target nuget version. Per GPT-5.5 review the old check would have
    falsely passed if the value were stuck on a different milestone (e.g.
    4.146.0, where the replace is a no-op) or carried a suffix (4.147.0-preview.2
    -> 4.148.0-preview.2 no longer contains 147).
  * Update SKILL.md and references/typical-changes.md to the correct filename.

Verified: PowerShell parses clean; simulated the gate against 4.146.0 (fails as
expected) and 4.147.0 (passes at 4.148.0).

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot <[email protected]>
mattleibow added a commit that referenced this pull request Jul 29, 2026
It was the only continueOnError: true in the repo (from #3247). A leg that
cannot turn the build red cannot report a regression either, which is the same
failure mode this branch exists to remove. The bootstrapper already defaults
the parameter to false, so deleting the line is the whole change.

Mac Catalyst has no graphite-metal.maccatalyst goldens, so this is expected to
surface as an unseeded failure until they are harvested.
mattleibow added a commit that referenced this pull request Jul 31, 2026
[tests] Make GPU tests required; skip only when declared (#4575)

Context: #4575
Context: documentation/dev/gpu-test-policy.md

GPU tests brought a backend up inside a try/catch and called Assert.Skip on any
exception. That made "this agent has no GPU" and "this binding is broken"
indistinguishable, and reported both as green. The committed goldens recorded
what it cost: ganesh-gl had a golden for macOS only, and graphite-dawn had none
at all, so those backends had been skipping everywhere for as long as they had
existed. Nobody could answer which backends actually ran.

Invert the default. A backend is now required on every platform listed in
GpuPolicy.RequiredOn, which mirrors the gn args in native/*/build.cake, and a
skip has to be declared. Failing to bring a required backend up is a test
failure, so RendererUnavailableException is deleted along with every catch that
swallowed it.

Skips come from exactly two places, kept separate because that distinction is
what a reader needs when a test skips:

  * the compiled-in table is a statement about a platform — Metal is not
    required off Apple because we do not build it there
  * SKIASHARP_TEST_SKIP_GPU is a statement about one agent, declared per leg in
    scripts/azure-templates-stages-test.yml with its reason and tracking issue
    inline, so it can be removed when that agent gains the capability without
    touching the policy or the documentation

Device and browser hosts never see the agent environment, so the same list
reaches them through the SkiaSharpTestSkipGpu MSBuild property baked into
runtimeconfig.json. An unrecognised backend id is an error, so a typo cannot
quietly leave a backend required.

~~ Latent bugs the required tests surfaced ~~

Five real bugs, every one of them previously invisible as a skip:

  * DllImport used the unversioned libGL and libX11 SONAMEs, which are linker
    symlinks shipped only in -dev packages. Linux GL could never load, and
    every GL test skipped silently for as long as that binding existed.
  * GlxContext.Destroy never called XCloseDisplay — the binding was not even
    declared — leaking an X11 connection per GPU test.
  * SKBlenderTest asserted exact colour equality across two GPU shader paths.
    llvmpipe returns #ff5e0000 where the other path returns #ff5d0000. Raster
    stays exact; the GPU subclass allows a tolerance of one.
  * The Windows software Vulkan ICD was staged for win-x64 only, so x86 had no
    loader and 21 of 25 Vulkan tests failed.
  * Win32VkContext built a Vulkan 1.0 instance and set no MaxAPIVersion, so
    GRContext.CreateVulkan returned null and the test reported an
    ArgumentNullException three frames from the real problem. Skia has required
    1.1 unconditionally since m139 [0] and acquires the core 1.1 device procs
    with no version gate; vkGetDeviceProcAddr gates those on the instance's
    apiVersion, so all nine came back null. It passed against CI's SwiftShader,
    which reports device 1.3.0, and failed on an AMD device reporting 1.4.329 —
    the result depended on the agent's driver.

~~ Limits that are declared, not fixed ~~

Fourteen opt-outs remain, each naming its cause. This is not a regression —
every one was already skipping silently — but they are now enumerable, and
#4591 tracks closing them.

  * Metal is unusable on all three Apple hosts, for three unrelated reasons:
    virtualized Metal hangs the macOS host on shutdown (#4598), Mac Catalyst
    never sees the Mac2 GPU family (#4599), and the iOS simulator cannot
    compile Graphite's gradient pipeline (#4555)
  * Linux GL crashes the host once GLX loads, exiting 7 after 523, 312, 5068
    and 0 tests with zero test failures and no TRX published. The XCloseDisplay
    fix above did not resolve it (#4590)
  * the headless browser the runner launches exposes no WebGPU adapter and the
    runner has no flag passthrough; reported upstream

~~ Structural fallout ~~

The .NET Framework leg is now two jobs. SwiftShader's LLVM JIT cannot resolve
__chkstk in a 32-bit process, so software Vulkan crashes the host on x86 while
x64 runs the same suite green. GpuPolicy models the OS but not the
architecture, so separate jobs are what let x86 opt out while x64 keeps Vulkan
required, and any future x64/x86 divergence becomes visible on its own leg.

Mac Catalyst also stops being non-gating. It carried the repo's only
continueOnError: true, added in #3247, which is the same failure mode this
change exists to remove.

~~ Filed from the Vulkan investigation ~~

  * #4600 — MaxAPIVersion's default of 0 makes Skia trust the loader's version
    rather than the instance's. Worse, since m140 [1] the minimum-version check
    is SK_ABORT rather than a graceful null, so a consumer who correctly
    declares Vulkan 1.0 now aborts the process instead of being able to fall
    back to raster.
  * #4601 — fDeviceLostProc and fDeviceLostContext are not exposed, so
    consumers get no notification on VK_ERROR_DEVICE_LOST.

[0]: https://skia.googlesource.com/skia/+/0a3150b03b
[1]: https://skia.googlesource.com/skia/+/dfea59a30f

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot App <[email protected]>
mattleibow added a commit that referenced this pull request Aug 4, 2026
[tests] Make GPU tests required; skip only when declared (#4575)

Context: #4575
Context: documentation/dev/gpu-test-policy.md

GPU tests brought a backend up inside a try/catch and called Assert.Skip on any
exception. That made "this agent has no GPU" and "this binding is broken"
indistinguishable, and reported both as green. The committed goldens recorded
what it cost: ganesh-gl had a golden for macOS only, and graphite-dawn had none
at all, so those backends had been skipping everywhere for as long as they had
existed. Nobody could answer which backends actually ran.

Invert the default. A backend is now required on every platform listed in
GpuPolicy.RequiredOn, which mirrors the gn args in native/*/build.cake, and a
skip has to be declared. Failing to bring a required backend up is a test
failure, so RendererUnavailableException is deleted along with every catch that
swallowed it.

Skips come from exactly two places, kept separate because that distinction is
what a reader needs when a test skips:

  * the compiled-in table is a statement about a platform — Metal is not
    required off Apple because we do not build it there
  * SKIASHARP_TEST_SKIP_GPU is a statement about one agent, declared per leg in
    scripts/azure-templates-stages-test.yml with its reason and tracking issue
    inline, so it can be removed when that agent gains the capability without
    touching the policy or the documentation

Device and browser hosts never see the agent environment, so the same list
reaches them through the SkiaSharpTestSkipGpu MSBuild property baked into
runtimeconfig.json. An unrecognised backend id is an error, so a typo cannot
quietly leave a backend required.

~~ Latent bugs the required tests surfaced ~~

Five real bugs, every one of them previously invisible as a skip:

  * DllImport used the unversioned libGL and libX11 SONAMEs, which are linker
    symlinks shipped only in -dev packages. Linux GL could never load, and
    every GL test skipped silently for as long as that binding existed.
  * GlxContext.Destroy never called XCloseDisplay — the binding was not even
    declared — leaking an X11 connection per GPU test.
  * SKBlenderTest asserted exact colour equality across two GPU shader paths.
    llvmpipe returns #ff5e0000 where the other path returns #ff5d0000. Raster
    stays exact; the GPU subclass allows a tolerance of one.
  * The Windows software Vulkan ICD was staged for win-x64 only, so x86 had no
    loader and 21 of 25 Vulkan tests failed.
  * Win32VkContext built a Vulkan 1.0 instance and set no MaxAPIVersion, so
    GRContext.CreateVulkan returned null and the test reported an
    ArgumentNullException three frames from the real problem. Skia has required
    1.1 unconditionally since m139 [0] and acquires the core 1.1 device procs
    with no version gate; vkGetDeviceProcAddr gates those on the instance's
    apiVersion, so all nine came back null. It passed against CI's SwiftShader,
    which reports device 1.3.0, and failed on an AMD device reporting 1.4.329 —
    the result depended on the agent's driver.

~~ Limits that are declared, not fixed ~~

Fourteen opt-outs remain, each naming its cause. This is not a regression —
every one was already skipping silently — but they are now enumerable, and

  * Metal is unusable on all three Apple hosts, for three unrelated reasons:
    virtualized Metal hangs the macOS host on shutdown (#4598), Mac Catalyst
    never sees the Mac2 GPU family (#4599), and the iOS simulator cannot
    compile Graphite's gradient pipeline (#4555)
  * Linux GL crashes the host once GLX loads, exiting 7 after 523, 312, 5068
    and 0 tests with zero test failures and no TRX published. The XCloseDisplay
    fix above did not resolve it (#4590)
  * the headless browser the runner launches exposes no WebGPU adapter and the
    runner has no flag passthrough; reported upstream

~~ Structural fallout ~~

The .NET Framework leg is now two jobs. SwiftShader's LLVM JIT cannot resolve
__chkstk in a 32-bit process, so software Vulkan crashes the host on x86 while
x64 runs the same suite green. GpuPolicy models the OS but not the
architecture, so separate jobs are what let x86 opt out while x64 keeps Vulkan
required, and any future x64/x86 divergence becomes visible on its own leg.

Mac Catalyst also stops being non-gating. It carried the repo's only
continueOnError: true, added in #3247, which is the same failure mode this
change exists to remove.

~~ Filed from the Vulkan investigation ~~

  * #4600 — MaxAPIVersion's default of 0 makes Skia trust the loader's version
    rather than the instance's. Worse, since m140 [1] the minimum-version check
    is SK_ABORT rather than a graceful null, so a consumer who correctly
    declares Vulkan 1.0 now aborts the process instead of being able to fall
    back to raster.
  * #4601 — fDeviceLostProc and fDeviceLostContext are not exposed, so
    consumers get no notification on VK_ERROR_DEVICE_LOST.

[0]: https://skia.googlesource.com/skia/+/0a3150b03b
[1]: https://skia.googlesource.com/skia/+/dfea59a30f

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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.

1 participant