Skip to content

ci: pipeline overhaul — deps isolation, cache lifecycle, progress pings - #8

Open
JaKuBisz wants to merge 5 commits into
devfrom
ci/pipeline-overhaul
Open

ci: pipeline overhaul — deps isolation, cache lifecycle, progress pings#8
JaKuBisz wants to merge 5 commits into
devfrom
ci/pipeline-overhaul

Conversation

@JaKuBisz

Copy link
Copy Markdown
Owner

What

Pipeline overhaul per the analysis in the session plan (see commit messages for full detail):

  • Standalone deps.yml — deps builds get a non-cancelling per-OS/arch concurrency group, so rapid pushes can no longer kill a 2h macOS superbuild mid-flight (a cancelled job saves no cache). Nightly force-rebuild machinery included but disabled; manual force: true dispatch works.
  • Probe layer deletedbuild_check_cache.yml ran on ubuntu-latest and could never match OS-versioned win/mac cache entries; the deps job self-decides via in-job restore.
  • Compiler caches: sccache native GHA backend on mac/win (per-object, no tarball churn, READ_ONLY on PRs); weekly-epoch ccache keys on linux with prefix fallback, restore-only on PRs.
  • macOS deps split per-arch across two runners (mirrors the app split; full vCPUs each).
  • mold linker on Ubuntu app builds.
  • cleanup-caches.yml — weekly + on branch delete, purges caches on refs that no longer resolve (39% of the 10 GB budget was stranded on dead branches).
  • Release plumbing — Homebrew/WinGet gated to manual dispatch with fail-fast secret guards (neither could work: no HOMEBREW_TAP_TOKEN/WINGET_TOKEN secrets; winget matches .exe which is never built); Homebrew dmg asset auto-discovered instead of hardcoded macos-15; release-on-build skips deps-only runs and never ships BambuStudio_dep_* archives.
  • Progress pings — every 25th Ninja [done/total] line is mirrored as a ::notice annotation, so the run summary page shows a progress trail.
  • Latent fix: per-arch app-bundle artifact names include the OS (macos-15 and macos-26 legs share a run; upload-artifact v4+ rejects duplicate names).

Expected first-run behavior (smoke test)

  • Ubuntu: deps HIT, ccache warm via prefix fallback → ~5-9 min
  • Windows: deps HIT, sccache GHA cold → one full app recompile (~50-75 min)
  • macOS-26: new per-arch deps keys → COLD superbuild ×2 legs (~1.5-2.5 h each, parallel), cold sccache
  • PR compiler caches are restore-only — warming happens on the first dev push after merge

Validation so far

  • actionlint: 0 errors on all workflows + composite actions
  • deps-cache-key logic dry-run: all 8 os×arch combos produce intended key/path
  • cleanup script dry-run against live API (deletes stubbed): clean
  • awk/pwsh progress passthrough tested locally

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@JaKuBisz JaKuBisz closed this Aug 29, 2026
@JaKuBisz JaKuBisz reopened this Aug 29, 2026
@JaKuBisz

Copy link
Copy Markdown
Owner Author

retrigger

@JaKuBisz JaKuBisz closed this Aug 29, 2026
@JaKuBisz JaKuBisz reopened this Aug 29, 2026
…bing

Squashed rebase onto dev (c467500); supersedes the commit series up to
bc58a25. Validated by PR #8 smoke runs (composite template fix, per-arch
mac deps seeded, universal packaging, progress pings all proven live).

- deps.yml: standalone, non-cancelling per-OS/arch deps builds; push on
  deps/** + manual force dispatch (nightly present but disabled)
- Probe layer deleted; deps jobs self-decide via in-job cache restore
- macOS deps split per-arch (full vCPUs per leg, mirrors the app split)
- sccache native GHA backend on macOS (per-object, READ_ONLY on PRs);
  weekly-epoch ccache on Linux with prefix fallback, restore-only on PRs;
  zeroed stats per run
- mold linker on Ubuntu app builds
- One retry on deps build steps (transient download 5xx, e.g. the glfw 504
  that killed a smoke leg)
- cleanup-caches.yml: weekly + on branch delete, purges unreachable caches
- Release plumbing: Homebrew/WinGet gated to manual dispatch with fail-fast
  secret guards; Homebrew dmg auto-discovered; prerelease skips deps-only
  runs and never ships BambuStudio_dep_* archives
- Latent fix: per-OS app-bundle artifact names (upload-artifact v4+ rejects
  duplicate names when macos-15 and macos-26 legs share a run)
- Windows stays on dev VS-generator + msbuild /m approach (Ninja+sccache
  was a dead end — PCH /Yu is uncacheable); NOMINMAX defined for future
  PCH-off attempts
- ::notice progress pings from Ninja output on mac/linux build steps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JaKuBisz added a commit that referenced this pull request Aug 29, 2026
…bing

Squashed rebase onto dev (c467500); supersedes the commit series up to
bc58a25. Validated by PR #8 smoke runs (composite template fix, per-arch
mac deps seeded, universal packaging, progress pings all proven live).

- deps.yml: standalone, non-cancelling per-OS/arch deps builds; push on
  deps/** + manual force dispatch (nightly present but disabled)
- Probe layer deleted; deps jobs self-decide via in-job cache restore
- macOS deps split per-arch (full vCPUs per leg, mirrors the app split)
- sccache native GHA backend on macOS (per-object, READ_ONLY on PRs);
  weekly-epoch ccache on Linux with prefix fallback, restore-only on PRs;
  zeroed stats per run
- mold linker on Ubuntu app builds
- One retry on deps build steps (transient download 5xx, e.g. the glfw 504
  that killed a smoke leg)
- cleanup-caches.yml: weekly + on branch delete, purges unreachable caches
- Release plumbing: Homebrew/WinGet gated to manual dispatch with fail-fast
  secret guards; Homebrew dmg auto-discovered; prerelease skips deps-only
  runs and never ships BambuStudio_dep_* archives
- Latent fix: per-OS app-bundle artifact names (upload-artifact v4+ rejects
  duplicate names when macos-15 and macos-26 legs share a run)
- Windows stays on dev VS-generator + msbuild /m approach (Ninja+sccache
  was a dead end — PCH /Yu is uncacheable); NOMINMAX defined for future
  PCH-off attempts
- ::notice progress pings from Ninja output on mac/linux build steps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JaKuBisz
JaKuBisz force-pushed the ci/pipeline-overhaul branch from bc58a25 to c597c18 Compare August 29, 2026 20:44
JaKuBisz and others added 3 commits August 30, 2026 03:14
Post-mortem of the two Ninja-era failures shows neither was caused by Ninja:
- 33226084593 compiled 719/723 fine, died at link on LNK1248 (/Z7) — fixed
  by SLIC3R_MSVC_PDB=0.
- 33265424004 died on exactly one TU (Emboss.cpp, C2589) from the
  PCH-transitive NOMINMAX define — fixed by /DNOMINMAX in CMakeLists.txt.

The VS generator can never be compiler-cached (ignores
CMAKE_*_COMPILER_LAUNCHER; MSBuild resolves cl.exe from the toolset dir),
so Ninja + sccache (GHA backend) + SLIC3R_PCH=OFF is the only path to a
cached Windows build. If further PCH-transitive errors surface, the
fallback is dev's VS-generator approach (f02cf3f).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
hashFiles() hashes checked-out files, and Windows checkouts may produce CRLF
line endings — the identical deps/** tree hashed 5252b38a on Windows vs
20d91bc7 on Ubuntu, so Windows legs can never share a deps key computed
elsewhere (observed live in PR #8 run 33274269792: forced a pointless 70-min
Windows deps rebuild). git hash-object hashes committed blobs (LF-normalized
in the index) — identical on every platform. Verified: both worktrees compute
56c26249.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…he key

- BlacklistedLibraryCheck.cpp used boost::filesystem::path without the
  include (PCH supplied it transitively). Second PCH-transitive fix after
  NOMINMAX/Emboss.cpp; Windows Ninja leg of run 33285233562 failed here at
  [181/720].
- Deps cache key now via git hash-object (EOL-independent; hashFiles gave
  different hashes on Windows CRLF checkouts vs LF elsewhere).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JaKuBisz added a commit that referenced this pull request Aug 30, 2026
hashFiles() hashes checked-out files, and Windows checkouts may produce CRLF
line endings — the identical deps/** tree hashed 5252b38a on Windows vs
20d91bc7 on Ubuntu, so Windows legs can never share a deps key computed
elsewhere (observed live in PR #8 run 33274269792: forced a pointless 70-min
Windows deps rebuild). git hash-object hashes committed blobs (LF-normalized
in the index) — identical on every platform. Verified: both worktrees compute
56c26249.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Ninja+sccache+PCH-off experiment (3 PR runs) proved Ninja compiles fine
but PCH-off requires an unbounded number of PCH-transitive include fixes
(3 one-line fixes in 3 runs; ~300 static candidates). Not worth diverging
src/ from upstream, and the VS generator is inherently uncacheable — so
Windows stays on dev's approach (VS 18 2026 + msbuild /m, SLIC3R_MSVC_PDB=0).

Kept from the experiment: the two include-hygiene fixes (Emboss NOMINMAX
define in CMakeLists, boost/filesystem include in BlacklistedLibraryCheck)
as harmless upstream-compatible hygiene, and the EOL-stable deps cache key.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant