forked from alexilyenko/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
72 lines (70 loc) · 1.92 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: 1
jobs:
lint:
docker:
- image: circleci/rust:stretch
steps:
- checkout
- run:
name: Version Information
command: rustc --version; cargo --version; rustup --version
- run:
name: Install Rust Components
command: rustup component add rustfmt clippy
- run:
name: Component Version Information
command: cargo fmt -- --version; cargo clippy -- --version
- run:
name: Setup Env
command: |
echo 'export RUSTFLAGS="-D warnings"' >> $BASH_ENV
- run:
name: Lint (rustfmt)
command: |
cargo fmt -- --check
- run:
name: Lint (clippy)
command: |
cargo clippy
build:
docker:
- image: circleci/rust:stretch
steps:
- checkout
- run:
name: Version Information
command: rustc --version; cargo --version; rustup --version; python3 --version; clang++ --version; javac -version
- run:
name: Setup Env
command: |
echo 'export RUSTFLAGS="-D warnings"' >> $BASH_ENV
- run:
name: Build and Test
# Build all targets to ensure examples are built as well.
command: |
cargo build --all-targets
cargo test
# docs-build and docs-deploy are adapted from
# https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/.
docs-build:
docker:
- image: circleci/rust:stretch
steps:
- checkout
- run:
name: Version Information
command: rustc --version; cargo --version; rustup --version
- run:
name: Generate documentation
command: |
cargo doc
- persist_to_workspace:
root: target
paths: doc
workflows:
version: 2
build:
jobs:
- lint
- build
- docs-build