Skip to content

ci: Skip the Flatpak disk cleanup when the runner has room - #428

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:infra/ci-speed
Oct 13, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:infra/ci-speed

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #427. Stops the Flatpak job from spending 1–2 minutes of every run deleting runner tools it doesn't need. Under #436/#440, Flatpak moves to the release gate, so this shortens the gate's run. It applies cleanly on top of #440.

What it does

Before every build, "Prepare build space" deletes about 24 GB of preinstalled runner tools (Android SDK, CodeQL, .NET, Swift, GHCup, Python). It's inherited from upstream (b6524fef5, Nov 2025), from a time when hosted runners had much less free disk.

The cleanup now runs only when less than 40 GiB is free. That's the build's measured peak (16 GiB) with a 2.5x margin, so a runner image with less room still gets the cleanup.

Measured (in this PR's earlier runs, with a temporary disk sampler since removed): the runner starts with 84 GiB free; the build peaks at 16 GiB, both on PR runs and on a run simulating a master push (full debuginfo, ccache prune and cache save). With the change: 84 GiB free, 40 GiB needed: skipping cleanup, and the step drops from 58 s–1 min 41 s to 0 s.

Dropped from this PR: the 5-second disk sampler and its job-summary report (polling for the whole job isn't worth it once the number is known), a PR-only debuginfo strip (Flatpak no longer runs on PRs after #436) and a push.yaml concurrency change.

Testing: actionlint reports nothing new on the changed lines. The numbers come from this PR's runs.

Refs #427

🤖 Generated with Claude Code

@rdoupe
rdoupe force-pushed the infra/ci-speed branch 3 times, most recently from a3999e0 to 8fc16de Compare October 13, 2026 03:06
@zackees
zackees marked this pull request as ready for review October 13, 2026 03:06
@zackees

zackees commented Oct 13, 2026

Copy link
Copy Markdown
Member

Also, the thing here is that we need to have CI-only builds and then secondary release-related builds so that we can aggregate all of the long-running build failures into just one final process rather than having it build on every small iteration.

@zackees

zackees commented Oct 13, 2026

Copy link
Copy Markdown
Member

Any fix that you can put in is welcome, of course, but there's going to be a big fix coming on this to massively speed this up.

@rdoupe rdoupe changed the title ci: Measure the Flatpak job's peak disk use ci: Cut per-run waste from the Flatpak job and master builds Oct 13, 2026
@rdoupe
rdoupe force-pushed the infra/ci-speed branch 2 times, most recently from 89a38e4 to a2c81c1 Compare October 13, 2026 03:19
@rdoupe rdoupe changed the title ci: Cut per-run waste from the Flatpak job and master builds ci: Skip the Flatpak disk cleanup when the runner has room Oct 13, 2026
@rdoupe

rdoupe commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Saw #436/#440. We'll stick to small, individual fixes for wasted time in specific jobs and stay clear of the restructuring.

This PR is down to the Flatpak disk-cleanup skip (measured: 16 GiB peak, 84 GiB free, 1–2 min saved per run). It applies cleanly on top of #440, so it still helps the release gate. Ready to merge when CI is green. #438 caches the Tier 2 Linux Docker image, which stays in the PR path under #440. It's a draft until I've measured the warm run.

Do you want caching for the jobs moving into the release gate (Tier 2 macOS/Windows, the Windows build), and the small dev-cycle trims (brew → uvx in the Format jobs, apt instead of brew for zsh in the Ubuntu build)? Or leave them?

The Flatpak job deletes about 24 GB of preinstalled runner tools
(Android, CodeQL, .NET, Swift, GHCup, Python) before every build, which
takes 1-2 minutes. Measured in this PR's runs, the runner starts with
84 GiB free and the build peaks at 16 GiB, both on PR runs and on a run
simulating a master push.

Run the cleanup only when less than 40 GiB is free, the measured peak
with a 2.5x margin, so a runner image with less room still gets it.

Refs obs-rust#427

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees

zackees commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Saw #436/#440. We'll stick to small, individual fixes for wasted time in specific jobs and stay clear of the restructuring.

This PR is down to the Flatpak disk-cleanup skip (measured: 16 GiB peak, 84 GiB free, 1–2 min saved per run). It applies cleanly on top of #440, so it still helps the release gate. Ready to merge when CI is green. #438 caches the Tier 2 Linux Docker image, which stays in the PR path under #440. It's a draft until I've measured the warm run.

Do you want caching for the jobs moving into the release gate (Tier 2 macOS/Windows, the Windows build), and the small dev-cycle trims (brew → uvx in the Format jobs, apt instead of brew for zsh in the Ubuntu build)? Or leave them?

I want the cross compilation handled by soldr.

Linux -> win
Linux -> macos aarch
Linux -> macos x64

We are in a rust build now right?

soldr and setup-soldr offer ci cachable artifacts. Dylint for all platforms on linux through setup-soldr, which caches windows/macos system libs.

ci runs dylint on every pr push

see zackees/ci.yml for policy guidance

@zackees
zackees merged commit 0fa12a1 into obs-rust:master Oct 13, 2026
20 checks passed
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.

2 participants