-
Notifications
You must be signed in to change notification settings - Fork 9
34 lines (30 loc) · 968 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.rustup/toolchains/nightly-*
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.toolchain }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install nightly toolchain
run: rustup install nightly
if: matrix.toolchain == 'nightly'
- name : Install clippy
run: rustup component add clippy --toolchain ${{ matrix.toolchain }}
- name: Run clippy
run: cargo +${{ matrix.toolchain }} clippy --release --all-features --verbose
- name: Run tests
run: cargo +${{ matrix.toolchain }} test --release --all-features --verbose