Exclude examples from experimental build tests

This commit is contained in:
Petr Gladkikh 2024-11-22 20:58:01 +04:00
parent de53b87a06
commit bf60185d4b
2 changed files with 8 additions and 15 deletions

View file

@ -47,7 +47,7 @@ jobs:
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'
- run: cargo test --all-targets - 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 - run: cargo test --all-targets --features=symphonia-all
# `cargo test` does not check benchmarks and `cargo test --all-targets` excludes # `cargo test` does not check benchmarks and `cargo test --all-targets` excludes
# documentation tests. Therefore, we need an additional docs test command here. # documentation tests. Therefore, we need an additional docs test command here.

View file

@ -23,21 +23,14 @@ fn main() {
// or we would lose it when we move it into the periodic access. // or we would lose it when we move it into the periodic access.
let agc_enabled = Arc::new(AtomicBool::new(true)); 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| {
let agc_enabled_clone = agc_enabled.clone(); agc_source.set_enabled(agc_enabled_clone.load(Ordering::Relaxed));
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 // Add the source now equipped with automatic gain control and controlled via
// periodic_access to the sink for playback. // periodic_access to the sink for playback.
sink.append(controlled); sink.append(controlled);
}
#[cfg(feature = "experimental")]
{
sink.append(agc_source);
}
// After 5 seconds of playback disable automatic gain control using the // After 5 seconds of playback disable automatic gain control using the
// shared AtomicBool `agc_enabled`. You could do this from another part // shared AtomicBool `agc_enabled`. You could do this from another part