diff --git a/.github/assets/check_rv32imac.sh b/.github/assets/check_rv32imac.sh index 9d9c421ca20..9298c17e481 100755 --- a/.github/assets/check_rv32imac.sh +++ b/.github/assets/check_rv32imac.sh @@ -3,39 +3,39 @@ set +e # Disable immediate exit on error # Array of crates to check crates_to_check=( - reth-codecs-derive - reth-primitives - reth-primitives-traits - reth-network-peers - reth-trie-common - reth-trie-sparse - reth-chainspec - reth-consensus - reth-consensus-common - reth-prune-types - reth-static-file-types - reth-storage-errors - reth-execution-errors - reth-errors - reth-execution-types - reth-db-models - reth-evm - reth-revm - reth-storage-api + #reth-codecs-derive + #reth-primitives + #reth-primitives-traits + #reth-network-peers + #reth-trie-common + #reth-trie-sparse + #reth-chainspec + #reth-consensus + #reth-consensus-common + #reth-prune-types + #reth-static-file-types + #reth-storage-errors + #reth-execution-errors + #reth-errors + #reth-execution-types + #reth-db-models + #reth-evm + #reth-revm + #reth-storage-api ## ethereum - reth-evm-ethereum - reth-ethereum-forks - reth-ethereum-primitives - reth-ethereum-consensus - reth-stateless + #reth-evm-ethereum + #reth-ethereum-forks + #reth-ethereum-primitives + #reth-ethereum-consensus + #reth-stateless ## optimism - reth-optimism-chainspec - reth-optimism-forks - reth-optimism-consensus - reth-optimism-primitives - reth-optimism-evm + #reth-optimism-chainspec + #reth-optimism-forks + #reth-optimism-consensus + #reth-optimism-primitives + #reth-optimism-evm ) # Array to hold the results diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 94a79ffb293..4c1abbd9ab9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -78,6 +78,24 @@ jobs: sudo apt update && sudo apt install gcc-multilib .github/assets/check_wasm.sh + riscv: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v6 + - uses: rui314/setup-mold@v1 + - uses: dtolnay/rust-toolchain@stable + with: + target: riscv32imac-unknown-none-elf + - uses: taiki-e/install-action@cargo-hack + - uses: mozilla-actions/sccache-action@v0.0.9 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - uses: dcarbone/install-jq-action@v3 + - name: Run RISC-V checks + run: .github/assets/check_rv32imac.sh + crate-checks: name: crate-checks (${{ matrix.partition }}/${{ matrix.total_partitions }}) runs-on: ubuntu-latest @@ -225,6 +243,35 @@ jobs: - name: Ensure no arbitrary or proptest dependency on default build run: cargo tree --package reth -e=features,no-dev | grep -Eq "arbitrary|proptest" && exit 1 || exit 0 + # Checks that selected crates can compile with power set of features + features: + name: features + runs-on: ubuntu-latest + strategy: + matrix: + partition: [1, 2] + total_partitions: [2] + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - uses: rui314/setup-mold@v1 + - uses: dtolnay/rust-toolchain@clippy + - uses: mozilla-actions/sccache-action@v0.0.9 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: | + cargo hack check \ + --all-targets \ + --package reth-optimism-trie \ + --package reth-optimism-exex \ + --feature-powerset \ + --depth 2 + env: + RUSTFLAGS: -D warnings + # Check crates correctly propagate features feature-propagation: runs-on: ubuntu-latest @@ -260,6 +307,7 @@ jobs: - typos - grafana - no-test-deps + - features - feature-propagation - deny timeout-minutes: 30 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index ef6705b0082..29dee55b0bf 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -51,7 +51,7 @@ jobs: cargo nextest run \ --features "${{ matrix.features }} $EDGE_FEATURES" --locked \ ${{ matrix.exclude_args }} --workspace \ - --no-tests=warn \ + --exclude ef-tests --no-tests=warn \ -E "!kind(test) and not binary(e2e_testsuite)" doc: diff --git a/crates/optimism/exex/src/lib.rs b/crates/optimism/exex/src/lib.rs index 4e0e42cc9fd..1e01d1ed86b 100644 --- a/crates/optimism/exex/src/lib.rs +++ b/crates/optimism/exex/src/lib.rs @@ -174,7 +174,6 @@ where /// Ensure proofs storage is initialized async fn ensure_initialized(&self) -> eyre::Result<()> { // Check if proofs storage is initialized - #[cfg_attr(not(feature = "metrics"), expect(unused_variables))] let earliest_block_number = match self.storage.get_earliest_block_number().await? { Some((n, _)) => n, None => { diff --git a/crates/optimism/trie/Cargo.toml b/crates/optimism/trie/Cargo.toml index bb5b0b71132..e5e9ee14f60 100644 --- a/crates/optimism/trie/Cargo.toml +++ b/crates/optimism/trie/Cargo.toml @@ -42,7 +42,7 @@ bincode.workspace = true # misc thiserror.workspace = true auto_impl.workspace = true -eyre.workspace = true +eyre = { workspace = true, optional = true } strum.workspace = true tracing.workspace = true derive_more.workspace = true @@ -68,6 +68,7 @@ reth-testing-utils.workspace = true reth-storage-errors.workspace = true secp256k1.workspace = true mockall.workspace = true +eyre.workspace = true # misc serial_test.workspace = true @@ -85,4 +86,5 @@ metrics = [ "reth-trie/metrics", "dep:reth-metrics", "dep:metrics", + "dep:eyre", ]