mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
ci: build the CI test wheel with a fast cargo profile
The release profile (lto=thin, codegen-units=1) is great for the shipped wheel but slow to compile — it was the build-wheel long pole (~3m38s) gating the test shards. Add [profile.ci] (no LTO, codegen-units=256, opt-level=1) and build the CI wheel with --profile ci. Does not affect --release / shipped wheels.
This commit is contained in:
parent
9a16a59df4
commit
a08a0befa7
2 changed files with 17 additions and 2 deletions
6
.github/workflows/ci-fast.yml
vendored
6
.github/workflows/ci-fast.yml
vendored
|
|
@ -62,10 +62,12 @@ jobs:
|
|||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ". -> target"
|
||||
- name: Build wheel once (maturin)
|
||||
- name: Build wheel once (maturin, fast CI profile)
|
||||
run: |
|
||||
python -m pip install --upgrade pip maturin
|
||||
maturin build --release --out dist --interpreter "python${PY_VERSION}"
|
||||
# `--profile ci`: no LTO + parallel codegen-units → much faster compile
|
||||
# than `--release` (lto + codegen-units=1). Tests don't need the optimized ext.
|
||||
maturin build --profile ci --out dist --interpreter "python${PY_VERSION}"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: headroom-wheel
|
||||
|
|
|
|||
13
Cargo.toml
13
Cargo.toml
|
|
@ -106,3 +106,16 @@ gcp_auth = "0.12"
|
|||
strip = "symbols"
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
|
||||
# Fast-to-compile profile for CI test wheels. The shipped wheel uses
|
||||
# `release` (lto + codegen-units=1) for runtime/size; CI only needs a working
|
||||
# extension, so trade runtime perf for ~parallel, lto-free compilation. Used
|
||||
# via `maturin build --profile ci`. Does NOT affect `--release` builds.
|
||||
[profile.ci]
|
||||
inherits = "release"
|
||||
lto = false
|
||||
codegen-units = 256
|
||||
opt-level = 1
|
||||
strip = "none"
|
||||
debug = false
|
||||
incremental = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue