Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/build-distributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ on:
required: false
type: number
default: 0
cargo-profile:
description: "Cargo profile of the native builds: dist for released wheels, release for quicker checks"
required: false
type: string
default: dist
outputs:
sha:
description: "Commit the distributions were built from"
Expand Down Expand Up @@ -88,7 +93,8 @@ jobs:
name: Build wheel (${{ matrix.platform.name }})
needs: source
runs-on: ${{ matrix.platform.runner }}
timeout-minutes: 75
# Cold dist builds take up to about 2x the 17-31 minute release-profile jobs on Windows and macOS.
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -141,7 +147,7 @@ jobs:
command: build
# One platform records a cargo build timing report for build time work.
args: >-
--release --out dist --features extension-module
--profile ${{ inputs.cargo-profile }} --out dist --features extension-module
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
target: ${{ matrix.platform.target }}
manylinux: auto
Expand All @@ -159,7 +165,7 @@ jobs:
with:
command: build
args: >-
--release --out dist --manifest-path crates/sqlbuild-cli/Cargo.toml --features ui
--profile ${{ inputs.cargo-profile }} --out dist --manifest-path crates/sqlbuild-cli/Cargo.toml --features ui
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
target: ${{ matrix.platform.target }}
manylinux: auto
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ jobs:
run: uv python install 3.12
- name: Install dependencies
run: uv sync --locked --all-groups --all-extras
# The candidate uses the released wheels' cargo profile, so both sides of the comparison match.
- name: Build candidate wheel
env:
MATURIN_PEP517_ARGS: --profile dist
run: |
uv build --wheel --out-dir "${RUNNER_TEMP}/candidate"
uv build --wheel crates/sqlbuild-cli --out-dir "${RUNNER_TEMP}/candidate"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,8 @@ jobs:
sdist: false
upload: true
retention-days: 3
# Release Distributions builds and smoke tests the slower dist profile for every release.
cargo-profile: release

compose:
name: Packaged Compose lifecycle
Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,14 @@ debug = false
[profile.release]
strip = "symbols"

# Released wheels: one codegen unit per crate keeps one copy of generic code that parallel units
# each instantiate, so the native binaries are about an eighth smaller and build in about 2x time.
[profile.dist]
inherits = "release"
codegen-units = 1

# Local iteration: release-level optimisation with incremental builds, so rebuilding after a
# focused change does not recompile the whole binding crate. CI and wheels use `release`.
# focused change does not recompile the whole binding crate. CI uses `release`.
[profile.fast]
inherits = "release"
incremental = true
Expand Down
Loading