Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: combine ci #1312

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/clippy-lint.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/fmt.yaml

This file was deleted.

138 changes: 138 additions & 0 deletions .github/workflows/general-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
Msrv-Check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- 1.75.0 # MSRV

steps:
- uses: actions/checkout@v2
- uses: Swatinem/[email protected]
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build Projects
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

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- 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: |
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 }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run fmt in different workspaces and crates
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 }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
override: true
components: clippy
- name: Run Clippy on different workspaces and crates
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
28 changes: 0 additions & 28 deletions .github/workflows/lockfiles.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/rust-msrv.yaml

This file was deleted.

Loading
Loading