Separate CI jobs (#357)
This commit is contained in:
parent
9aff0bcc2a
commit
4562a0925a
64
.github/workflows/ci.yml
vendored
64
.github/workflows/ci.yml
vendored
@ -15,24 +15,73 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
toolchain: [stable, nightly]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: ${{ matrix.toolchain }}
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-cargo-check-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: Install alsa
|
||||||
|
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
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
override: true
|
||||||
|
|
||||||
- name: Install alsa
|
- 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
|
|
||||||
|
|
||||||
- name: Check the format
|
- name: Check the format
|
||||||
run: cargo +nightly fmt --all -- --check
|
run: cargo +nightly fmt --all -- --check
|
||||||
@ -46,6 +95,3 @@ jobs:
|
|||||||
--
|
--
|
||||||
-D warnings
|
-D warnings
|
||||||
-A clippy::type_complexity
|
-A clippy::type_complexity
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --workspace
|
|
||||||
|
Loading…
Reference in New Issue
Block a user