Skip to content

Commit

Permalink
Switch to git deps from local path deps for shred and hibitset
Browse files Browse the repository at this point in the history
  • Loading branch information
Imberflur committed Jul 23, 2023
1 parent 5aa5abf commit 2beb089
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[profile.default-miri]
slow-timeout = { period = "30s", terminate-after = 1 }
fail-fast = false
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
toolchain: [stable, beta, nightly, 1.65.0]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# install the toolchain we are going to compile and test with
- name: install ${{ matrix.toolchain }} toolchain
Expand Down Expand Up @@ -77,3 +77,18 @@ jobs:

# - run: mdbook test -L ./target/debug/deps docs/book
# if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

miri:
name: "Miri"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Test with Miri
run: ./miri.sh
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ ahash = "0.7.6"
crossbeam-queue = "0.3"
# waiting on PR and new version to be published
# hibitset = { version = "0.6.3", default-features = false }
hibitset = { path = "../hibitset", default-features = false }
hibitset = { git = "https://github.com/amethyst/hibitset", default-features = false }
log = "0.4.8"
# waiting on PR and new version to be published
# shred = { version = "0.14.1", default-features = false }
shred = { path = "../shred", default-features = false }
shred = { git = "https://github.com/Imberflur/shred", branch = "metatable-fix", default-features = false }
shrev = "1.1.1"
tuple_utils = "0.4.0"
nougat = "0.2.3"
Expand Down Expand Up @@ -58,7 +58,7 @@ ron = "0.7.1"
rand = "0.8"
serde_json = "1.0.48"
# shred = { version = "0.14.1", default-features = false, features = ["shred-derive"] }
shred = { path = "../shred", default-features = false, features = ["shred-derive"] }
shred = { git = "https://github.com/Imberflur/shred", branch = "metatable-fix", default-features = false, features = ["shred-derive"]}
specs-derive = { path = "specs-derive", version = "0.4.1" }

[[example]]
Expand Down
21 changes: 21 additions & 0 deletions miri.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Convenience script for running Miri, also the same one that the CI runs!

# use half the available threads since miri can be a bit memory hungry
test_threads=$((($(nproc) - 1) / 2 + 1))
echo using $test_threads threads

# filters out long running tests
filter='not (test(100k) | test(map_test::wrap) | test(map_test::insert_same_key) | test(=mixed_create_merge)| test(=par_join_many_entities_and_systems) | test(=stillborn_entities))'
echo "using filter: \"$filter\""

# Miri currently reports leaks in some tests so we disable that check
# here (might be due to ptr-int-ptr in crossbeam-epoch so might be
# resolved in future versions of that crate).
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" \
cargo +nightly miri nextest run \
-E "$filter" \
--test-threads="$test_threads" \
# use nocapture or run miri directly to see warnings from miri
#--nocapture

0 comments on commit 2beb089

Please sign in to comment.