Skip to content

Commit

Permalink
Merge branch 'main' into track-observer-callsites
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecificProtagonist committed Dec 12, 2024
2 parents 19e4ec6 + cca6a2b commit e69d6a9
Show file tree
Hide file tree
Showing 1,018 changed files with 54,744 additions and 23,275 deletions.
8 changes: 4 additions & 4 deletions .cargo/config_fast_builds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Mold is a newer linker written by one of the authors of LLD. It boasts even greater performance, specifically
# through its high parallelism, though it only supports Linux.
#
# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for
# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by
# *uncommenting* its `-Clink-arg=...` line.
#
Expand All @@ -32,7 +32,7 @@
#
# # Nightly configuration
#
# Be warned that the following features require nightly Rust, which is expiremental and may contain bugs. If you
# Be warned that the following features require nightly Rust, which is experimental and may contain bugs. If you
# are having issues, skip this section and use stable Rust instead.
#
# There are a few unstable features that can improve performance. To use them, first install nightly Rust
Expand All @@ -51,7 +51,7 @@
# crates to share monomorphized generic code, so they do not duplicate work.
#
# In other words, instead of crate 1 generating `Foo<String>` and crate 2 generating `Foo<String>` separately,
# only one crate generates `Foo<String>` and the other adds on to the pre-exiting work.
# only one crate generates `Foo<String>` and the other adds on to the pre-existing work.
#
# Note that you may have some issues with this flag on Windows. If compiling fails due to the 65k symbol limit,
# you may have to disable this setting. For more information and possible solutions to this error, see
Expand Down Expand Up @@ -150,7 +150,7 @@ rustflags = [
# "-Zthreads=0",
]

# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# 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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/performance_regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Performance Regression
about: Bevy running slowly after upgrading? Report a performance regression.
title: ''
labels: C-Bug, C-Performance, C-Regression, S-Needs-Triage
labels: C-Bug, C-Performance, P-Regression, S-Needs-Triage
assignees: ''
---

Expand Down
5 changes: 0 additions & 5 deletions .github/example-run/alien_cake_addict.ron

This file was deleted.

9 changes: 0 additions & 9 deletions .github/example-run/breakout.ron

This file was deleted.

5 changes: 0 additions & 5 deletions .github/example-run/contributors.ron

This file was deleted.

9 changes: 0 additions & 9 deletions .github/example-run/load_gltf.ron

This file was deleted.

12 changes: 12 additions & 0 deletions .github/example-run/testbed_2d.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(
events: [
(100, Screenshot),
(200, Custom("switch_scene")),
(300, Screenshot),
(400, Custom("switch_scene")),
(500, Screenshot),
(600, Custom("switch_scene")),
(700, Screenshot),
(800, AppExit),
]
)
12 changes: 12 additions & 0 deletions .github/example-run/testbed_3d.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(
events: [
(100, Screenshot),
(200, Custom("switch_scene")),
(300, Screenshot),
(400, Custom("switch_scene")),
(500, Screenshot),
(600, Custom("switch_scene")),
(700, Screenshot),
(800, AppExit),
]
)
6 changes: 6 additions & 0 deletions .github/example-run/testbed_ui.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(
events: [
(100, Screenshot),
(200, AppExit),
]
)
2 changes: 1 addition & 1 deletion .github/workflows/action-on-PR-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
comment-on-breaking-change-label:
runs-on: ubuntu-latest
if: github.event.label.name == 'C-Breaking-Change' && !contains(github.event.pull_request.body, '## Migration Guide')
if: github.event.label.name == 'M-Needs-Migration-Guide' && !contains(github.event.pull_request.body, '## Migration Guide')
steps:
- uses: actions/github-script@v7
with:
Expand Down
67 changes: 64 additions & 3 deletions .github/workflows/ci-comment-failures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "missing-examples"
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "missing-features"
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "msrv"
Expand Down Expand Up @@ -178,3 +178,64 @@ jobs:
issue_number: issue_number,
body: 'Your PR increases Bevy Minimum Supported Rust Version. Please update the `rust-version` field in the root Cargo.toml file.'
});
make-macos-screenshots-available:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
branch-name: ${{ steps.branch-name.outputs.result }}
steps:
- name: 'Download artifact'
id: find-artifact
uses: actions/github-script@v7
with:
result-encoding: string
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "screenshots-macos"
});
if (matchArtifacts.length == 0) { return "false" }
var matchArtifact = matchArtifacts[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/screenshots-macos.zip', Buffer.from(download.data));
return "true"
- name: prepare artifact folder
run: |
unzip screenshots-macos.zip
mkdir screenshots
mv screenshots-* screenshots/
- name: save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-macos
path: screenshots
- name: branch name
id: branch-name
run: |
if [ -f PR ]; then
echo "result=PR-$(cat PR)-${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
else
echo "result=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
fi
compare-macos-screenshots:
name: Compare macOS screenshots
needs: [make-macos-screenshots-available]
uses: ./.github/workflows/send-screenshots-to-pixeleagle.yml
with:
commit: ${{ github.event.workflow_run.head_sha }}
branch: ${{ needs.make-macos-screenshots-available.outputs.branch-name }}
artifact: screenshots-macos
os: macos
secrets: inherit
54 changes: 39 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ jobs:
run: cargo run -p ci -- lints

miri:
# Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14
runs-on: macos-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -128,6 +127,31 @@ jobs:
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- compile

check-compiles-no-std:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: ci
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
crates/bevy_ecs_compile_fail_tests/target/
crates/bevy_reflect_compile_fail_tests/target/
key: ${{ runner.os }}-cargo-check-compiles-no-std-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-none
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Check Compile
run: cargo run -p ci -- compile-check-no-std

build-wasm:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -206,10 +230,10 @@ jobs:
- name: Taplo info
if: failure()
run: |
echo 'To fix toml fmt, please run `taplo fmt`'
echo 'To check for a diff, run `taplo fmt --check --diff'
echo 'To fix toml fmt, please run `taplo fmt`.'
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 'Or if you use VSCode, use the `Even Better Toml` extension.'
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml'
typos:
Expand All @@ -218,7 +242,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@v1.24.6
uses: crate-ci/typos@v1.28.2
- name: Typos info
if: failure()
run: |
Expand All @@ -228,21 +252,15 @@ jobs:
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'
run-examples-macos-metal:
# Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14
runs-on: macos-latest
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
# this uses the same command as when running the example to ensure build is reused
run: |
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
run: |
for example in .github/example-run/*.ron; do
Expand All @@ -263,6 +281,10 @@ jobs:
with:
name: example-traces-macos
path: traces
- name: Save PR number
if: ${{ github.event_name == 'pull_request' }}
run: |
echo ${{ github.event.number }} > ./screenshots/PR
- name: save screenshots
uses: actions/upload-artifact@v4
with:
Expand All @@ -288,7 +310,9 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
Expand All @@ -299,7 +323,7 @@ jobs:
run: cargo run -p ci -- doc
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 --cfg docsrs_dep"
# This currently report a lot of false positives
# Enable it again once it's fixed - https://github.com/bevyengine/bevy/issues/1983
# - name: Installs cargo-deadlinks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
Loading

0 comments on commit e69d6a9

Please sign in to comment.