23
23
toolchain : ${{ matrix.rust }}
24
24
override : true
25
25
- name : Build Projects
26
- run : ./scripts/build_projects.sh
26
+ run : |
27
+ cargo build --manifest-path=benches/Cargo.toml
28
+ cargo build --manifest-path=protocols/Cargo.toml
29
+ cargo build --manifest-path=roles/Cargo.toml
30
+ cargo build --manifest-path=utils/Cargo.toml
31
+
32
+ shared-strategy : &shared-strategy
33
+ strategy :
34
+ matrix :
35
+ os :
36
+ - macos-latest
37
+ - ubuntu-latest
38
+ include :
39
+ - os : macos-latest
40
+ target : x86_64-apple-darwin
41
+ - os : ubuntu-latest
42
+ target : x86_64-unknown-linux-musl
27
43
28
44
Semver-check :
29
45
runs-on : ubuntu-latest
@@ -49,21 +65,35 @@ jobs:
49
65
- run : sudo apt-get update && sudo apt-get install -y cmake
50
66
- run : cargo install cargo-semver-checks --version 0.37.0 --locked
51
67
- name : Run Semver Checks
52
- run : ./scripts/run_semver_checks.sh
68
+ run : |
69
+ for dir in \
70
+ common \
71
+ utils/buffer \
72
+ protocols/v2/binary-sv2/no-serde-sv2/codec \
73
+ protocols/v2/binary-sv2/serde-sv2 \
74
+ protocols/v2/binary-sv2/binary-sv2 \
75
+ protocols/v2/const-sv2 \
76
+ protocols/v2/framing-sv2 \
77
+ protocols/v2/noise-sv2 \
78
+ protocols/v2/codec-sv2 \
79
+ protocols/v2/subprotocols/common-messages \
80
+ protocols/v2/subprotocols/job-declaration \
81
+ protocols/v2/subprotocols/mining \
82
+ protocols/v2/subprotocols/template-distribution \
83
+ protocols/v2/sv2-ffi \
84
+ protocols/v2/roles-logic-sv2 \
85
+ protocols/v1 \
86
+ utils/bip32-key-derivation \
87
+ utils/error-handling \
88
+ utils/key-utils \
89
+ roles/roles-utils/network-helpers \
90
+ roles/roles-utils/rpc; do
91
+ cargo semver-checks --manifest-path="$dir/Cargo.toml"
92
+ done
53
93
54
94
Rust-fmt :
95
+ << : *shared-strategy
55
96
runs-on : ${{ matrix.os }}
56
- strategy :
57
- matrix :
58
- os :
59
- - macos-latest
60
- - ubuntu-latest
61
- include :
62
- - os : macos-latest
63
- target : x86_64-apple-darwin
64
- - os : ubuntu-latest
65
- target : x86_64-unknown-linux-musl
66
-
67
97
steps :
68
98
- uses : actions/checkout@v4
69
99
- uses : actions-rs/toolchain@v1
@@ -73,21 +103,20 @@ jobs:
73
103
override : true
74
104
components : rustfmt
75
105
- name : Run fmt in different workspaces and crates
76
- run : ./scripts/run_fmt.sh
106
+ run : |
107
+ for manifest in \
108
+ benches/Cargo.toml \
109
+ common/Cargo.toml \
110
+ protocols/Cargo.toml \
111
+ roles/Cargo.toml \
112
+ utils/Cargo.toml \
113
+ utils/message-generator/Cargo.toml; do
114
+ cargo fmt --all --manifest-path=$manifest -- --check
115
+ done
77
116
78
117
clippy-check-lint :
118
+ << : *shared-strategy
79
119
runs-on : ${{ matrix.os }}
80
- strategy :
81
- matrix :
82
- os :
83
- - macos-latest
84
- - ubuntu-latest
85
- include :
86
- - os : macos-latest
87
- target : x86_64-apple-darwin
88
- - os : ubuntu-latest
89
- target : x86_64-unknown-linux-musl
90
-
91
120
steps :
92
121
- uses : actions/checkout@v4
93
122
- uses : actions-rs/toolchain@v1
@@ -97,4 +126,13 @@ jobs:
97
126
override : true
98
127
components : clippy
99
128
- name : Run Clippy on different workspaces and crates
100
- run : ./scripts/run_clippy.sh
129
+ run : |
130
+ for manifest in \
131
+ benches/Cargo.toml \
132
+ common/Cargo.toml \
133
+ protocols/Cargo.toml \
134
+ roles/Cargo.toml \
135
+ utils/Cargo.toml \
136
+ utils/message-generator/Cargo.toml; do
137
+ cargo clippy --manifest-path=$manifest -- -D warnings -A dead-code
138
+ done
0 commit comments