-
Notifications
You must be signed in to change notification settings - Fork 26
72 lines (61 loc) · 2.16 KB
/
ci.yaml
File metadata and controls
72 lines (61 loc) · 2.16 KB
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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Clippy Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install capnp dependencies
run: sudo apt-get install -y capnproto libcapnp-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@1.85
with:
components: clippy
- name: Clippy check
run: |
cargo clippy --manifest-path=stratum-apps/Cargo.toml --all-features -- -D warnings
cargo clippy --manifest-path=pool-apps/Cargo.toml -- -D warnings
cargo clippy --manifest-path=pool-apps/jd-server/Cargo.toml -- -D warnings
cargo clippy --manifest-path=miner-apps/Cargo.toml -- -D warnings
cargo clippy --manifest-path=integration-tests/Cargo.toml -- -D warnings
cargo clippy --manifest-path=bitcoin-core-sv2/Cargo.toml -- -D warnings
fmt:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install capnp dependencies
run: sudo apt-get install -y capnproto libcapnp-dev
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all --manifest-path=stratum-apps/Cargo.toml -- --check
cargo fmt --all --manifest-path=pool-apps/Cargo.toml -- --check
cargo fmt --all --manifest-path=pool-apps/jd-server/Cargo.toml -- --check
cargo fmt --all --manifest-path=miner-apps/Cargo.toml -- --check
cargo fmt --all --manifest-path=integration-tests/Cargo.toml -- --check
cargo fmt --all --manifest-path=bitcoin-core-sv2/Cargo.toml -- --check
machete:
name: Unused Dependencies (cargo machete)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Run cargo-machete
uses: bnjbvr/cargo-machete@main