Skip to content

Commit

Permalink
Improve CI
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Feb 27, 2024
1 parent d3b7742 commit 2959ce1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 50 deletions.
70 changes: 21 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,24 @@ jobs:
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Setup Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: rustup install stable && rustup default stable

- name: Check default features
uses: actions-rs/cargo@v1
with:
command: check
args: --all
run: cargo check --all

- name: Check all features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features --exclude symphonia-play
run: cargo check --all --all-features --exclude symphonia-play

test:
name: Test ${{ matrix.config.target }} on ${{ matrix.config.os }}

env:
CARGO: cargo
CROSS_VERSION: v0.2.5

runs-on: ${{ matrix.config.os }}
strategy:
matrix:
Expand All @@ -51,55 +45,33 @@ jobs:
- { os: ubuntu-latest, target: powerpc-unknown-linux-gnu, use-cross: true }

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Setup Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: rustup install stable && rustup default stable

- name: Setup Cross
if: matrix.config.use-cross
run: |
cargo install cross --locked
echo "CARGO=cross" >> $GITHUB_ENV
- name: Test default features
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.config.target }} --all --exclude symphonia-play
use-cross: ${{ matrix.config.use-cross }}
run: ${{ env.CARGO }} test --target ${{ matrix.config.target }} --all --exclude symphonia-play

- name: Test all features
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.config.target }} --all --all-features --exclude symphonia-play
use-cross: ${{ matrix.config.use-cross }}

- name: Test documentation
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.config.target }} --all --all-features --doc --exclude symphonia-play
use-cross: ${{ matrix.config.use-cross }}
run: ${{ env.CARGO }} test --target ${{ matrix.config.target }} --all --all-features --exclude symphonia-play

fmt:
name: Rustfmt

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Setup Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
run: rustup install nightly --profile minimal && rustup default nightly && rustup component add rustfmt

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
2 changes: 1 addition & 1 deletion symphonia-bundle-mp3/src/layer3/stereo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ lazy_static! {
///
/// The value of i0 is dependant on the least significant bit of scalefac_compress.
///
/// ```text
/// ```text
/// scalefac_compress & 1 | i0
/// ----------------------+---------------------
/// 0 | 1 / sqrt(sqrt(2.0))
Expand Down

0 comments on commit 2959ce1

Please sign in to comment.