From bf60185d4bb97489ce2a0c2fc02ccb5413a678e2 Mon Sep 17 00:00:00 2001 From: Petr Gladkikh Date: Fri, 22 Nov 2024 20:58:01 +0400 Subject: [PATCH] Exclude examples from experimental build tests --- .github/workflows/ci.yml | 2 +- examples/automatic_gain_control.rs | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48c93124..4fed37b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' - run: cargo test --all-targets - - run: cargo test --all-targets --features=experimental + - run: cargo test --lib --bins --tests --benches --features=experimental - run: cargo test --all-targets --features=symphonia-all # `cargo test` does not check benchmarks and `cargo test --all-targets` excludes # documentation tests. Therefore, we need an additional docs test command here. diff --git a/examples/automatic_gain_control.rs b/examples/automatic_gain_control.rs index 78ae21bb..6bf78d5e 100644 --- a/examples/automatic_gain_control.rs +++ b/examples/automatic_gain_control.rs @@ -23,21 +23,14 @@ fn main() { // or we would lose it when we move it into the periodic access. let agc_enabled = Arc::new(AtomicBool::new(true)); - #[cfg(not(feature = "experimental"))] - { - let agc_enabled_clone = agc_enabled.clone(); - let controlled = agc_source.periodic_access(Duration::from_millis(5), move |agc_source| { - agc_source.set_enabled(agc_enabled_clone.load(Ordering::Relaxed)); - }); - - // Add the source now equipped with automatic gain control and controlled via - // periodic_access to the sink for playback. - sink.append(controlled); - } - #[cfg(feature = "experimental")] - { - sink.append(agc_source); - } + let agc_enabled_clone = agc_enabled.clone(); + let controlled = agc_source.periodic_access(Duration::from_millis(5), move |agc_source| { + agc_source.set_enabled(agc_enabled_clone.load(Ordering::Relaxed)); + }); + + // Add the source now equipped with automatic gain control and controlled via + // periodic_access to the sink for playback. + sink.append(controlled); // After 5 seconds of playback disable automatic gain control using the // shared AtomicBool `agc_enabled`. You could do this from another part