Skip to content

chore(examples): Add id3info example #184

chore(examples): Add id3info example

chore(examples): Add id3info example #184

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
# Cancel previous runs for PRs but not pushes to main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
cargo-toml-features:
name: Generate Feature Combinations
runs-on: ubuntu-latest
outputs:
feature-combinations: ${{ steps.cargo-toml-features.outputs.feature-combinations }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Determine Cargo Features
id: cargo-toml-features
uses: Holzhaus/cargo-toml-features-action@3afa751aae4071b2d1ca1c5fa42528a351c995f4
build:
needs: cargo-toml-features
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
features: ${{ fromJson(needs.cargo-toml-features.outputs.feature-combinations) }}
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Install FFmpeg (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y ffmpeg
- name: Install FFmpeg (macOS)
if: runner.os == 'macOS'
run: |
brew install ffmpeg
- name: Install FFmpeg (Windows)
if: runner.os == 'Windows'
run: |
choco install ffmpeg
shell: powershell
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build
run: cargo build --no-default-features --features "${{ join(matrix.features, ',') }}"
- name: Run tests
run: cargo test --no-default-features --features "${{ join(matrix.features, ',') }}" --no-fail-fast
msrv:
name: Current MSRV is 1.70.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV
- uses: dtolnay/[email protected]
- run: cargo build --all-features
style:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Format
run: cargo fmt --check
- name: Lint
run: cargo clippy --all-features -- -Dwarnings
- name: Check for debug macro
run: "! grep -r 'dbg!' ./src"
conventional-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: pip3 install -U Commitizen
# The commit hash here is that of the commit where we started using conventional commits.
- run: cz check --rev-range 16610ddb..HEAD