|
10 | 10 | CARGO_TERM_COLOR: always |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - build: |
14 | | - name: Build and test |
| 13 | + check_and_test: |
| 14 | + name: Check and test |
15 | 15 | strategy: |
16 | 16 | matrix: |
17 | 17 | os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] |
| 18 | + toolchain: |
| 19 | + - 1.56.1 # min supported version (https://github.com/webrtc-rs/webrtc/#toolchain) |
| 20 | + - stable |
18 | 21 | runs-on: ${{ matrix.os }} |
19 | 22 | steps: |
20 | | - - uses: actions/checkout@v2 |
21 | | - - name: Build |
22 | | - run: cargo build --verbose |
23 | | - - name: Run tests |
24 | | - run: cargo test --verbose |
| 23 | + - uses: actions/checkout@v3 |
| 24 | + - name: Cache cargo registry |
| 25 | + uses: actions/cache@v3 |
| 26 | + with: |
| 27 | + path: ~/.cargo/registry |
| 28 | + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
| 29 | + - uses: actions-rs/toolchain@v1 |
| 30 | + with: |
| 31 | + toolchain: ${{ matrix.toolchain }} |
| 32 | + profile: minimal |
| 33 | + override: true |
| 34 | + - uses: actions-rs/cargo@v1 |
| 35 | + with: |
| 36 | + command: check |
| 37 | + - uses: actions-rs/cargo@v1 |
| 38 | + with: |
| 39 | + command: test |
25 | 40 |
|
26 | 41 | rustfmt_and_clippy: |
27 | | - name: Check rustfmt style && run clippy |
| 42 | + name: Check rustfmt style and run clippy |
28 | 43 | runs-on: ubuntu-latest |
29 | 44 | steps: |
30 | | - - uses: actions/checkout@v2 |
| 45 | + - uses: actions/checkout@v3 |
31 | 46 | - uses: actions-rs/toolchain@v1 |
32 | 47 | with: |
33 | | - toolchain: 1.55.0 |
| 48 | + toolchain: stable |
34 | 49 | profile: minimal |
35 | 50 | components: clippy, rustfmt |
36 | 51 | override: true |
37 | 52 | - name: Cache cargo registry |
38 | | - uses: actions/cache@v1 |
| 53 | + uses: actions/cache@v3 |
39 | 54 | with: |
40 | 55 | path: ~/.cargo/registry |
41 | 56 | key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
42 | 57 | - name: Run clippy |
43 | 58 | uses: actions-rs/cargo@v1 |
44 | 59 | with: |
45 | 60 | command: clippy |
| 61 | + args: -- -D warnings |
46 | 62 | - name: Check formating |
47 | 63 | uses: actions-rs/cargo@v1 |
48 | 64 | with: |
49 | 65 | command: fmt |
50 | 66 | args: --all -- --check |
| 67 | + |
| 68 | + minimal_versions: |
| 69 | + name: Compile and test with minimal versions |
| 70 | + strategy: |
| 71 | + matrix: |
| 72 | + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] |
| 73 | + runs-on: ${{ matrix.os }} |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v3 |
| 76 | + - name: Install latest nightly |
| 77 | + uses: actions-rs/toolchain@v1 |
| 78 | + with: |
| 79 | + toolchain: nightly |
| 80 | + override: true |
| 81 | + - uses: taiki-e/install-action@cargo-hack |
| 82 | + - uses: taiki-e/install-action@cargo-minimal-versions |
| 83 | + - run: cargo minimal-versions check --workspace --all-features --ignore-private -v |
| 84 | + - run: cargo minimal-versions build --workspace --all-features --ignore-private -v |
| 85 | + - run: cargo minimal-versions test --workspace --all-features -v |
0 commit comments