-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (86 loc) · 2.25 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
on:
pull_request:
branches: [main]
push:
branches: [main]
release:
types: [published]
name: CI
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: rust cache
uses: Swatinem/[email protected]
- name: Run cargo build
run: cargo build --all-features --release
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
features:
- ""
- "--no-default-features --features rsa,ecdsa,p256,p384,p521"
- "--no-default-features --features fmt"
- "--no-default-features --features fmt,ecdsa,p256,p384,p521"
- "--no-default-features --features fmt,rsa"
toolchain:
- stable
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: rust cache
uses: Swatinem/[email protected]
- name: Run cargo test
run: cargo test ${{ matrix.features }}
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt,clippy
- name: rust cache
uses: Swatinem/[email protected]
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rust-docs
- name: rust cache
uses: Swatinem/[email protected]
- name: cargo doc
env:
RUSTDOCFLAGS: "-Dwarnings"
run: cargo doc --all-features --no-deps