-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.23 KB
/
main.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Rust CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [stable, nightly]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@master
- name: Build
run: |
rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
cargo build
test:
name: Test
runs-on: ${{ matrix.os }}
needs: [build]
strategy:
matrix:
rust: [stable, nightly]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@master
- name: Test
run: |
rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
cargo test
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Rustfmt Check
run: |
rustup update stable && rustup default stable && rustup component add rustfmt
cargo fmt -- --check
clippy-check:
name: Clippy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true