Skip to content

Commit

Permalink
somehow Miri was never included
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronKutch committed Feb 20, 2024
1 parent 4c0ddc8 commit 724af23
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ jobs:
cargo r --bin render1
cargo r --example equation
miri:
name: Miri
runs-on: ubuntu-latest
# note: we have turned on this Miri flag
env:
RUSTFLAGS: -D warnings
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-strict-provenance
steps:
- uses: actions/checkout@v2
- name: Install most recent Miri
run: |
rustup set profile minimal
rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)"
rustup component add miri
- name: Run test suite with Miri
run: |
cargo miri test
msrv_test_suite:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -78,3 +96,4 @@ jobs:
- name: Run `cargo clippy`
run: |
cargo clippy --all --all-targets --all-features -- -D clippy::all
cargo clippy --all --all-targets --no-default-features -- -D clippy::all
4 changes: 2 additions & 2 deletions testcrate/tests/ord_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn ord_arena_count() {
}
}
}
assert_eq!(get_cmp_count(), if cfg!(miri) { 7272 } else { 83611 });
assert_eq!(get_cmp_count(), if cfg!(miri) { 208 } else { 83611 });
}

#[test]
Expand All @@ -51,7 +51,7 @@ fn ord_arena_find_to_remove_count() {
}
}
}
assert_eq!(get_cmp_count(), if cfg!(miri) { 13810 } else { 159913 });
assert_eq!(get_cmp_count(), if cfg!(miri) { 395 } else { 159913 });
}

// in case the implementation of `BTreeMap` changes, do not want to break CI or
Expand Down
2 changes: 1 addition & 1 deletion triple_arena_render/src/render_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use triple_arena::{Arena, Ptr};

use crate::{
internal::{ANode, RenderNode},
*,
NODE_PAD_X, NODE_PAD_Y, PAD,
};

/// Final grid of `RenderNodes`
Expand Down
2 changes: 0 additions & 2 deletions triple_arena_render/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ pub(crate) fn gen_svg<P: Ptr>(rg: &RenderGrid<P>) -> String {
// TODO when associated type bounds become stable, use something like
// `A: ArenaTrait<E: DebugNodeTrait<P>>`

// TODO rework the algorithm so that trees are guaranteed to not have crossings

/// Renders an SVG graph representation of `arena` in a top-down order from
/// sources to sinks. Cycles are broken up by inserting `Ptr` reference nodes.
/// If `error_on_invalid_ptr` then this will return an error if an invalid
Expand Down

0 comments on commit 724af23

Please sign in to comment.