-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix_asset_action_minimal_doc
- Loading branch information
Showing
850 changed files
with
59,175 additions
and
19,831 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below. | ||
|
||
# NOTE: For maximum performance, build using a nightly compiler | ||
# If you are using rust stable, remove the "-Zshare-generics=y" below. | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
linker = "clang" | ||
rustflags = [ | ||
"-Clink-arg=-fuse-ld=lld", # Use LLD Linker | ||
"-Zshare-generics=y", # (Nightly) Make the current crate share its generic instantiations | ||
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads. | ||
] | ||
|
||
# NOTE: you must install [Mach-O LLD Port](https://lld.llvm.org/MachO/index.html) on mac. you can easily do this by installing llvm which includes lld with the "brew" package manager: | ||
# `brew install llvm` | ||
[target.x86_64-apple-darwin] | ||
rustflags = [ | ||
"-Clink-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld", # Use LLD Linker | ||
"-Zshare-generics=y", # (Nightly) Make the current crate share its generic instantiations | ||
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads. | ||
] | ||
|
||
[target.aarch64-apple-darwin] | ||
rustflags = [ | ||
"-Clink-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld", # Use LLD Linker | ||
"-Zshare-generics=y", # (Nightly) Make the current crate share its generic instantiations | ||
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads. | ||
] | ||
|
||
[target.x86_64-pc-windows-msvc] | ||
linker = "rust-lld.exe" # Use LLD Linker | ||
rustflags = [ | ||
"-Zshare-generics=n", # (Nightly) | ||
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads. | ||
] | ||
|
||
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' | ||
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. | ||
#[profile.dev] | ||
#debug = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,10 @@ env: | |
CARGO_TERM_COLOR: always | ||
NIGHTLY_TOOLCHAIN: nightly | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: ${{github.event_name == 'pull_request'}} | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
|
@@ -20,7 +24,7 @@ jobs: | |
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -45,7 +49,7 @@ jobs: | |
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -64,11 +68,11 @@ jobs: | |
run: cargo run -p ci -- lints | ||
|
||
miri: | ||
runs-on: ubuntu-latest | ||
runs-on: macos-14 | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -81,8 +85,6 @@ jobs: | |
with: | ||
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }} | ||
components: miri | ||
- 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 | ||
# To run the tests one item at a time for troubleshooting, use | ||
# cargo --quiet test --lib -- --list | sed 's/: test$//' | MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-disable-weak-memory-emulation" xargs -n1 cargo miri test -p bevy_ecs --lib -- --exact | ||
|
@@ -102,7 +104,7 @@ jobs: | |
needs: ci | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -128,7 +130,7 @@ jobs: | |
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -142,8 +144,6 @@ jobs: | |
target: wasm32-unknown-unknown | ||
- name: Check wasm | ||
run: cargo check --target wasm32-unknown-unknown | ||
env: | ||
RUSTFLAGS: --cfg=web_sys_unstable_apis | ||
|
||
markdownlint: | ||
runs-on: ubuntu-latest | ||
|
@@ -168,61 +168,88 @@ jobs: | |
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Install taplo | ||
run: | | ||
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \ | ||
| gzip -d - \ | ||
| install -m 755 /dev/stdin /usr/local/bin/taplo | ||
run: cargo install taplo-cli --locked | ||
- name: Run Taplo | ||
id: taplo | ||
run: taplo fmt --check --diff | ||
- name: Taplo info | ||
if: failure() | ||
run: | | ||
echo 'To fix toml fmt, please run `taplo fmt`' | ||
echo 'Or if you use VSCode, use the Even Better Toml extension' | ||
echo 'To check for a diff, run `taplo fmt --check --diff' | ||
echo 'You can find taplo here: https://taplo.tamasfe.dev/' | ||
echo 'Or if you use VSCode, use the `Even Better Toml` extension with 2 spaces' | ||
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml' | ||
run-examples-on-windows-dx12: | ||
runs-on: windows-latest | ||
timeout-minutes: 60 | ||
typos: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check for typos | ||
uses: crate-ci/[email protected] | ||
- name: Typos info | ||
if: failure() | ||
run: | | ||
echo 'To fix typos, please run `typos -w`' | ||
echo 'To check for a diff, run `typos`' | ||
echo 'You can find typos here: https://crates.io/crates/typos' | ||
echo 'if you use VSCode, you can also install `Typos Spell Checker' | ||
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-windows-run-examples-${{ hashFiles('**/Cargo.toml') }} | ||
run-examples-macos-metal: | ||
runs-on: macos-14 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Disable audio | ||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes | ||
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch | ||
- name: Build bevy | ||
shell: bash | ||
# this uses the same command as when running the example to ensure build is reused | ||
run: | | ||
WGPU_BACKEND=dx12 CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing" | ||
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome" | ||
- name: Run examples | ||
shell: bash | ||
run: | | ||
for example in .github/example-run/*.ron; do | ||
example_name=`basename $example .ron` | ||
echo -n $example_name > last_example_run | ||
echo "running $example_name - "`date` | ||
time WGPU_BACKEND=dx12 CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing" | ||
time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome" | ||
sleep 10 | ||
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then | ||
mkdir screenshots-$example_name | ||
mv screenshot-*.png screenshots-$example_name/ | ||
fi | ||
done | ||
mkdir traces && mv trace*.json traces/ | ||
mkdir screenshots && mv screenshots-* screenshots/ | ||
- name: save traces | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: example-traces-macos | ||
path: traces | ||
- name: save screenshots | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: screenshots-macos | ||
path: screenshots | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ failure() && github.event_name == 'pull_request' }} | ||
with: | ||
name: example-run-macos | ||
path: example-run/ | ||
|
||
check-doc: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -234,7 +261,6 @@ jobs: | |
- uses: dtolnay/rust-toolchain@stable | ||
- 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 | ||
if: runner.os == 'linux' | ||
- name: Build and check doc | ||
# See tools/ci/src/main.rs for the commands this runs | ||
run: cargo run -p ci -- doc | ||
|
@@ -322,7 +348,7 @@ jobs: | |
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
|
@@ -374,4 +400,26 @@ jobs: | |
echo " Fix the issue by replacing 'bevy_internal' with 'bevy'" | ||
echo " Example: 'use bevy::sprite::MaterialMesh2dBundle;' instead of 'bevy_internal::sprite::MaterialMesh2dBundle;'" | ||
exit 1 | ||
fi | ||
fi | ||
check-cfg: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }} | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }} | ||
- 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: Build and check cfg typos | ||
# See tools/ci/src/main.rs for the commands this runs | ||
run: cargo run -p ci -- cfg-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.