Skip to content

Commit 84190f2

Browse files
average-garydevworlds
authored and
devworlds
committed
fix: clarify logging
chore: update names to a pattern, and also organize bash scripts to github inside a workflows directory chore: adjust wrong clippy.sh file. chore: update general-check.yaml to rust-check.yaml, and job names to lower case, and create bash script to ci job. chore: remove comments, and add perm to test.sh chore: remove test.yaml, rust-msrv.yaml, semver-check.yaml, lockfiles.yaml, fmt.yaml, clippy-lint.yaml, and add general-check.yaml to combine all in one file. chore: fix MSRV incorrect job syntax chore: update general-check to be more clean
1 parent c8cf98c commit 84190f2

File tree

5 files changed

+64
-76
lines changed

5 files changed

+64
-76
lines changed

.github/workflows/general-check.yaml

+64-26
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,23 @@ jobs:
2323
toolchain: ${{ matrix.rust }}
2424
override: true
2525
- 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
2743

2844
Semver-check:
2945
runs-on: ubuntu-latest
@@ -49,21 +65,35 @@ jobs:
4965
- run: sudo apt-get update && sudo apt-get install -y cmake
5066
- run: cargo install cargo-semver-checks --version 0.37.0 --locked
5167
- 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
5393
5494
Rust-fmt:
95+
<<: *shared-strategy
5596
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-
6797
steps:
6898
- uses: actions/checkout@v4
6999
- uses: actions-rs/toolchain@v1
@@ -73,21 +103,20 @@ jobs:
73103
override: true
74104
components: rustfmt
75105
- 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
77116
78117
clippy-check-lint:
118+
<<: *shared-strategy
79119
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-
91120
steps:
92121
- uses: actions/checkout@v4
93122
- uses: actions-rs/toolchain@v1
@@ -97,4 +126,13 @@ jobs:
97126
override: true
98127
components: clippy
99128
- 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

scripts/build_projects.sh

-5
This file was deleted.

scripts/run_clippy.sh

-10
This file was deleted.

scripts/run_fmt.sh

-10
This file was deleted.

scripts/run_semver_checks.sh

-25
This file was deleted.

0 commit comments

Comments
 (0)