Skip to content

Commit

Permalink
Merge pull request #53 from AkiyukiOkayasu/ci
Browse files Browse the repository at this point in the history
ci: Runs on Rust stable, beta and nightly version
  • Loading branch information
AkiyukiOkayasu authored Aug 16, 2024
2 parents c268672 + e623d64 commit 7bd9fc5
Showing 1 changed file with 34 additions and 29 deletions.
63 changes: 34 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,47 @@ name: CI

on:
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]
branches: ["main"]
types: [opened, synchronize, reopened]

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-review'
- name: install libasound2-dev
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Print stable Rust version
run: rustc --version
- name: Formatter
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run examples
run: |
cargo build --example beep
cargo build --example beep_imaadpcm
cargo build --example beep_imaadpcm_stereo
cargo build --example print_sample_values
cargo build --example read_wav_no_std
cargo build --example read_ima_adpcm_no_std
strategy:
matrix:
toolchain:
- stable
- nightly

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: install libasound2-dev
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Set up Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add rustfmt && rustup component add clippy
- name: Print Rust version
run: rustc --version
- name: Formatter
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Run tests
run: cargo test --verbose
- name: Run examples
run: |
cargo build --example beep
cargo build --example beep_imaadpcm
cargo build --example beep_imaadpcm_stereo
cargo build --example print_sample_values
cargo build --example read_wav_no_std
cargo build --example read_ima_adpcm_no_std

0 comments on commit 7bd9fc5

Please sign in to comment.