-
Notifications
You must be signed in to change notification settings - Fork 19
63 lines (57 loc) · 1.51 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 1,15 * *"
jobs:
fmt:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo fmt
run: cargo fmt --check
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly, 1.76]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Run tests
run: |
cargo test --all-features
cargo test --no-default-features
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: cargo clippy
run: cargo clippy --all-features
fuzz-tests:
name: fuzz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
- name: install cargo-fuzz
run: cargo install cargo-fuzz
- name: run tests
run: for fuzz_test in `cargo fuzz list`; do cargo fuzz run $fuzz_test -- -max_total_time=10 || exit 1; done