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

feat: no_std CI integration #8871

Merged
merged 5 commits into from
Jun 17, 2024
Merged
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
25 changes: 25 additions & 0 deletions .github/scripts/check_no_std.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -eo pipefail

# List of no_std packages
no_std_packages=(
reth-db
reth-network-peers
)

# Loop through each package and check it for no_std compliance
for package in "${no_std_packages[@]}"; do
cmd="cargo +stable check -p $package --no-default-features"

if [ -n "$CI" ]; then
echo "::group::$cmd"
else
printf "\n%s:\n %s\n" "$package" "$cmd"
fi

$cmd

if [ -n "$CI" ]; then
echo "::endgroup::"
fi
done
25 changes: 24 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ jobs:
env:
RUSTFLAGS: -D warnings

no-std:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: riscv32imac-unknown-none-elf
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run no_std checks
run: .github/scripts/check_no_std.sh

crate-checks:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -149,7 +164,15 @@ jobs:
name: lint success
runs-on: ubuntu-latest
if: always()
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, book, codespell, grafana]
needs:
- clippy-binaries
- clippy
- crate-checks
- docs
- fmt
- book
- codespell
- grafana
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
Loading