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
19 changes: 19 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `cargo nextest run` runs each test in its own process and every binary at once.
[profile.default]
# A test running past 5 s is reported as slow. One still running at 30 s is stopped and fails.
slow-timeout = { period = "5s", terminate-after = 6 }
fail-fast = false

# Timings run last, with nothing beside them: threaded correctness tests such as `linalg` would slow them.
[[profile.default.overrides]]
filter = 'binary(speed)'
threads-required = 'num-cpus'
priority = -100

# Optional selection excluding timings, used by focused cross-repo diagnostics beside basedpl's untimed selection.
[profile.untimed]
default-filter = 'not binary(speed)'

# Optional timing-only selection. An explicit cross-repo ('untimed', 'timed', 'speed') run uses this after basedpl timings. Plain run_tests uses default and includes everything.
[profile.speed]
default-filter = 'binary(speed)'
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- id: auth
uses: rust-lang/crates-io-auth-action@v1
- run: cargo publish -p rustymath --no-verify
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- run: cargo publish -p rustymath-buffer --no-verify
- run: cargo publish --workspace --no-verify
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- uses: actions/download-artifact@v8
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
# The repository has no `Cargo.lock`. Creating one first makes rust-cache's key change when a dependency publishes a new version.
- run: cargo generate-lockfile
- uses: Swatinem/rust-cache@v2
Expand All @@ -25,8 +26,8 @@ jobs:
python-version: '3.12'
- run: pip install -e '.[dev]'
- run: cargo develop
- run: cargo test --release
- run: pytest -q
- run: cargo nextest run --cargo-profile release -E 'not binary(speed)'
- run: pytest -q --ignore=tests/test_speed.py
if: ${{ !cancelled() }}
- run: nbdev-test
if: ${{ !cancelled() }}
68 changes: 38 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
[workspace]
members = ["buffer", "py"]
members = ["core", "kernels", "timing", "buffer", "py"]
default-members = [".", "buffer", "py"]

[workspace.package]
version = "0.1.56"
version = "0.1.57"
edition = "2024"

[workspace.dependencies]
rustymath = { path = ".", version = ">=0.1.55, <1", default-features = false }
rustymath = { path = ".", version = ">=0.1.56, <1", default-features = false }
rustymath-buffer = { path = "buffer", version = ">=0.1.39, <1" }
pyo3 = ">=0.29"
pyo3-build-config = ">=0.29"
rustymath-core = { path = "core", version = ">=0.1.56, <1", default-features = false }
rustymath-kernels = { path = "kernels", version = ">=0.1.56, <1" }
rustymath-timing = { path = "timing", version = ">=0.1.56, <1" }
half = { version = ">=2.7.1, <3", features = ["num-traits"] }
hashbrown = ">=0.15, <1"
foldhash = ">=0.2.0, <1"
num-bigint = ">=0.4.6, <0.5"
num-complex = ">=0.4.6, <1"
num-integer = ">=0.1.46, <1"
num-rational = ">=0.4.2, <1"
num-traits = ">=0.2.19, <1"
rand = { version = ">=0.10.2, <1", features = ["chacha"] }
strength_reduce = ">=0.2.4, <1"
rayon = ">=1.12.0, <2"
web-time = ">=1.1.0, <2"
libc = { version = ">=0.2.190, <1", features = ["extra_traits"] }

[workspace.metadata.fastfmt]
join_comments = true
Expand All @@ -29,40 +45,28 @@ name = "rustymath"
test = false
doctest = false

# The timing suite: plain `cargo test` skips it; `cargo test --test speed` runs it.
[[test]]
name = "speed"
test = false

[features]
default = ["native"]
# Compiles rustymath's own linear algebra into macOS builds too, beside Accelerate, so `RUSTYMATH_NATIVE=1` can select it at run time.
# Other targets always compile it. The Mac release builds turn it off with `--no-default-features`.
native = []
native = ["rustymath-core/native"]

[dependencies]
half = { version = ">=2.7.1, <3", features = ["num-traits"] }
hashbrown = ">=0.15, <1"
foldhash = ">=0.2.0, <1"
num-bigint = ">=0.4.6, <0.5"
num-complex = ">=0.4.6, <1"
num-integer = ">=0.1.46, <1"
num-rational = ">=0.4.2, <1"
num-traits = ">=0.2.19, <1"
rand = { version = ">=0.10.2, <1", default-features = false, features = ["alloc", "chacha"] }
strength_reduce = ">=0.2.4, <1"

# The browser build has no threads. There `parallel` runs its pieces in turn on the calling thread.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rayon = ">=1.12.0, <2"
rustymath-core.workspace = true
rustymath-kernels.workspace = true
num-complex.workspace = true
num-traits.workspace = true

# The browser's clock, for the timing loop in `timing`, as basedpl's browser build uses it.
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
web-time = ">=1.1.0, <2"

[target.'cfg(unix)'.dependencies]
# The memory guard calls `libc` to read physical memory and, on Linux, to ask for huge pages. On macOS, the timing lock also makes its QoS call through it, to favour the performance cores for a timing.
libc = ">=0.2.190, <1"
[dev-dependencies]
rustymath-timing.workspace = true
half.workspace = true
hashbrown.workspace = true
foldhash.workspace = true
num-bigint.workspace = true
num-integer.workspace = true
num-rational.workspace = true
rand.workspace = true
strength_reduce.workspace = true

[profile.test]
inherits = "release"
Expand All @@ -77,6 +81,10 @@ incremental = true
# Line tables change with every shifted line and recompile the code below it.
debug = false

[profile.quick]
inherits = "release"
lto = "off"

[profile.dist]
inherits = "release"
lto = "thin"
Expand Down
Loading