feat: no_std CI integration (#8871)

This commit is contained in:
0xAtreides
2024-06-17 22:49:21 +01:00
committed by GitHub
parent 7d55a14b1f
commit 5f998f704c
2 changed files with 49 additions and 1 deletions

25
.github/scripts/check_no_std.sh vendored Executable file
View File

@ -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

View File

@ -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
@ -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