Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - CI runs cargo miri test -p bevy_ecs #4310

Closed
wants to merge 11 commits into from

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Mar 24, 2022

Objective

Fixes #1529
Run bevy_ecs in miri

Solution

@BoxyUwU BoxyUwU changed the title Run bevy_ecs in miri (wip) Run bevy_ecs in miri Mar 24, 2022
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Mar 24, 2022
@BoxyUwU BoxyUwU changed the title (wip) Run bevy_ecs in miri CI runs cargo miri test -p bevy_ecs Mar 24, 2022
@BoxyUwU BoxyUwU added A-ECS Entities, components, systems, and events C-Dependencies A change to the crates that Bevy depends on and removed S-Needs-Triage This issue needs to be labelled labels Mar 24, 2022
@BoxyUwU BoxyUwU requested a review from mockersf March 24, 2022 05:38
event-listener = "2.4.0"
event-listener = "2.5.2"
Copy link
Member

@mockersf mockersf Mar 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependabot should have warned us of this one... 🤔

@mockersf
Copy link
Member

This adds 7 minutes to CI but is probably worth it

@alice-i-cecile
Copy link
Member

This adds 7 minutes to CI but is probably worth it

@mockersf down the line, can we change this to only run on PRs that modify bevy_ecs?

Also as someone prone to who touches code that could produce UB, I totally agree.

@mockersf
Copy link
Member

It should be added to Bors in https://github.com/bevyengine/bevy/blob/main/.github/bors.toml

@mockersf down the line, can we change this to only run on PRs that modify bevy_ecs?

Yes, but I'm not sure how Bors handles a job that only run on some of the PR...

BoxyUwU and others added 5 commits March 24, 2022 13:12
Co-authored-by: François <mockersf@gmail.com>
Co-authored-by: François <mockersf@gmail.com>
@BoxyUwU BoxyUwU closed this Mar 24, 2022
@BoxyUwU BoxyUwU reopened this Mar 24, 2022
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 24, 2022
@cart
Copy link
Member

cart commented Mar 24, 2022

Can you push something that introduces UB so we can prove this will fail CI if we "regress"?

@cart
Copy link
Member

cart commented Mar 24, 2022

(or if you've already tested this case on CI, can you send me a link?)

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Mar 25, 2022

Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant. LGTM!

@cart
Copy link
Member

cart commented Mar 25, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 25, 2022
# Objective

Fixes #1529
Run bevy_ecs in miri

## Solution

- Don't set thread names when running in miri rust-lang/miri/issues/1717
- Update `event-listener` to `2.5.2` as previous versions have UB that is detected by miri: [event-listener commit](smol-rs/event-listener@1fa31c5)
- Ignore memory leaks when running in miri as they are impossible to track down rust-lang/miri/issues/1481
- Make `table_add_remove_many` test less "many" because miri is really quite slow :)
- Make CI run `RUSTFLAGS="-Zrandomize-layout" MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tag-raw-pointers -Zmiri-disable-isolation" cargo +nightly miri test -p bevy_ecs`
@bors bors bot changed the title CI runs cargo miri test -p bevy_ecs [Merged by Bors] - CI runs cargo miri test -p bevy_ecs Mar 25, 2022
@bors bors bot closed this Mar 25, 2022
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to not cache ~/.cargo/{.crates2.json,.crates.toml} so I assume it will still rebuild xargo each time? I am not sure how caching works for GHA though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the list of paths to cache is from https://github.com/actions/cache/blob/main/examples.md#rust---cargo... maybe it's not complete?

aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

Fixes bevyengine#1529
Run bevy_ecs in miri

## Solution

- Don't set thread names when running in miri rust-lang/miri/issues/1717
- Update `event-listener` to `2.5.2` as previous versions have UB that is detected by miri: [event-listener commit](smol-rs/event-listener@1fa31c5)
- Ignore memory leaks when running in miri as they are impossible to track down rust-lang/miri/issues/1481
- Make `table_add_remove_many` test less "many" because miri is really quite slow :)
- Make CI run `RUSTFLAGS="-Zrandomize-layout" MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tag-raw-pointers -Zmiri-disable-isolation" cargo +nightly miri test -p bevy_ecs`
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Fixes bevyengine#1529
Run bevy_ecs in miri

## Solution

- Don't set thread names when running in miri rust-lang/miri/issues/1717
- Update `event-listener` to `2.5.2` as previous versions have UB that is detected by miri: [event-listener commit](smol-rs/event-listener@1fa31c5)
- Ignore memory leaks when running in miri as they are impossible to track down rust-lang/miri/issues/1481
- Make `table_add_remove_many` test less "many" because miri is really quite slow :)
- Make CI run `RUSTFLAGS="-Zrandomize-layout" MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tag-raw-pointers -Zmiri-disable-isolation" cargo +nightly miri test -p bevy_ecs`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Dependencies A change to the crates that Bevy depends on S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run bevy_ecs in miri on CI
6 participants