-
Notifications
You must be signed in to change notification settings - Fork 61
52 lines (43 loc) · 1.44 KB
/
clippy_test.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
name: Cargo Nightly Clippy
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: "1G"
jobs:
build_and_test:
name: lite-rpc full build
runs-on: ubuntu-22.04
steps:
- name: Install Linux Packages
run: |
sudo apt-get update -y
sudo apt-get install libssl-dev openssl protobuf-compiler -y
- uses: actions/checkout@v4
# The toolchain action should definitely be run before the cache action
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# use toolchain version from rust-toolchain.toml
toolchain: nightly-2023-10-05
components: rustfmt, clippy
cache: true
# avoid the default "-D warnings" which thrashes cache
rustflags: ""
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
# https://blog.arriven.wtf/posts/rust-ci-cache/
- uses: Swatinem/rust-cache@v2
with:
# will be covered by sscache
cache-targets: false
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run fmt+clippy
run: |
cargo +nightly-2023-10-05 fmt --all --check
cargo +nightly-2023-10-05 clippy --locked --workspace --all-targets -- -D warnings