-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (56 loc) · 1.53 KB
/
bitar-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
on: [push, pull_request]
name: bitar-CI
env:
MSRV: 1.71.1
jobs:
# Run bitar tests.
bitar:
name: "bitar tests"
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
- $MSRV
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: install extra packages
run: sudo apt-get install -y liblzma-dev
- name: build
run: cargo build -p bitar --verbose
- name: test
run: cargo test -p bitar --verbose --features compress
- name: bitar lzma/zstd compression tests
run: cargo test -p bitar --verbose --features lzma-compression,zstd-compression,compress
# Run formatting check.
fmt:
name: formatting
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.77.2
components: rustfmt
- name: Check formatting
run: cargo fmt -p bitar -- --check
# Run clippy check.
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.77.2
components: clippy
- name: Check lints
run: cargo clippy -p bitar -- -D warnings -A clippy::cognitive-complexity