-
-
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.
run examples on macOS to validate PRs (#11630)
# Objective - CI doesn't validate running examples on macOS - GitHub now has free m1 runners with a virtualised GPU https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ ## Solution - Add a job to run examples on macOS when trying to merge a PR - Add a patch to disable audio in CI as it timeouts after 15 minutes on macOS, and fails anyway on the other runners
- Loading branch information
Showing
3 changed files
with
90 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/crates/bevy_audio/src/audio_output.rs b/crates/bevy_audio/src/audio_output.rs | ||
index 3e8082e23..624769443 100644 | ||
--- a/crates/bevy_audio/src/audio_output.rs | ||
+++ b/crates/bevy_audio/src/audio_output.rs | ||
@@ -7,7 +7,7 @@ use bevy_ecs::{prelude::*, system::SystemParam}; | ||
use bevy_math::Vec3; | ||
use bevy_transform::prelude::GlobalTransform; | ||
use bevy_utils::tracing::warn; | ||
-use rodio::{OutputStream, OutputStreamHandle, Sink, Source, SpatialSink}; | ||
+use rodio::{OutputStreamHandle, Sink, Source, SpatialSink}; | ||
|
||
use crate::AudioSink; | ||
|
||
@@ -30,18 +30,10 @@ pub(crate) struct AudioOutput { | ||
|
||
impl Default for AudioOutput { | ||
fn default() -> Self { | ||
- if let Ok((stream, stream_handle)) = OutputStream::try_default() { | ||
- // We leak `OutputStream` to prevent the audio from stopping. | ||
- std::mem::forget(stream); | ||
- Self { | ||
- stream_handle: Some(stream_handle), | ||
- } | ||
- } else { | ||
warn!("No audio device found."); | ||
Self { | ||
stream_handle: None, | ||
} | ||
- } | ||
} | ||
} | ||
|
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