Move benchmarks into its own crate
This commit is contained in:
parent
04a276fb39
commit
f0d518231c
@ -26,12 +26,11 @@ checked = []
|
||||
[workspace]
|
||||
members = [
|
||||
"crates/compiler-builtins-smoke-test",
|
||||
"crates/libm-bench",
|
||||
]
|
||||
|
||||
[dev-dependencies]
|
||||
no-panic = "0.1.8"
|
||||
rand = "0.6.5"
|
||||
paste = "0.1.5"
|
||||
|
||||
[build-dependencies]
|
||||
rand = { version = "0.6.5", optional = true }
|
||||
|
@ -39,9 +39,11 @@ The API documentation can be found [here](https://docs.rs/libm).
|
||||
|
||||
## Benchmark
|
||||
[benchmark]: #benchmark
|
||||
Run `cargo +nightly bench`
|
||||
|
||||
NOTE: remember to have nightly installed `rustup install nightly`
|
||||
The benchmarks are located in `crates/libm-bench` and require a nightly Rust toolchain.
|
||||
To run all benchmarks:
|
||||
|
||||
> cargo +nightly bench --all
|
||||
|
||||
## Contributing
|
||||
|
||||
|
14
ci/run.sh
14
ci/run.sh
@ -1,11 +1,15 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
TARGET=$1
|
||||
|
||||
cargo test --target $TARGET
|
||||
cargo test --target $TARGET --release
|
||||
CMD="cargo test --all --no-default-features --target $TARGET"
|
||||
|
||||
cargo test --features 'checked musl-reference-tests' --target $TARGET
|
||||
$CMD
|
||||
$CMD --release
|
||||
|
||||
cargo test --features 'checked musl-reference-tests' --target $TARGET --release
|
||||
$CMD --features 'stable'
|
||||
$CMD --release --features 'stable'
|
||||
|
||||
$CMD --features 'stable checked musl-reference-tests'
|
||||
$CMD --release --features 'stable checked musl-reference-tests'
|
||||
|
11
crates/libm-bench/Cargo.toml
Normal file
11
crates/libm-bench/Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "libm-bench"
|
||||
version = "0.1.0"
|
||||
authors = ["Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
libm = { path = "../.." }
|
||||
rand = "0.6.5"
|
||||
paste = "0.1.5"
|
@ -1,7 +1,4 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate paste;
|
||||
extern crate rand;
|
||||
extern crate test;
|
||||
|
||||
use rand::Rng;
|
Loading…
x
Reference in New Issue
Block a user