|
15 | 15 | jobs:
|
16 | 16 | build:
|
17 | 17 | runs-on: ubuntu-latest
|
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + toolchain: [stable, nightly] |
18 | 21 | steps:
|
19 | 22 | - uses: actions/checkout@v2
|
20 | 23 |
|
21 | 24 | - uses: actions-rs/toolchain@v1
|
22 | 25 | with:
|
23 |
| - toolchain: stable |
| 26 | + toolchain: ${{ matrix.toolchain }} |
24 | 27 | override: true
|
25 | 28 |
|
26 |
| - - uses: actions-rs/toolchain@v1 |
| 29 | + - uses: actions/cache@v2 |
27 | 30 | with:
|
28 |
| - toolchain: nightly |
29 |
| - components: rustfmt, clippy |
| 31 | + path: | |
| 32 | + target |
| 33 | + key: ${{ runner.os }}-cargo-check-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} |
30 | 34 |
|
31 | 35 | - name: Install alsa
|
32 |
| - run: sudo apt-get install libasound2-dev |
| 36 | + run: sudo apt-get install --no-install-recommends libasound2-dev |
33 | 37 |
|
34 | 38 | - name: Build
|
35 | 39 | run: cargo check
|
| 40 | + env: |
| 41 | + CARGO_INCREMENTAL: 0 |
| 42 | + RUSTFLAGS: "-C debuginfo=0 -D warnings" |
| 43 | + |
| 44 | + test: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + strategy: |
| 47 | + matrix: |
| 48 | + toolchain: [stable, nightly] |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + |
| 52 | + - uses: actions-rs/toolchain@v1 |
| 53 | + with: |
| 54 | + toolchain: ${{ matrix.toolchain }} |
| 55 | + override: true |
| 56 | + |
| 57 | + - uses: actions/cache@v2 |
| 58 | + with: |
| 59 | + path: | |
| 60 | + target |
| 61 | + key: ${{ runner.os }}-cargo-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} |
| 62 | + |
| 63 | + - name: Install alsa |
| 64 | + run: sudo apt-get install --no-install-recommends libasound2-dev |
| 65 | + |
| 66 | + - name: Run tests |
| 67 | + run: cargo test --workspace |
| 68 | + env: |
| 69 | + CARGO_INCREMENTAL: 0 |
| 70 | + RUSTFLAGS: "-C debuginfo=0 -D warnings" |
| 71 | + |
| 72 | + clean: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v2 |
| 76 | + |
| 77 | + - uses: actions-rs/toolchain@v1 |
| 78 | + with: |
| 79 | + toolchain: nightly |
| 80 | + components: rustfmt, clippy |
| 81 | + override: true |
| 82 | + |
| 83 | + - name: Install alsa |
| 84 | + run: sudo apt-get install --no-install-recommends libasound2-dev |
36 | 85 |
|
37 | 86 | - name: Check the format
|
38 | 87 | run: cargo +nightly fmt --all -- --check
|
|
46 | 95 | --
|
47 | 96 | -D warnings
|
48 | 97 | -A clippy::type_complexity
|
49 |
| -
|
50 |
| - - name: Run tests |
51 |
| - run: cargo test --workspace |
|
0 commit comments