Skip to content

Commit

Permalink
ci: Speed up benchmarks in CI
Browse files Browse the repository at this point in the history
Also make `cargo bench` output reasonable, by excluding `bench` from crates that don't have benchmarks
  • Loading branch information
max-sixty committed Jul 1, 2024
1 parent 2d0db5e commit aa86629
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ jobs:
- uses: clechasseur/rs-cargo@v2
with:
command: bench
args: -p prqlc
# GH Actions is fairly noisy, so the precise details don't matter that
# much. We do want to check the benchmarks run, and possibly we can
# use this to identify and big changes in performance.
args: -- --warm-up-time=0.3 --measurement-time=1

time-compilation:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions lutra/bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
crate-type = ["cdylib"]
doc = false
test = false
Expand Down
2 changes: 2 additions & 0 deletions lutra/lutra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ cli = ["clap"]
default = ["cli"]

[lib]
bench = false
doctest = false
test = false

[[bin]]
bench = false
name = "lutra"
path = "src/cli.rs"
required-features = ["cli"]
Expand Down
5 changes: 3 additions & 2 deletions prqlc/bindings/elixir/native/prql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
crate-type = ["cdylib"]
doc = false
doctest = false
name = "prql"
path = "src/lib.rs"
test = false
doc = false

# See Readme for details on Mac
[target.'cfg(not(any(target_family="wasm", target_os = "macos")))'.dependencies]
prqlc = {path = "../../../../prqlc", default-features = false, version = "0.12.3" }
prqlc = {path = "../../../../prqlc", default-features = false, version = "0.12.3"}
rustler = "0.32.1"
1 change: 1 addition & 0 deletions prqlc/bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
crate-type = ["cdylib"]
doc = false
doctest = false
Expand Down
1 change: 1 addition & 0 deletions prqlc/bindings/js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
crate-type = ["cdylib", "rlib"]
doc = false
doctest = false
Expand Down
1 change: 1 addition & 0 deletions prqlc/bindings/prqlc-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ default = []
# We produce both of these at the moment, but could consider refining this. ref
# https://github.com/rust-lang/cargo/issues/8607 &
# https://github.com/rust-lang/rust/issues/59302
bench = false
crate-type = ["staticlib", "cdylib"]
doc = false
doctest = false
Expand Down
1 change: 1 addition & 0 deletions prqlc/bindings/prqlc-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
crate-type = ["cdylib"]
doc = false
doctest = false
Expand Down
1 change: 1 addition & 0 deletions prqlc/prqlc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
doctest = false
proc-macro = true
test = false
Expand Down
3 changes: 2 additions & 1 deletion prqlc/prqlc-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ rust-version.workspace = true
version.workspace = true

[lib]
bench = false
doctest = false

[dependencies]
enum-as-inner = {workspace = true}
itertools = {workspace = true}
log = {workspace = true}
semver = {version = "1.0.23", features = ["serde"]}
serde = {workspace = true}
serde_yaml = {workspace = true, optional = true}
semver = {version = "1.0.23", features = ["serde"]}
strum = {version = "0.26.3", features = ["std", "derive"]}

# Chumsky's default features have issues when running in wasm (though we only
Expand Down
4 changes: 3 additions & 1 deletion prqlc/prqlc/examples/compile-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ rust-version.workspace = true
version.workspace = true

[[bin]]
bench = false
doc = false
doctest = false
name = "compile-files"
test = false
doc = false

[build-dependencies]
prqlc = {path = '../../../prqlc', default-features = false}
2 changes: 2 additions & 0 deletions web/book/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ repository.workspace = true
version.workspace = true

[lib]
bench = false
doc = false
doctest = false

[[bin]]
bench = false
name = "mdbook-prql"
test = false

Expand Down

0 comments on commit aa86629

Please sign in to comment.