Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bevyengine/bevy into try-de…
Browse files Browse the repository at this point in the history
…spawn
  • Loading branch information
rudderbucky committed Oct 3, 2024
2 parents fd57fba + ca8dd06 commit cbed104
Show file tree
Hide file tree
Showing 306 changed files with 8,682 additions and 3,916 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,6 @@ jobs:
echo -e "$errors"
echo " Avoid importing internal Bevy crates, they should not be used directly"
echo " Fix the issue by replacing 'bevy_*' with 'bevy'"
echo " Example: 'use bevy::sprite::MaterialMesh2dBundle;' instead of 'bevy_internal::sprite::MaterialMesh2dBundle;'"
echo " Example: 'use bevy::sprite::Mesh2d;' instead of 'bevy_internal::sprite::Mesh2d;'"
exit 1
fi
21 changes: 15 additions & 6 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,32 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

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

- name: Add Android targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi
run: rustup target add aarch64-linux-android

- name: Install Cargo APK
run: cargo install --force cargo-apk
- name: Install Cargo NDK
run: cargo install --force cargo-ndk

- name: Build app for Android
run: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME cargo apk build --package bevy_mobile_example
- name: Build .so file
run: cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build --package bevy_mobile_example
env:
# This will reduce the APK size from 1GB to ~200MB
CARGO_PROFILE_DEV_DEBUG: false

- name: Build app for Android
run: cd examples/mobile/android_example && chmod +x gradlew && ./gradlew build

- name: Upload to Browser Stack
run: |
curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
-F "file=@target/debug/apk/bevyexample.apk" \
-F "file=@app/build/outputs/apk/debug/app-debug.apk" \
-F "custom_id=$GITHUB_RUN_ID"
nonce:
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

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

- uses: actions/cache@v4
with:
path: |
Expand All @@ -60,13 +66,16 @@ jobs:
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}

- name: Install Android targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi
run: rustup target add aarch64-linux-android

- name: Install Cargo NDK
run: cargo install --force cargo-ndk

- name: Install Cargo APK
run: cargo install --force cargo-apk
- name: Build .so file
run: cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build --package bevy_mobile_example

- name: Build APK
run: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME cargo apk build --package bevy_mobile_example
- name: Build app for Android
run: cd examples/mobile/android_example && chmod +x gradlew && ./gradlew build

run-examples-linux-vulkan:
if: ${{ github.event_name == 'merge_group' }}
Expand Down
29 changes: 29 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ default = [
"default_font",
"webgl2",
"sysinfo_plugin",
"android-game-activity",
]

# Provides an implementation for picking sprites
Expand Down Expand Up @@ -327,6 +328,12 @@ wayland = ["bevy_internal/wayland"]
# X11 display server support
x11 = ["bevy_internal/x11"]

# Android NativeActivity support. Legacy, should be avoided for most new Android games.
android-native-activity = ["bevy_internal/android-native-activity"]

# Android GameActivity support. Default, choose between this and `android-native-activity`.
android-game-activity = ["bevy_internal/android-game-activity"]

# Enable systems that allow for automated testing on CI
bevy_ci_testing = ["bevy_internal/bevy_ci_testing"]

Expand Down Expand Up @@ -2965,6 +2972,17 @@ description = "Demonstrates text wrapping"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "ghost_nodes"
path = "examples/ui/ghost_nodes.rs"
doc-scrape-examples = true

[package.metadata.example.ghost_nodes]
name = "Ghost Nodes"
description = "Demonstrates the use of Ghost Nodes to skip entities in the UI layout hierarchy"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "grid"
path = "examples/ui/grid.rs"
Expand Down Expand Up @@ -3430,6 +3448,17 @@ description = "Demonstrates screen space reflections with water ripples"
category = "3D Rendering"
wasm = false

[[example]]
name = "camera_sub_view"
path = "examples/3d/camera_sub_view.rs"
doc-scrape-examples = true

[package.metadata.example.camera_sub_view]
name = "Camera sub view"
description = "Demonstrates using different sub view effects on a camera"
category = "3D Rendering"
wasm = true

[[example]]
name = "color_grading"
path = "examples/3d/color_grading.rs"
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/bevy_ecs/world/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ pub fn spawn_commands(criterion: &mut Criterion) {
bencher.iter(|| {
let mut commands = Commands::new(&mut command_queue, &world);
for i in 0..entity_count {
let entity = commands
.spawn_empty()
let mut entity = commands.spawn_empty();
entity
.insert_if(A, || black_box(i % 2 == 0))
.insert_if(B, || black_box(i % 3 == 0))
.insert_if(C, || black_box(i % 4 == 0));
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ bevy_ui = { path = "../bevy_ui", version = "0.15.0-dev", features = [
bevy_text = { path = "../bevy_text", version = "0.15.0-dev" }

# other
fixedbitset = "0.5"
petgraph = { version = "0.6", features = ["serde-1"] }
ron = "0.8"
serde = "1"
blake3 = { version = "1.0" }
thiserror = "1"
thread_local = "1"
uuid = { version = "1.7", features = ["v4"] }
smallvec = "1"

[lints]
workspace = true
Expand Down
Loading

0 comments on commit cbed104

Please sign in to comment.