Skip to content

Update LICENSE + CI build-speed and reliability fixes#107

Merged
ccomb merged 5 commits into
mainfrom
ccomb-patch-1
May 29, 2026
Merged

Update LICENSE + CI build-speed and reliability fixes#107
ccomb merged 5 commits into
mainfrom
ccomb-patch-1

Conversation

@ccomb

@ccomb ccomb commented May 29, 2026

Copy link
Copy Markdown
Owner

Started as a LICENSE refresh (so the GitHub API reports the right license); now also carries four CI fixes that came out of profiling the macOS build (~20 min on macos-arm64, ~16 min on macos-intel).

LICENSE

  • Updated LICENSE file.

CI build-speed & reliability (one commit each)

1. Exclude version/synopsis/description from the cabal-store hash (086e507)
The prebuilt cabal-store tag is keyed on sha256(volca.cabal + mumps-hs.cabal + cabal.project). Because volca.cabal carries the version: line, every release bump changed the hash and missed the store — so cutting vX.Y.Z forced a full 5-platform re-prebuild even though the version has no effect on the dependency closure. The filter is kept byte-identical in the _build-matrix.yml probe and the prebuild-cabal-store.yml publish step.

2. Slim ~/.ghcup before caching → fixes the macOS restore timeout (b14967a)
The single biggest macOS sink: the GHCup cache key hit but the restore exceeded the actions/cache timeout (operation cannot be completed in timeout), so every run fell back to a cold ~4-5 min GHC reinstall. We now drop the bytes not needed to build a non-profiled binary (install tarballs, unpack scratch, GHC docs, profiling libs) and bump the key to -v5.

3. Compile volca at -O1 for PR builds, keep -O2 for shipped artifacts (6458c15)
volca's ~100 modules were compiled at -O2 on every run, including the PR smoke build. Optimization becomes a per-package override in gen-cabal-config.sh: global optimization: 2 stays (so the prebuilt store's deps still match) while volca itself follows VOLCA_OPT_LEVEL (default 2). _build-matrix.yml exports 1 for PR builds, 2 for release builds (where the packaged binary is produced). Docker and local builds are unchanged.

4. Don't mistake a transient gh API error for a missing prebuilt asset (ed4e975)
The MUMPS and cabal-store probes piped gh release view 2>/dev/null into grep, so a flaky API call read as "asset absent" and silently dropped the job to the cold source build (observed on macos-arm64 reporting the MUMPS asset missing 3 h after it was published). Probes now go through a retry helper that separates a genuine absence from a query failure.

After merge

  • The hash change shifts the cabal-store tag once. Re-run prebuild-cabal-store.yml to publish under the new hash 17491f85 (covers 0.6.1.0 and 0.7.0 alike). No CABAL_PREBUILT_REVISION bump needed.

ccomb added 5 commits May 29, 2026 17:35
(from the github templates)
The prebuilt cabal-store tag is keyed on sha256(volca.cabal +
mumps-hs.cabal + cabal.project). Because volca.cabal carries the
`version:` line, every release bump changed the hash and missed the
store — so cutting vX.Y.Z forced a full 5-platform re-prebuild even
though the version has zero effect on the dependency closure.

Strip version/synopsis/description before hashing, identically in the
_build-matrix.yml probe and the prebuild-cabal-store.yml publish step,
so the store survives release bumps. (This change itself shifts the
hash once; re-run prebuild-cabal-store.yml to publish under the new tag.)
On macOS the GHCup cache key hit but the restore exceeded the
actions/cache timeout ("operation cannot be completed in timeout"),
so every run fell back to a cold 4-5 min GHC reinstall — the single
largest macOS time sink, defeating the cache entirely.

Drop the parts of ~/.ghcup that aren't needed to build a non-profiled
binary (install tarballs, unpack scratch, GHC docs, profiling libs)
right after install, shrinking the tree enough to restore in time.
Bump the cache key to v5 so the next save captures the lean tree.
volca's ~100 modules were compiled at -O2 on every CI run, including
the PR smoke build that only needs to pass tests — the bulk of the
remaining macOS build time after the cache fixes.

Make the level a per-package override: gen-cabal-config.sh keeps the
global `optimization: 2` (so the prebuilt store's deps still match) and
sets volca itself from VOLCA_OPT_LEVEL (default 2). _build-matrix.yml
exports 1 for PR builds and 2 for release builds, where the packaged
binary is produced. Docker and local builds are unchanged (default 2).

The redundant hardcoded -O2 is dropped from volca.cabal — it would have
overridden the per-package setting (ghc-options beat the project flag).
The MUMPS and cabal-store probes piped `gh release view 2>/dev/null`
straight into grep, so a flaky API call produced empty output and was
read as "asset absent" — silently downgrading the job to the cold
source build. Observed on macos-arm64, which reported the MUMPS asset
missing 3 hours after the prebuild had published it.

Query through a small retry helper that distinguishes a successful
lookup (asset genuinely absent -> fall back, as before) from a failed
lookup (retry, then fall back loudly). A real new-platform miss still
returns instantly; only an erroring/absent release pays the retries.
@ccomb ccomb changed the title Updated LICENSE file Update LICENSE + CI build-speed and reliability fixes May 29, 2026
@ccomb
ccomb merged commit 2be5379 into main May 29, 2026
7 checks passed
@ccomb
ccomb deleted the ccomb-patch-1 branch May 29, 2026 17:00
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