Skip to content

Commit 93f952d

Browse files
committed
Merge remote-tracking branch 'origin/main' into default_filters
2 parents ad128dd + edb34cd commit 93f952d

File tree

1,251 files changed

+82668
-34710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,251 files changed

+82668
-34710
lines changed

.cargo/config_fast_builds.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Mold is a newer linker written by one of the authors of LLD. It boasts even greater performance, specifically
2222
# through its high parallelism, though it only supports Linux.
2323
#
24-
# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for
24+
# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for
2525
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by
2626
# *uncommenting* its `-Clink-arg=...` line.
2727
#
@@ -32,7 +32,7 @@
3232
#
3333
# # Nightly configuration
3434
#
35-
# Be warned that the following features require nightly Rust, which is expiremental and may contain bugs. If you
35+
# Be warned that the following features require nightly Rust, which is experimental and may contain bugs. If you
3636
# are having issues, skip this section and use stable Rust instead.
3737
#
3838
# There are a few unstable features that can improve performance. To use them, first install nightly Rust
@@ -51,7 +51,7 @@
5151
# crates to share monomorphized generic code, so they do not duplicate work.
5252
#
5353
# In other words, instead of crate 1 generating `Foo<String>` and crate 2 generating `Foo<String>` separately,
54-
# only one crate generates `Foo<String>` and the other adds on to the pre-exiting work.
54+
# only one crate generates `Foo<String>` and the other adds on to the pre-existing work.
5555
#
5656
# Note that you may have some issues with this flag on Windows. If compiling fails due to the 65k symbol limit,
5757
# you may have to disable this setting. For more information and possible solutions to this error, see
@@ -150,7 +150,7 @@ rustflags = [
150150
# "-Zthreads=0",
151151
]
152152

153-
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
153+
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'.
154154
# In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains.
155155
# [profile.dev]
156156
# debug = 1

.github/ISSUE_TEMPLATE/docs_improvement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ assignees: ''
1010

1111
Provide a link to the documentation and describe how it could be improved. In what ways is it incomplete, incorrect, or misleading?
1212

13-
If you have suggestions on exactly what the new docs should say, feel free to include them here. Alternatively, make the changes yourself and [create a pull request](https://bevyengine.org/learn/book/contributing/code/) instead.
13+
If you have suggestions on exactly what the new docs should say, feel free to include them here. Alternatively, make the changes yourself and [create a pull request](https://bevyengine.org/learn/contribute/helping-out/writing-docs/) instead.

.github/ISSUE_TEMPLATE/performance_regression.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Performance Regression
33
about: Bevy running slowly after upgrading? Report a performance regression.
44
title: ''
5-
labels: C-Bug, C-Performance, C-Regression, S-Needs-Triage
5+
labels: C-Bug, C-Performance, P-Regression, S-Needs-Triage
66
assignees: ''
77
---
88

.github/example-run/alien_cake_addict.ron

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/example-run/breakout.ron

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/example-run/contributors.ron

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/example-run/load_gltf.ron

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/example-run/testbed_2d.ron

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(
2+
events: [
3+
(100, Screenshot),
4+
(200, Custom("switch_scene")),
5+
(300, Screenshot),
6+
(400, Custom("switch_scene")),
7+
(500, Screenshot),
8+
(600, Custom("switch_scene")),
9+
(700, Screenshot),
10+
(800, AppExit),
11+
]
12+
)

.github/example-run/testbed_3d.ron

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(
2+
events: [
3+
(100, Screenshot),
4+
(200, Custom("switch_scene")),
5+
(300, Screenshot),
6+
(400, Custom("switch_scene")),
7+
(500, Screenshot),
8+
(600, Custom("switch_scene")),
9+
(700, Screenshot),
10+
(800, AppExit),
11+
]
12+
)

.github/example-run/testbed_ui.ron

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(
2+
events: [
3+
(100, Screenshot),
4+
(200, AppExit),
5+
]
6+
)

.github/start-wasm-example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"author": "",
99
"license": "ISC",
1010
"devDependencies": {
11-
"@playwright/test": "^1.28.1"
11+
"@playwright/test": "^1.49.1"
1212
},
1313
"dependencies": {
1414
"dotenv": "^16.0.1"
1515
}
16-
}
16+
}

.github/workflows/action-on-PR-labeled.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
jobs:
1515
comment-on-breaking-change-label:
1616
runs-on: ubuntu-latest
17-
if: github.event.label.name == 'C-Breaking-Change' && !contains(github.event.pull_request.body, '## Migration Guide')
17+
if: github.event.label.name == 'M-Needs-Migration-Guide' && !contains(github.event.pull_request.body, '## Migration Guide')
1818
steps:
1919
- uses: actions/github-script@v7
2020
with:

.github/workflows/ci-comment-failures.yml

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
3131
owner: context.repo.owner,
3232
repo: context.repo.repo,
33-
run_id: ${{github.event.workflow_run.id }},
33+
run_id: ${{ github.event.workflow_run.id }},
3434
});
3535
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
3636
return artifact.name == "missing-examples"
@@ -88,7 +88,7 @@ jobs:
8888
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
8989
owner: context.repo.owner,
9090
repo: context.repo.repo,
91-
run_id: ${{github.event.workflow_run.id }},
91+
run_id: ${{ github.event.workflow_run.id }},
9292
});
9393
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
9494
return artifact.name == "missing-features"
@@ -146,7 +146,7 @@ jobs:
146146
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
147147
owner: context.repo.owner,
148148
repo: context.repo.repo,
149-
run_id: ${{github.event.workflow_run.id }},
149+
run_id: ${{ github.event.workflow_run.id }},
150150
});
151151
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
152152
return artifact.name == "msrv"
@@ -178,3 +178,64 @@ jobs:
178178
issue_number: issue_number,
179179
body: 'Your PR increases Bevy Minimum Supported Rust Version. Please update the `rust-version` field in the root Cargo.toml file.'
180180
});
181+
182+
make-macos-screenshots-available:
183+
runs-on: ubuntu-latest
184+
timeout-minutes: 30
185+
outputs:
186+
branch-name: ${{ steps.branch-name.outputs.result }}
187+
steps:
188+
- name: 'Download artifact'
189+
id: find-artifact
190+
uses: actions/github-script@v7
191+
with:
192+
result-encoding: string
193+
script: |
194+
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
195+
owner: context.repo.owner,
196+
repo: context.repo.repo,
197+
run_id: ${{github.event.workflow_run.id }},
198+
});
199+
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
200+
return artifact.name == "screenshots-macos"
201+
});
202+
if (matchArtifacts.length == 0) { return "false" }
203+
var matchArtifact = matchArtifacts[0];
204+
var download = await github.rest.actions.downloadArtifact({
205+
owner: context.repo.owner,
206+
repo: context.repo.repo,
207+
artifact_id: matchArtifact.id,
208+
archive_format: 'zip',
209+
});
210+
var fs = require('fs');
211+
fs.writeFileSync('${{github.workspace}}/screenshots-macos.zip', Buffer.from(download.data));
212+
return "true"
213+
- name: prepare artifact folder
214+
run: |
215+
unzip screenshots-macos.zip
216+
mkdir screenshots
217+
mv screenshots-* screenshots/
218+
- name: save screenshots
219+
uses: actions/upload-artifact@v4
220+
with:
221+
name: screenshots-macos
222+
path: screenshots
223+
- name: branch name
224+
id: branch-name
225+
run: |
226+
if [ -f PR ]; then
227+
echo "result=PR-$(cat PR)-${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
228+
else
229+
echo "result=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
230+
fi
231+
232+
compare-macos-screenshots:
233+
name: Compare macOS screenshots
234+
needs: [make-macos-screenshots-available]
235+
uses: ./.github/workflows/send-screenshots-to-pixeleagle.yml
236+
with:
237+
commit: ${{ github.event.workflow_run.head_sha }}
238+
branch: ${{ needs.make-macos-screenshots-available.outputs.branch-name }}
239+
artifact: screenshots-macos
240+
os: macos
241+
secrets: inherit

.github/workflows/ci.yml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
CARGO_TERM_COLOR: always
1313
# If nightly is breaking CI, modify this variable to target a specific nightly version.
1414
NIGHTLY_TOOLCHAIN: nightly
15+
RUSTFLAGS: "-D warnings"
1516

1617
concurrency:
1718
group: ${{github.workflow}}-${{github.ref}}
@@ -72,8 +73,7 @@ jobs:
7273
run: cargo run -p ci -- lints
7374

7475
miri:
75-
# Explicity use macOS 14 to take advantage of M1 chip.
76-
runs-on: macos-14
76+
runs-on: macos-latest
7777
timeout-minutes: 60
7878
steps:
7979
- uses: actions/checkout@v4
@@ -127,6 +127,30 @@ jobs:
127127
- name: Check Compile
128128
# See tools/ci/src/main.rs for the commands this runs
129129
run: cargo run -p ci -- compile
130+
check-compiles-no-std:
131+
runs-on: ubuntu-latest
132+
timeout-minutes: 30
133+
needs: ci
134+
steps:
135+
- uses: actions/checkout@v4
136+
- uses: actions/cache@v4
137+
with:
138+
path: |
139+
~/.cargo/bin/
140+
~/.cargo/registry/index/
141+
~/.cargo/registry/cache/
142+
~/.cargo/git/db/
143+
target/
144+
crates/bevy_ecs_compile_fail_tests/target/
145+
crates/bevy_reflect_compile_fail_tests/target/
146+
key: ${{ runner.os }}-cargo-check-compiles-no-std-${{ hashFiles('**/Cargo.toml') }}
147+
- uses: dtolnay/rust-toolchain@stable
148+
with:
149+
targets: x86_64-unknown-none
150+
- name: Install Linux dependencies
151+
uses: ./.github/actions/install-linux-deps
152+
- name: Check Compile
153+
run: cargo run -p ci -- compile-check-no-std
130154

131155
build-wasm:
132156
runs-on: ubuntu-latest
@@ -172,7 +196,7 @@ jobs:
172196
- name: Check wasm
173197
run: cargo check --target wasm32-unknown-unknown -Z build-std=std,panic_abort
174198
env:
175-
RUSTFLAGS: "-C target-feature=+atomics,+bulk-memory"
199+
RUSTFLAGS: "-C target-feature=+atomics,+bulk-memory -D warnings"
176200

177201
markdownlint:
178202
runs-on: ubuntu-latest
@@ -206,10 +230,10 @@ jobs:
206230
- name: Taplo info
207231
if: failure()
208232
run: |
209-
echo 'To fix toml fmt, please run `taplo fmt`'
210-
echo 'To check for a diff, run `taplo fmt --check --diff'
233+
echo 'To fix toml fmt, please run `taplo fmt`.'
234+
echo 'To check for a diff, run `taplo fmt --check --diff`.'
211235
echo 'You can find taplo here: https://taplo.tamasfe.dev/'
212-
echo 'Or if you use VSCode, use the `Even Better Toml` extension with 2 spaces'
236+
echo 'Or if you use VSCode, use the `Even Better Toml` extension.'
213237
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml'
214238
215239
typos:
@@ -218,7 +242,7 @@ jobs:
218242
steps:
219243
- uses: actions/checkout@v4
220244
- name: Check for typos
221-
uses: crate-ci/typos@v1.24.6
245+
uses: crate-ci/typos@v1.29.4
222246
- name: Typos info
223247
if: failure()
224248
run: |
@@ -228,21 +252,15 @@ jobs:
228252
echo 'if you use VSCode, you can also install `Typos Spell Checker'
229253
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode'
230254
231-
232255
run-examples-macos-metal:
233-
# Explicity use macOS 14 to take advantage of M1 chip.
234-
runs-on: macos-14
256+
runs-on: macos-latest
235257
timeout-minutes: 30
236258
steps:
237259
- uses: actions/checkout@v4
238260
- uses: dtolnay/rust-toolchain@stable
239261
- name: Disable audio
240262
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes
241263
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch
242-
- name: Build bevy
243-
# this uses the same command as when running the example to ensure build is reused
244-
run: |
245-
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"
246264
- name: Run examples
247265
run: |
248266
for example in .github/example-run/*.ron; do
@@ -263,6 +281,10 @@ jobs:
263281
with:
264282
name: example-traces-macos
265283
path: traces
284+
- name: Save PR number
285+
if: ${{ github.event_name == 'pull_request' }}
286+
run: |
287+
echo ${{ github.event.number }} > ./screenshots/PR
266288
- name: save screenshots
267289
uses: actions/upload-artifact@v4
268290
with:
@@ -273,7 +295,6 @@ jobs:
273295
with:
274296
name: example-run-macos
275297
path: example-run/
276-
277298
check-doc:
278299
runs-on: ubuntu-latest
279300
timeout-minutes: 30
@@ -299,7 +320,7 @@ jobs:
299320
run: cargo run -p ci -- doc
300321
env:
301322
CARGO_INCREMENTAL: 0
302-
RUSTFLAGS: "-C debuginfo=0"
323+
RUSTFLAGS: "-C debuginfo=0 -D warnings"
303324
# This currently report a lot of false positives
304325
# Enable it again once it's fixed - https://github.com/bevyengine/bevy/issues/1983
305326
# - name: Installs cargo-deadlinks

0 commit comments

Comments
 (0)