-
Notifications
You must be signed in to change notification settings - Fork 28
55 lines (53 loc) · 1.53 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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
msrv:
strategy:
matrix:
rust:
- version: stable
command: test
args: ""
- version: 1.48.0
command: check
args: "--locked"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install ${{ matrix.rust.version }} --profile minimal --allow-downgrade
- run: mv Cargo.lock.msrv Cargo.lock
if: ${{ matrix.rust.version}} == 1.48.0
- name: cargo check/test
run: cargo ${{ matrix.rust.command }} ${{ matrix.rust.args }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --allow-downgrade
- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
run: cargo clippy --all-features -- --deny warnings
- name: install tarpaulin
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-tarpaulin
- name: cargo tarpaulin
run: cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install nightly --profile minimal
- name: cargo bench
run: cargo +nightly bench --all-features