From 38834d5e9cd1d1c06b73c47c348604c592aed723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Mon, 11 Sep 2023 22:11:48 +0200 Subject: [PATCH] time --- .github/workflows/stuff.yml | 2 +- examples/asset/processing/processing.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stuff.yml b/.github/workflows/stuff.yml index f7553e0469673..585e5874d6e9d 100644 --- a/.github/workflows/stuff.yml +++ b/.github/workflows/stuff.yml @@ -36,7 +36,7 @@ jobs: run: | cargo build --example asset_processing --features "filesystem_watcher,bevy_ci_testing" & { Start-Sleep -s 1; sed -i.bak 's/"a"/"modified"/' examples/asset/processing/assets/a.cool.ron; } & - cargo run --example asset_processing --no-default-features --features "filesystem_watcher,bevy_asset,multi-threaded" + cargo run --example asset_processing --no-default-features --features "filesystem_watcher,bevy_asset,multi-threaded,bevy_ci_testing" cat examples/asset/processing/imported_assets/a.cool.ron env: CI_TESTING_CONFIG: .github/example-run/alien_cake_addict.ron diff --git a/examples/asset/processing/processing.rs b/examples/asset/processing/processing.rs index 46e5b22928322..28f91ac9d8d67 100644 --- a/examples/asset/processing/processing.rs +++ b/examples/asset/processing/processing.rs @@ -37,9 +37,18 @@ fn main() { #[cfg(feature = "bevy_winit")] app.run(); + #[cfg(not(feature = "bevy_winit"))] loop { app.update(); + if !app + .world + .resource_mut::>() + .is_empty() + { + break; + } + std::thread::sleep(std::time::Duration::from_millis(25)); } }