Skip to content

Commit

Permalink
Merge branch 'main' into change-ticks-getters
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-i-cecile authored Apr 25, 2022
2 parents 33ccf7d + 4bcb310 commit e640022
Show file tree
Hide file tree
Showing 321 changed files with 15,164 additions and 3,873 deletions.
1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ status = [
"check-missing-examples-in-docs",
"check-unused-dependencies",
"ci",
"miri",
"check-benches",
]

Expand Down
2 changes: 1 addition & 1 deletion .github/contributing/example_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For more advice on writing examples, see the [relevant section](../../CONTRIBUTI
2. Prefer `for` loops over `.for_each`. The latter is faster (for now), but it is less clear for beginners, less idiomatic, and less flexible.
3. Use `.single` and `.single_mut` where appropriate.
4. In Queries, prefer `With<T>` filters over actually fetching unused data with `&T`.
5. Prefer disjoint queries using `With` and `Without` over query sets when you need more than one query in a single system.
5. Prefer disjoint queries using `With` and `Without` over param sets when you need more than one query in a single system.
6. Prefer structs with named fields over tuple structs except in the case of single-field wrapper types.
7. Use enum-labels over string-labels for system / stage / etc. labels.

Expand Down
3 changes: 3 additions & 0 deletions .github/example-run/headless_defaults.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(
exit_after: Some(100)
)
3 changes: 3 additions & 0 deletions .github/linters/markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{
"pattern": "^https?://github\\.com/"
},
{
"pattern": "^https?://docs\\.github\\.com/"
},
{
"pattern": "^https?://reddit\\.com/"
}
Expand Down
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,22 @@
## Solution

- Describe the solution used to achieve the objective above.

---

## Changelog

> This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section.
- What changed as a result of this PR?
- If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
- Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section
- If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge!

## Migration Guide

> This section is optional. If there are no breaking changes, you can delete this section.
- If this PR is a breaking change (relative to the last release of Bevy), describe how a user might need to migrate their code to support these changes
- Simply adding new functionality is not a breaking change.
- Fixing behavior that was definitely a bug, rather than a questionable design choice is not a breaking change.
50 changes: 41 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -70,12 +70,44 @@ jobs:
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- nonlocal

miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: miri
override: true
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: CI job
run: cargo miri test -p bevy_ecs
env:
# -Zrandomize-layout makes sure we dont rely on the layout of anything that might change
RUSTFLAGS: -Zrandomize-layout
# -Zmiri-disable-isolation is needed because our executor uses `fastrand` which accesses system time.
# -Zmiri-ignore-leaks is needed because running bevy_ecs tests finds a memory leak but its impossible
# to track down because allocids are nondeterministic.
# -Zmiri-tag-raw-pointers is not strictly "necessary" but enables a lot of extra UB checks relating
# to raw pointer aliasing rules that we should be trying to uphold.
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-ignore-leaks -Zmiri-tag-raw-pointers

check-benches:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -101,7 +133,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -128,7 +160,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -228,7 +260,7 @@ jobs:
sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -242,13 +274,13 @@ jobs:
toolchain: stable
- name: Build bevy
run: |
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome"
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis"
- name: Run examples
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo "running $example_name - "`date`
time CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome"
time CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis"
sleep 10
done
zip traces.zip trace*.json
Expand Down Expand Up @@ -295,7 +327,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy Docs

on:
push:
branches:
- 'main'

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: --html-in-header header.html

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

# This does the following:
# - Replaces the docs icon with one that clearly denotes it's not the released package on crates.io
# - Adds a meta tag that forces Google not to index any page on the site.
- name: Pre-docs-build
run: |
sed -i.bak "s/icon.png/icon-docs-dev.png/" src/lib.rs
echo "<meta name=\"robots\" content=\"noindex\">" > header.html
- name: Build docs
run: cargo doc --all-features --no-deps -p bevy

# This adds the following:
# - A top level redirect to the bevy crate documentation
# - A CNAME file for redirecting the docs domain to the API reference
# - A robots.txt file to forbid any crawling of the site (to defer to the docs.rs site on search engines).
# - A .nojekyll file to disable Jekyll GitHub Pages builds.
- name: Finalize documentation
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=bevy/index.html\">" > target/doc/index.html
echo "dev-docs.bevyengine.org" > target/doc/CNAME
echo "User-Agent: *\nDisallow: /" > target/doc/robots.txt
touch target/doc/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: gh-pages
folder: target/doc
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2.1.6
- uses: actions/cache@v3
with:
path: |
target
Expand Down
Loading

0 comments on commit e640022

Please sign in to comment.