chore: release v0.14.1 (#147) #454
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
name: CI | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
env: | |
RUST_MIN: "1.75" | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v2" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libasound2-dev libmpv-dev | |
- name: Minimal build | |
run: cargo build --no-default-features | |
- name: Clippy | |
run: | | |
cargo clippy --all-features --examples -- -D warnings | |
- name: Build all | |
run: cargo build --all-features --examples | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install cargo-nextest | |
uses: taiki-e/install-action@cargo-nextest | |
- name: Test | |
run: | | |
cargo test --doc --all-features | |
NEXTEST_TEST_THREADS=24 RUST_LOG=trace cargo llvm-cov nextest --all-features --codecov --ignore-filename-regex ".cargo|.*_test\.rs" > ./codecov.json | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
verbose: true | |
fail_ci_if_error: true | |
files: ./codecov.json | |
release-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libasound2-dev libmpv-dev | |
- name: Minimal build | |
run: cargo build --release --no-default-features | |
- name: Build all | |
run: cargo build --release --all-features --examples | |
min-versions: | |
name: Check min dependency versions | |
# newer ubuntu versions have problems with older versions of openssl-sys | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust nightly | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: Install cargo-minimal-versions | |
uses: taiki-e/install-action@cargo-minimal-versions | |
- name: Cargo minimal-versions | |
run: | | |
cargo minimal-versions check --no-default-features --direct | |
cargo minimal-versions check --direct | |
cargo minimal-versions check --all-features --direct | |
min-rust: | |
name: Check MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# this interferes with the rust version that gets used | |
- name: remove toolchain | |
run: rm rust-toolchain.toml | |
- name: Install Rust ${{ env.RUST_MIN }} | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_MIN }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo check | |
run: cargo check --workspace --all-features | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust nightly | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libasound2-dev | |
- name: Check typos | |
uses: crate-ci/typos@master | |
- name: rustfmt | |
run: cargo +nightly fmt --all --check | |
- name: Verify docs | |
run: cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs -D warnings | |
- name: Lint dependencies | |
uses: EmbarkStudios/cargo-deny-action@v2 | |
# disabling until https://github.com/rustsec/audit-check/issues/28 is fixed | |
# - name: Security vulnerabilities audit | |
# uses: rustsec/[email protected] | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} |