Skip to content

Commit

Permalink
fix: clarify logging
Browse files Browse the repository at this point in the history
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
  • Loading branch information
average-gary authored and devworlds committed Jan 7, 2025
1 parent faa936e commit 76c9aa1
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 76 deletions.
90 changes: 64 additions & 26 deletions .github/workflows/general-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,23 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Build Projects
run: ./scripts/build_projects.sh
run: |
cargo build --manifest-path=benches/Cargo.toml
cargo build --manifest-path=protocols/Cargo.toml
cargo build --manifest-path=roles/Cargo.toml
cargo build --manifest-path=utils/Cargo.toml
shared-strategy: &shared-strategy
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl

Semver-check:
runs-on: ubuntu-latest
Expand All @@ -49,21 +65,35 @@ jobs:
- run: sudo apt-get update && sudo apt-get install -y cmake
- run: cargo install cargo-semver-checks --version 0.37.0 --locked
- name: Run Semver Checks
run: ./scripts/run_semver_checks.sh
run: |
for dir in \
common \
utils/buffer \
protocols/v2/binary-sv2/no-serde-sv2/codec \
protocols/v2/binary-sv2/serde-sv2 \
protocols/v2/binary-sv2/binary-sv2 \
protocols/v2/const-sv2 \
protocols/v2/framing-sv2 \
protocols/v2/noise-sv2 \
protocols/v2/codec-sv2 \
protocols/v2/subprotocols/common-messages \
protocols/v2/subprotocols/job-declaration \
protocols/v2/subprotocols/mining \
protocols/v2/subprotocols/template-distribution \
protocols/v2/sv2-ffi \
protocols/v2/roles-logic-sv2 \
protocols/v1 \
utils/bip32-key-derivation \
utils/error-handling \
utils/key-utils \
roles/roles-utils/network-helpers \
roles/roles-utils/rpc; do
cargo semver-checks --manifest-path="$dir/Cargo.toml"
done
Rust-fmt:
<<: *shared-strategy
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -73,21 +103,20 @@ jobs:
override: true
components: rustfmt
- name: Run fmt in different workspaces and crates
run: ./scripts/run_fmt.sh
run: |
for manifest in \
benches/Cargo.toml \
common/Cargo.toml \
protocols/Cargo.toml \
roles/Cargo.toml \
utils/Cargo.toml \
utils/message-generator/Cargo.toml; do
cargo fmt --all --manifest-path=$manifest -- --check
done
clippy-check-lint:
<<: *shared-strategy
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -97,4 +126,13 @@ jobs:
override: true
components: clippy
- name: Run Clippy on different workspaces and crates
run: ./scripts/run_clippy.sh
run: |
for manifest in \
benches/Cargo.toml \
common/Cargo.toml \
protocols/Cargo.toml \
roles/Cargo.toml \
utils/Cargo.toml \
utils/message-generator/Cargo.toml; do
cargo clippy --manifest-path=$manifest -- -D warnings -A dead-code
done
5 changes: 0 additions & 5 deletions scripts/build_projects.sh

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/run_clippy.sh

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/run_fmt.sh

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/run_semver_checks.sh

This file was deleted.

0 comments on commit 76c9aa1

Please sign in to comment.