Skip to content

Commit

Permalink
chore: prepare 0.1.5 (#33)
Browse files Browse the repository at this point in the history
* chore: prepare 0.1.5

Signed-off-by: Zhenchi <[email protected]>

* ci: add wasm

Signed-off-by: Zhenchi <[email protected]>

* fix yaml format

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
  • Loading branch information
zhongzc authored Jan 23, 2024
1 parent 18bd3ea commit 049a30f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ jobs:
run: cargo test --workspace --all-targets --all-features -- --nocapture
- name: Run benches
run: cargo bench --workspace --all-targets --all-features

build-wasm:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- name: Set up toolchains
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack test --node
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minstant"
version = "0.1.4"
version = "0.1.5"
authors = ["The TiKV Authors"]
edition = "2021"
license = "MIT"
Expand All @@ -25,6 +25,8 @@ atomic = []
criterion = "0.3"
quanta = "0.9"
rand = "0.8"
wasm-bindgen-test = "0.3"
getrandom = { version = "0.2", features = ["js"] }

[[bench]]
name = "criterion"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A drop-in replacement for [`std::time::Instant`](https://doc.rust-lang.org/std/t

```toml
[dependencies]
minstant = "0.1.2"
minstant = "0.1"
```

```rust
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ mod tests {
use super::*;
use rand::Rng;
use std::time::{Duration, Instant as StdInstant};
use wasm_bindgen_test::wasm_bindgen_test;

#[test]
#[wasm_bindgen_test]
fn test_is_tsc_available() {
let _ = is_tsc_available();
}

#[test]
#[wasm_bindgen_test]
fn test_monotonic() {
let mut prev = 0;
for _ in 0..10000 {
Expand All @@ -113,6 +116,7 @@ mod tests {
}

#[test]
#[wasm_bindgen_test]
fn test_nanos_per_cycle() {
let _ = nanos_per_cycle();
}
Expand Down

0 comments on commit 049a30f

Please sign in to comment.