-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (107 loc) · 3.09 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
105
106
107
108
109
110
name: CI
on: [push, pull_request]
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
test:
name: Test
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEBUG_DEBUG: 0
RUSTDOCFLAGS: --deny warnings
RUSTFLAGS: --warn rust-2018-idioms --deny warnings
RUST_BACKTRACE: 1
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
- '1.41.0'
features:
-
- alloc
- std
include:
- toolchain: stable
components: clippy
- toolchain: beta
components: clippy
- toolchain: nightly
components: clippy
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
components: ${{ matrix.components }}
- uses: Swatinem/rust-cache@v1
- name: Rustdoc
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --no-default-features '--features=${{ matrix.features }}' --no-deps
- name: Check
if: ${{ !contains(matrix.components, 'clippy') }}
uses: actions-rs/cargo@v1
with:
command: check
args: --verbose --no-default-features '--features=${{ matrix.features }}'
- name: Clippy
if: contains(matrix.components, 'clippy')
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --tests --no-default-features '--features=${{ matrix.features }}'
- name: Build
if: contains(fromJSON('["stable", "beta", "nightly"]'), matrix.toolchain)
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --tests --no-default-features '--features=${{ matrix.features }}'
- name: Test
if: contains(fromJSON('["stable", "beta", "nightly"]'), matrix.toolchain)
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --no-default-features '--features=${{ matrix.features }}'
miri:
name: Soundness test with Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: miri
override: true
- uses: Swatinem/rust-cache@v1
- run: cargo miri setup
- name: cargo miri test
uses: actions-rs/cargo@v1
with:
command: miri
args: test -- soundness
env:
MIRIFLAGS: -Zmiri-tag-raw-pointers