Repository navigation
Move public CI to dnceng agents and provision required tools - #4565
Conversation
Move the public CI Linux and Windows jobs to NetCore-Public images, update the native macOS host to macOS 15, and correct the generic host OS metadata. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
📦 Try the packages from this PRWarning 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 -- 4565PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4565"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4565/packages --name skiasharp-pr-4565More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4565 |
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
📊 SkiaSharp benchmarks — PR #4565⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 42 slower · 🟢 34 faster
📦 Allocations — 🔴 1 more alloc · 🟢 0 less alloc
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
📦 Allocations (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
NetCore-Public Windows images do not expose python3 on PATH by default. Activate the requested Python toolchain before cached jobs invoke repo-deps.py. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
NetCore-Public Ubuntu build agents do not expose /dev/kvm, so retain the hosted Ubuntu 24.04 agent required by the Android emulator. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
📦 Artifact size reportPackages from this PR (build Total Packages
+38 package(s) unchanged (< 50.0 KB). Per-file changes
|
| File | Size |
|---|---|
runtimes/win-x64/native/libGLESv2.pdb |
66.7 MB → 66.5 MB (🟢 −128.0 KB) |
runtimes/win-arm64/native/libGLESv2.pdb |
64.5 MB → 64.4 MB (🟢 −64.0 KB) |
runtimes/win-x86/native/libGLESv2.pdb |
67.2 MB → 67.2 MB (🟢 −32.0 KB) |
Informational only — this never blocks the PR. Native binaries are labelled by os/arch.
NetCore-Public Ubuntu build images do not include a browser. Install Chrome and expose CHROME_PATH before the stable and preview browser-based WASM test jobs. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Activate Python before every job, install Android tooling when requested on Linux, and invoke the WASM Chrome provisioner through Bash. These prerequisites were previously supplied by Microsoft-hosted images. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Azure Pipelines normalizes task variables when exporting them on Linux. Pass the installed SDK paths explicitly so MSBuild receives the case-sensitive AndroidSdkDirectory property. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
The VS 2026 dnceng image includes Ninja but not Chocolatey. Avoid invoking the package manager when Ninja is already available on PATH. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Reuse 7-Zip from its standard installation path when available and update the removed 21.07 fallback package to the current official 26.02 release. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Pass the selected Visual Studio installation into Cake and install Windows SDK 19041 for native Windows jobs. The VS 2026 public image does not expose either prerequisite in the same way as hosted Windows 2022. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
The VS 2026 public image does not include the Spectre-mitigated libraries required by SkiaSharp's native Windows builds. Keep managed Windows on VS 2026 while using the compatible NetCore-Public VS 2022 image for native assets. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
SkiaSharp native Windows builds require the optional Spectre libraries that the lean VS 2022 and VS 2026 images omit. Use the NetCore-Public approved Windows 2022 hosted image for native assets while keeping managed jobs on VS 2026. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Install Node 20 for Windows managed and packaging jobs, and pass the Linux Android SDK root directly to MSBuild as AndroidSdkDirectory instead of relying on environment-name casing. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Xamarin.Android rejects an SDK root that contains only command-line tools and platform packages. Install platform-tools so managed Linux builds receive a complete, valid Android SDK. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Managed Android targets require aapt/aapt2 from the SDK Build-Tools packages. Install the matching Android 35 and 36 build tools alongside platform-tools and platform APIs. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f7862765-7850-4c1b-97ed-b69a5947e3fa
Use simctl directly and wait for CoreSimulator to confirm the device is booted. This lets the existing task retry recover from transient boot failures instead of hanging until the three-hour job timeout. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 47852a12-8636-48a0-8c9c-f3f9b3db8a60
There was a problem hiding this comment.
Pull request overview
This PR updates SkiaSharp’s public Azure DevOps CI to use dnceng NetCore-Public build agents for Linux and Windows legs (and moves macOS to macOS-15 on hosted agents), along with a few supporting bootstrap/provisioning tweaks needed for the new images.
Changes:
- Migrate Linux/Windows jobs to
NetCore-PublicwithImageOverridedemands, and correct the generic host agentosmetadata tolinux. - Improve provisioning robustness across the new agent images (early Python selection, ensure Ninja availability, ensure Android SDK path is passed through).
- Add Chrome installation for Linux WASM test legs and adjust iOS simulator boot sequence to use
xcrun simctl.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/azure-pipelines-complete.yml | Switches public CI pools to NetCore-Public (Linux/Windows), updates macOS image to macos-15, fixes host os metadata. |
| scripts/azure-templates-jobs-bootstrapper.yml | Moves Python selection earlier, adds Node install on Windows managed legs, expands Android SDK provisioning, and propagates Android env vars into Cake runs. |
| scripts/azure-templates-stages-test.yml | Adds a pre-build step to install Chrome for WASM test legs on Linux. |
| scripts/infra/managed/install-chrome.sh | New helper to install Google Chrome on Linux agents and expose its path. |
| scripts/infra/shared/shared.cake | Plumbs ANDROID_SDK_ROOT into MSBuild properties via AndroidSdkDirectory. |
| scripts/infra/native/shared/install-ninja.ps1 | Skips installing Ninja when it’s already available (prints version and exits). |
| scripts/infra/native/windows/install-7zip.ps1 | Updates 7-Zip detection/install flow and download source/version for Windows agents. |
| scripts/infra/tests/tests-apple.cake | Boots iOS simulators via xcrun simctl and explicitly waits for boot completion. |
Pin Chrome to an immutable repository artifact and verify its SHA-256, package identity, version, and architecture before installation. Verify the pinned 7-Zip MSI against the digest published with its GitHub release, and remove redundant same-name Android environment mappings while preserving the case-sensitive MSBuild property. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 47852a12-8636-48a0-8c9c-f3f9b3db8a60
Restore the pinned dotnet-apple 0.8.10 simulator boot command so CI can determine whether the prior false-success boot failure is reproducible before reporting it upstream. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 47852a12-8636-48a0-8c9c-f3f9b3db8a60
Limit Get-Command to applications and select the first executable so duplicate PATH entries cannot turn the resolved path into an array. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 47852a12-8636-48a0-8c9c-f3f9b3db8a60
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
scripts/azure-templates-jobs-bootstrapper.yml:374
- Typo in comment: "verions" → "versions".
# There seems to be a bug in some verions of mspdbcmf.exe. This looks to be fixed in a VS preview.
scripts/infra/native/shared/install-ninja.ps1:6
Get-Command ninjawill also succeed for PowerShell functions/aliases namedninja. In that case this branch will run, butninja --versionmay not invoke the actual executable (or may fail), and the script will exit without attempting to install Ninja. Prefer resolving the application path explicitly (as done in the 7-Zip script) and invoke that path.
if (Get-Command ninja -ErrorAction SilentlyContinue) {
ninja --version
exit $LASTEXITCODE
} elseif ($IsMacOS) {
[CI] Move public builds to dnceng agents (#4565) Context: #4565 Move eligible Linux and managed Windows jobs from Microsoft-hosted agents to the dnceng NetCore-Public pool. Keep workloads requiring capabilities absent from the lean images on approved hosted agents: Android emulator tests need KVM, native Windows builds need the complete VS 2022 toolchain with Spectre libraries, and native macOS uses macOS 15. The hosted images previously supplied several undeclared prerequisites. Provision Python, Node 20, Android platform and build tools, and Chrome where required; pass AndroidSdkDirectory explicitly to MSBuild; and reuse existing Ninja and 7-Zip installations before installing fallbacks. Pin direct Chrome and 7-Zip downloads and verify their SHA-256 digests before installation. Also validate Chrome package identity, version, and architecture so compromised or unexpectedly changed artifacts fail before execution. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Matt Mitchell <[email protected]> Co-authored-by: Copilot App <[email protected]>
Description
Move eligible public CI jobs from Microsoft-hosted agents to the dnceng
NetCore-Publicpool and explicitly provision the tools that lean public images do not include.Linux jobs now use
build.ubuntu.2204.amd64.open, while managed Windows jobs usewindows.vs2026.amd64.open. Jobs that require capabilities unavailable on those images remain on approved hosted agents: Android emulator tests need/dev/kvm, native Windows builds need the complete Visual Studio 2022 toolchain with Spectre-mitigated libraries, and native macOS moves to macOS 15 because dnceng has no macOS build-agent image. The generic Linux host metadata is also corrected fromwindowstolinux.Validation of the new images exposed several implicit hosted-agent dependencies. The shared bootstrapper now provisions Python, Node 20, Android platform/build tools, and Chrome where required; forwards the Android SDK path to MSBuild with the correct property casing; and reuses existing Ninja and 7-Zip installations before installing fallbacks. Direct Chrome and 7-Zip downloads are pinned and SHA-256 verified, with Chrome package identity, version, and architecture checked before installation.
Related issues
None.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
None — CI-only, with no public API or application behavior change.
Testing
No product tests were added because this changes only CI infrastructure and provisioning.
Checklist
Changesabove lists all public API and behavioral changes (or "None.")mono/skiaPR linked above and bindings regenerated — not applicable