Skip to content

The ability to fetch the current length of a SourcesQueueInput instance. #1376

The ability to fetch the current length of a SourcesQueueInput instance.

The ability to fetch the current length of a SourcesQueueInput instance. #1376

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main, master]
env:
RUSTFLAGS: "-C debuginfo=0 -D warnings"
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
msrv:
name: Get MSRV
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-msrv.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read MSRV from Cargo.toml
id: get-msrv
run: |
version=$(grep -m1 '^rust-version' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')
echo "version=$version" >> "$GITHUB_OUTPUT"
tests:
name: Tests
needs: msrv
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: macos-latest
MACOS: true
- os: windows-latest
- os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install linux build requirements
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends libasound2-dev pkg-config libjack-jackd2-dev libjack-jackd2-0 libdbus-1-dev libpipewire-0.3-dev
if: contains(matrix.os, 'ubuntu')
- name: Install ${{ needs.msrv.outputs.version }} toolchain
run: rustup toolchain install ${{ needs.msrv.outputs.version }} && rustup default ${{ needs.msrv.outputs.version }}
- name: Install stable toolchain for clippy
run: rustup toolchain install stable
if: matrix.os == 'ubuntu-latest'
- run: cargo +stable clippy --all-features -- -D warnings
if: matrix.os == 'ubuntu-latest'
- run: |
rustup component add rustfmt
cargo fmt --all -- --check
if: matrix.os == 'ubuntu-latest'
- run: cargo test --all-targets
- run: cargo test --all-targets --all-features
- run: cargo test --lib --bins --tests --benches --features=experimental
# `cargo test` does not check benchmarks and `cargo test --all-targets` excludes
# documentation tests. Therefore, we need an additional docs test command here.
- run: cargo test --doc
# Check minimal build.
- run: cargo check --tests --lib --no-default-features
# Check alternative decoders.
- run: cargo check --tests --lib --no-default-features --features claxon,hound,minimp3,lewton
# Test 64-bit sample mode
- run: cargo test --all-targets --features 64bit
- run: cargo test --doc --features 64bit
- run: cargo test --all-targets --all-features --features 64bit
# Check examples compile in both modes
- run: cargo check --examples
- run: cargo check --examples --features 64bit
# Verify docs
- run: cargo +nightly doc -Zunstable-options --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings