mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: no_std CI integration (#8871)
This commit is contained in:
25
.github/scripts/check_no_std.sh
vendored
Executable file
25
.github/scripts/check_no_std.sh
vendored
Executable 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
|
||||
25
.github/workflows/lint.yml
vendored
25
.github/workflows/lint.yml
vendored
@ -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
|
||||
|
||||
Reference in New Issue
Block a user