2021-04-23 02:34:34 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-02-03 03:12:39 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'LICENSE-*'
|
|
|
|
- '**/*.md'
|
|
|
|
- '.gitignore'
|
2022-04-24 21:08:13 +00:00
|
|
|
- 'CHANGELOG.md'
|
2022-01-09 00:45:27 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2021-04-23 02:34:34 +00:00
|
|
|
pull_request:
|
2023-02-24 18:44:17 +00:00
|
|
|
workflow_dispatch:
|
2021-04-23 02:34:34 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2023-02-24 10:36:17 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
project: ['.', 'ogg_pager', 'lofty_attr']
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ${{ matrix.project }}
|
2021-04-23 02:34:34 +00:00
|
|
|
name: Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-24 18:04:40 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install test dependencies
|
2023-01-21 17:11:16 +00:00
|
|
|
run: |
|
2023-02-24 18:04:40 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y ffmpeg # Need ffprobe for issue #37
|
2023-01-21 17:11:16 +00:00
|
|
|
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
|
2023-02-24 18:04:40 +00:00
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@v1
|
2021-04-23 02:34:34 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2023-02-24 18:04:40 +00:00
|
|
|
- run: |
|
|
|
|
cargo test --all-features --tests
|
|
|
|
|
2021-04-23 02:34:34 +00:00
|
|
|
docs:
|
2023-02-24 10:36:17 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-24 18:04:40 +00:00
|
|
|
project: ['.', 'ogg_pager', 'lofty_attr']
|
2023-02-24 10:36:17 +00:00
|
|
|
defaults:
|
2023-02-24 18:04:40 +00:00
|
|
|
run:
|
|
|
|
working-directory: ${{ matrix.project }}
|
2021-04-23 02:34:34 +00:00
|
|
|
name: Docs
|
|
|
|
runs-on: ubuntu-latest
|
2021-11-22 10:44:38 +00:00
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -Dwarnings
|
2021-04-23 02:34:34 +00:00
|
|
|
steps:
|
2023-02-24 18:04:40 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@v1
|
2021-04-23 02:34:34 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2023-02-24 10:36:17 +00:00
|
|
|
- run: |
|
|
|
|
cargo doc --all-features --no-deps
|
|
|
|
cargo test --all-features --doc
|
2023-02-24 18:04:40 +00:00
|
|
|
|
2021-04-23 02:34:34 +00:00
|
|
|
clippy:
|
2023-02-24 10:36:17 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-24 18:04:40 +00:00
|
|
|
project: ['.', 'ogg_pager', 'lofty_attr']
|
2023-02-24 10:36:17 +00:00
|
|
|
defaults:
|
2023-02-24 18:04:40 +00:00
|
|
|
run:
|
|
|
|
working-directory: ${{ matrix.project }}
|
2021-04-23 02:34:34 +00:00
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-24 18:04:40 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@v1
|
2021-04-23 02:34:34 +00:00
|
|
|
with:
|
2022-06-30 03:03:31 +00:00
|
|
|
toolchain: nightly
|
2023-02-24 18:04:40 +00:00
|
|
|
components: clippy
|
2023-02-24 10:36:17 +00:00
|
|
|
- run: |
|
|
|
|
cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
|
2023-02-24 18:04:40 +00:00
|
|
|
|
2021-07-19 16:46:33 +00:00
|
|
|
style:
|
2023-02-24 10:36:17 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-24 18:04:40 +00:00
|
|
|
project: ['.', 'ogg_pager', 'lofty_attr']
|
2023-02-24 10:36:17 +00:00
|
|
|
defaults:
|
2023-02-24 18:04:40 +00:00
|
|
|
run:
|
|
|
|
working-directory: ${{ matrix.project }}
|
2021-07-19 16:46:33 +00:00
|
|
|
name: Style
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-24 18:04:40 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@v1
|
2023-02-24 10:36:17 +00:00
|
|
|
with:
|
|
|
|
toolchain: nightly
|
2023-02-24 18:04:40 +00:00
|
|
|
components: rustfmt
|
2023-02-24 10:36:17 +00:00
|
|
|
- run: |
|
|
|
|
cargo fmt -- --check
|