Skip to content

Improve Android CI disk diagnostics#3676

Open
mattleibow wants to merge 8 commits intomainfrom
mattleibow/fix-android-ci-disk-space
Open

Improve Android CI disk diagnostics#3676
mattleibow wants to merge 8 commits intomainfrom
mattleibow/fix-android-ci-disk-space

Conversation

@mattleibow
Copy link
Copy Markdown
Contributor

Summary

  • free additional space on the Ubuntu Android test agent before emulator startup
  • log the largest directories before and after cleanup so we can see what is consuming disk
  • clean the preinstalled .NET tool cache on Linux before reinstalling the pinned SDK

Why

The Android CI lane is failing with AVD startup and DEVICE_NOT_FOUND errors that correlate with low disk space on the hosted image. This PR adds enough diagnostics to confirm the remaining hotspots while also reclaiming more space up front.

Free additional space on the Ubuntu Android test agent and log the largest directories before and after cleanup so we can see what is consuming the hosted image. Also clean the preinstalled .NET tool cache on Linux before reinstalling the pinned SDK.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

📦 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 -- 3676

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-3676/packages --name skiasharp-pr-3676
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-3676

github-actions bot pushed a commit that referenced this pull request Apr 15, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

Use the newer androidsdk.tool local CLI and enable the emulator stability flags supported by the updated avd start command on Linux.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
Delay default font manager and typeface creation until first use and stop forcing that native path during global startup, which avoids the Android app crash seen in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
Keep SKTypeface.Default and SKFontManager.Default lazily initialized to avoid the early Android startup crash, while using the existing ref_default singleton path so font identity and text metrics keep working once the app is running.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
The original eager initialization is the correct  the nativedesign
pointer is needed up front. The Android crash is in the native
sk_typeface_ref_default call itself on API 36 and must be fixed at
the native/C API layer, not by delaying the call.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
Remove the verbose du directory logging steps that were added for
investigation. Keep the actual disk space cleanup, emulator startup
hardening, and other CI improvements.

Also revert the buildExternals pin back to 'latest'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow marked this pull request as ready for review April 16, 2026 15:09
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
@mattleibow mattleibow added the upgrading/4.x Issues and discussions relating to the upgrade from 3.x to 4.x label Apr 16, 2026
@mattleibow mattleibow added this to the 4.x Preview 1 milestone Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upgrading/4.x Issues and discussions relating to the upgrade from 3.x to 4.x

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant