-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (62 loc) · 1.74 KB
/
rust.yaml
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
name: Rust
on:
push:
branches: [main]
tags:
- v*
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
rust:
- "1.74"
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Install clippy
run: rustup component add clippy
- name: Build
run: |
cargo version
cargo build --verbose
- name: Run clippy
run: |
cargo clippy -- -D warnings
- name: Run tests
run: |
cargo test --verbose
cargo test --verbose --all-features
cargo test --verbose --lib ## Default feature
cargo test --verbose --lib --no-default-features
cargo test --verbose --lib --no-default-features --features=toml
cargo test --verbose --lib --no-default-features --features=yaml
cargo test --verbose --lib --no-default-features --features=rand
- name: Run examples
run: |
cargo run --example simple --features full
cargo run --example test_suit
cargo run --example salak
cargo run --example thread_pool
cargo run --example logger --features full
cargo run --example refresh
cargo run --example watch --features yaml
cargo run --example profile --features toml
# - name: Run benches
#run: |
#cargo bench --all-features