Skip to content

ci: add GitHub Actions workflow for Rust CI#18

Merged
dwerner merged 14 commits intomainfrom
ci-github
Oct 29, 2025
Merged

ci: add GitHub Actions workflow for Rust CI#18
dwerner merged 14 commits intomainfrom
ci-github

Conversation

@dwerner
Copy link
Copy Markdown
Collaborator

@dwerner dwerner commented Oct 28, 2025

Adds automated CI pipeline that runs on push to main and on PRs:

  • Check: Verify code compiles (cargo check)
  • Test: Run all tests (cargo test)
  • Format: Check code formatting (cargo +nightly fmt)
  • Clippy: Run linter with warnings as errors (cargo clippy)
  • Build: Build release binaries (cargo build --release)

Includes caching for cargo registry, index, and build artifacts to speed up CI runs.

Adds automated CI pipeline that runs on push to main and on PRs:
- Check: Verify code compiles (cargo check)
- Test: Run all tests (cargo test)
- Format: Check code formatting (cargo +nightly fmt)
- Clippy: Run linter with warnings as errors (cargo clippy)
- Build: Build release binaries (cargo build --release)

Includes caching for cargo registry, index, and build artifacts to
speed up CI runs.
Change core-executor from local path to GitHub repository to enable
CI builds and external contributors to build without local dependencies.

Pinned to rev 376f2c62abbaceafef639fa24ab82199a0ce8cfe for reproducibility.
Change typed-arrow from local path to GitHub repository to enable
CI builds and external contributors to build without local dependencies.

Pinned to rev 30f2507147e8b48d51a26285bf8c84fdd58afa84 for reproducibility.
Add context-snapshot.yaml to ignored files list to prevent
accidentally committing conversation state snapshots.
Configure tonic_build to add #[allow(dead_code)] and
#[allow(clippy::enum_variant_names)] attributes to generated
protobuf files. These warnings are not actionable since the
code is auto-generated.

Regenerated proto files with new attributes applied.
Box tonic::Status in ErigonBridgeError::ErigonClient to reduce
the Err variant size from 176 bytes to 8 bytes. This fixes
clippy::result_large_err warnings.

Updated all call sites to handle boxed Status errors with
manual From implementation and .map_err(|e| *e) where needed.
Remove entire kv_client module as ErigonKvClient was never
instantiated or used anywhere in the codebase. Can be
restored from git history if needed in the future.
Remove unused fields, functions, and imports:
- ErigonFlightBridge.endpoint field
- metrics: inc/dec_workers_active, Logs variant
- client_pool: stats() and PoolStats
- blockdata_converter: schema helpers, transactions_to_arrow
- Unused imports throughout

All removed code can be restored from history if needed.
Remove unused fields and imports across multiple crates:
- jsonrpc-bridge: node_url field
- phaser-query: gap_analysis field, unused imports
- evm-index, parquet-index: unused imports
- phaser-bridge, phaser-integration-test: unused imports
- schemas/evm/common: unused imports

Fixes remaining clippy::dead_code warnings.
Create config structs to fix clippy::too_many_arguments warnings:

- SyncWorkerConfig: Reduces SyncWorker::new from 12 to 4 params
- SyncJobConfig: Reduces run_sync_job from 11 to 6 params
- ProgressUpdate: Reduces update_progress from 9 to 2 params

Improves maintainability and makes function signatures clearer.
All clippy warnings now resolved (0 warnings).
- Add protobuf-compiler installation to check, test, clippy, and build jobs
- Fixes build failure: 'Could not find protoc' error in erigon-bridge
- Replace manual cargo registry/index/build caching with Swatinem/rust-cache@v2
- Rust-cache is purpose-built for Rust projects with smarter invalidation
- Fix clippy::manual_is_multiple_of warning in test fixtures
- Replace `i % 10 == 0` with `i.is_multiple_of(10)`
@dwerner dwerner merged commit 4f2f93a into main Oct 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant