-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.yml
44 lines (44 loc) · 1.3 KB
/
config.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
version: 2
jobs:
build:
machine:
image: circleci/classic:201710-01
steps:
- checkout
- run:
name: Build spdk
command: sh .circleci/scripts/build_spdk.sh
- run:
name: Install rustup
command: |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
- restore_cache:
keys:
- deps-${CACHE_VERSION}-{{ .Branch }}-{{ .Revision }}
- deps-${CACHE_VERSION}-{{ .Branch }}-
- deps-${CACHE_VERSION}-
- run:
name: Cache dependencies
command: |
source $HOME/.cargo/env
cargo fetch
- save_cache:
key: deps-${CACHE_VERSION}-{{ .Branch }}-{{ .Revision }}
paths:
- "target"
- run:
name: Run 'cargo fmt'
command: |
source $HOME/.cargo/env
rustup component add rustfmt-preview
cargo fmt --all -- --check
- run:
name: Run 'cargo clippy'
command: |
source $HOME/.cargo/env
rustup component add clippy-preview
cargo clippy --all --all-targets --all-features -- -D warnings
- run:
name: Run tests
command: |
sudo bash .circleci/scripts/run_test.sh