-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (85 loc) · 2.6 KB
/
basic.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
on:
push:
branches:
- main
pull_request:
schedule:
# Run weekly to keep Rust toolchain changes fresh
- cron: '0 0 * * 1'
name: "Build, Test, Format, and Lint"
env:
RUSTFLAGS: "--deny warnings"
jobs:
multiple_toolchains:
name: Multiple toolchain tasks
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
# Uses `--all-targets` here to make sure that things like benchmarks
# still compile
- name: Build all targets
run: |
cargo build --all-targets --all-features
- name: Run the test suite
run: |
cargo test --all-features
- name: Check formatting
run: |
cargo fmt --all -- --check
- name: Check clippy lints
run: |
cargo clippy
# Only check building and clippy on MSRV since the other tasks are prone to
# problems from dev dependencies having higher MSRVs
msrv_only:
name: Check MSRV compilation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.70.0
components: clippy
- name: Cache
uses: Swatinem/rust-cache@v2
# All targets isn't used here due to MSRV issues with `clap`
- name: Build all targets
run: |
cargo build --all-features
- name: Check clippy lints
run: |
cargo clippy
nightly_only:
name: Nightly only tasks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Pin to a specific nightly version since we only want it for being able
# to use unstable features, not because we _need_ the newest version.
# This makes caching actually viable for more than just a day
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-10-01
- name: Cache
uses: Swatinem/rust-cache@v2
# Actually check the fuzzers so that they don't break silently
- name: Check parser fuzzers
run: |
cargo check --manifest-path keyvalues-parser/fuzz/Cargo.toml
- name: Check ser de fuzzers
run: |
cargo check --manifest-path keyvalues-serde/fuzz/Cargo.toml