Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate CI jobs, add job caching #357

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 54 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,73 @@ env:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: ${{ matrix.toolchain }}
override: true

- uses: actions-rs/toolchain@v1
- uses: actions/cache@v2
with:
toolchain: nightly
components: rustfmt, clippy
path: |
target
key: ${{ runner.os }}-cargo-check-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install alsa
run: sudo apt-get install libasound2-dev
run: sudo apt-get install --no-install-recommends libasound2-dev

- name: Build
run: cargo check
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"

test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true

- uses: actions/cache@v2
with:
path: |
target
key: ${{ runner.os }}-cargo-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev

- name: Run tests
run: cargo test --workspace
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"

clean:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
override: true

- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev

- name: Check the format
run: cargo +nightly fmt --all -- --check
Expand All @@ -46,6 +95,3 @@ jobs:
--
-D warnings
-A clippy::type_complexity

- name: Run tests
run: cargo test --workspace