Skip to content

Commit

Permalink
Avoid liblzma-dev system dep in uv-dev and uv-bench (#9933)
Browse files Browse the repository at this point in the history
Enable `lzma-sys/static` through the performance feature not only in uv,
but in uv-dev and uv-bench too, to avoid the system dependency on
`liblzma-dev`.

Ref #9880
  • Loading branch information
konstin authored Dec 17, 2024
1 parent 052c1a6 commit b7df5db
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Install system dependencies"
run: sudo apt-get install liblzma-dev
- name: "Generate all"
run: cargo dev generate-all --mode check

Expand Down Expand Up @@ -1853,13 +1851,13 @@ jobs:
- name: "Install requirements and prime cache"
run: |
sudo apt-get update
sudo apt-get install -y libsasl2-dev libldap2-dev libkrb5-dev liblzma-dev
sudo apt-get install -y libsasl2-dev libldap2-dev libkrb5-dev
cargo run --bin uv -- venv --cache-dir .cache
cargo run --bin uv -- pip compile scripts/requirements/jupyter.in --universal --exclude-newer 2024-08-08 --cache-dir .cache
cargo run --bin uv -- pip compile scripts/requirements/airflow.in --universal --exclude-newer 2024-08-08 --cache-dir .cache
- name: "Build benchmarks"
run: cargo codspeed build --profile profiling --features codspeed -p uv-bench
run: cargo codspeed build --profile profiling --features "codspeed,performance" -p uv-bench

- name: "Run benchmarks"
uses: CodSpeedHQ/action@v3
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions crates/uv-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ uv-dispatch = { workspace = true }
uv-distribution = { workspace = true }
uv-distribution-filename = { workspace = true }
uv-distribution-types = { workspace = true }
uv-extract = { workspace = true, optional = true }
uv-install-wheel = { workspace = true }
uv-pep440 = { workspace = true }
uv-pep508 = { workspace = true }
Expand All @@ -51,5 +52,11 @@ criterion = { version = "0.5.1", default-features = false, features = ["async_to
jiff = { workspace = true }
tokio = { workspace = true }

[package.metadata.cargo-shear]
ignored = ["uv-extract"]

[features]
codspeed = ["codspeed-criterion-compat"]
performance = [
"uv-extract/performance"
]
14 changes: 11 additions & 3 deletions crates/uv-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ uv-cli = { workspace = true }
uv-client = { workspace = true }
uv-distribution-filename = { workspace = true }
uv-distribution-types = { workspace = true }
uv-extract = { workspace = true, optional = true }
uv-installer = { workspace = true }
uv-macros = { workspace = true }
uv-options-metadata = { workspace = true }
Expand Down Expand Up @@ -52,8 +53,9 @@ tokio = { workspace = true }
tracing = { workspace = true }
tracing-durations-export = { workspace = true, features = ["plot"] }
tracing-subscriber = { workspace = true }
walkdir = { workspace = true }
uv-performance-flate2-backend = { path = "../uv-performance-flate2-backend", optional = true }
uv-performance-memory-allocator = { path = "../uv-performance-memory-allocator", optional = true }
walkdir = { workspace = true }

[[bin]]
name = "uv-dev"
Expand All @@ -64,8 +66,14 @@ required-features = ["dev"]
default = ["performance"]
# Actually build the dev CLI.
dev = []
performance = ["dep:uv-performance-memory-allocator"]
performance = [
"performance-memory-allocator",
"performance-flate2-backend",
"uv-extract/performance"
]
performance-memory-allocator = ["dep:uv-performance-memory-allocator"]
performance-flate2-backend = ["dep:uv-performance-flate2-backend"]
render = ["poloto", "resvg", "tagu"]

[package.metadata.cargo-shear]
ignored = ["flate2", "uv-performance-memory-allocator", "uv-performance-flate2-backend"]
ignored = ["flate2", "uv-extract", "uv-performance-memory-allocator", "uv-performance-flate2-backend"]

0 comments on commit b7df5db

Please sign in to comment.