forked from feather-rs/feather
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.48 KB
/
main.yml
File metadata and controls
60 lines (51 loc) · 1.48 KB
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: build
on:
push:
branches: [ develop, master, staging ]
pull_request:
branches: [ develop, master, staging ]
jobs:
build:
name: "Build and Test"
strategy:
matrix:
os: [ ubuntu-18.04, windows-2019, macos-10.15 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
# Caching
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry2-
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index2-
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target2-
- name: Install rustfmt
run: rustup component add rustfmt
- name: Run tests
run: cargo test
env:
RUSTFLAGS: "-C opt-level=0"
- name: Install Clippy
run: rustup component add clippy
- name: Run Clippy
run: cargo clippy --all-targets -- -D warnings
env:
RUSTFLAGS: "-C opt-level=0"
- name: Check formatting
run: cargo fmt -- --check