Add GitHub Actions CI workflow with cargo-nextest#23
Conversation
Changed Files
|
Summary of ChangesHello @tcrypt25519, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the project's development infrastructure by implementing a new, efficient GitHub Actions CI workflow. It streamlines local development practices through an expanded Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a solid step towards improving the project's development and CI infrastructure by integrating cargo-nextest and setting up a GitHub Actions workflow. The new Makefile targets and DEVELOPMENT.md guide are valuable additions.
I've added a few comments to DEVELOPMENT.md to point out some inconsistencies between the documentation, the PR description, and the Makefile.
Most importantly, there's a configuration conflict that will prevent the project from building. The Cargo.toml files use edition = "2024", which requires a nightly compiler, while the new rust-toolchain.toml specifies the stable channel. To resolve this, you'll likely need to change the edition to "2021" in the Cargo.toml files to match the documented goal of building on stable Rust. I was unable to comment on the specific files due to technical constraints.
Addressing these points will make this a very strong contribution to the project.
There was a problem hiding this comment.
Pull request overview
This PR introduces GitHub Actions CI infrastructure with cargo-nextest integration, adding automated testing and quality checks to the Jet project. While adding CI is a valuable improvement, the implementation has several inconsistencies between documentation, configuration, and actual behavior that need to be addressed.
Changes:
- Adds GitHub Actions CI workflow with formatting, linting, building, and testing steps
- Integrates cargo-nextest as the primary test runner with configuration profiles
- Adds rust-toolchain.toml to specify stable as the default Rust toolchain
- Enhances Makefile with comprehensive targets for formatting, linting, and testing
- Adds DEVELOPMENT.md with detailed developer workflow documentation
- Removes obsolete build restoration planning documents
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
New CI workflow with sequential steps for LLVM setup, formatting, linting, building, and testing |
.nextest.toml |
Configuration for cargo-nextest with default and CI profiles (though CI profile is unused) |
rust-toolchain.toml |
Specifies stable Rust as default with rustfmt/clippy components |
Makefile |
Added targets for fmt, fmt-check, clippy-fix, test variants, install-tools, and ci/commit-check |
DEVELOPMENT.md |
Comprehensive new developer guide with tooling and workflow documentation |
docs/architecture.md |
Minor cosmetic change (added space) |
docs/plans/2026-01-27-restore-build-system.md |
Deleted 997-line build restoration plan |
docs/layout-mismatch-analysis.md |
Deleted 386-line layout analysis document |
docs/build-restoration/00-issue-tracker.md |
Deleted build issue tracker template |
docs/build-restoration/01-initial-build-output.txt |
Deleted initial build error capture |
d74fb6e to
e03a3b5
Compare
|
@tcrypt25519 I've opened a new pull request, #25, to work on those changes. Once the pull request is ready, I'll request review from you. |
Add comprehensive CI setup with single sequential job to minimize runner costs. - GitHub Actions workflow with efficient sequential execution - Use nightly Rust for formatting and linting (fail fast) - Use stable Rust for building and testing - Install cargo-nextest for faster test execution - Setup LLVM 21 and dependency caching - Enhanced Makefile with nextest and CI targets - Add test, test-all, doctest targets using nextest - Add fmt, fmt-check, clippy, clippy-fix targets - Add ci and commit-check targets for pre-commit validation - Add install-tools target for cargo-nextest setup - Add .nextest.toml for test runner configuration - Add rust-toolchain.toml specifying stable as default - Add DEVELOPMENT.md with comprehensive developer guide Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix formatting issues identified by CI: - Reorder imports alphabetically - Format long function calls and method chains - Apply consistent line wrapping Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Address PR review feedback to fix documentation accuracy and improve CI workflow reliability. Makefile changes: - Add +nightly back to fmt/clippy targets for explicit toolchain control - Update target descriptions to reflect nightly usage CI workflow improvements: - Use scripts/install-llvm.sh instead of duplicating installation logic - Remove libpolly-21-dev (not used by the project) - Replace manual caching with Swatinem/rust-cache for better optimization - Add explicit +stable to build/test commands for clarity Documentation fixes (DEVELOPMENT.md): - Fix install-tools description to match actual behavior (only installs nextest) - Update CI section to accurately describe single sequential job - Clarify that Makefile uses cargo +nightly for fmt/clippy - Update configuration file descriptions Configuration improvements: - Remove rustfmt/clippy from rust-toolchain.toml (using nightly versions) - Simplify .nextest.toml by removing unused CI profile - Update comments to reflect actual usage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix formatting issues detected by CI after rebasing onto master. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix clippy error: empty line after doc comment. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix clippy deprecation warnings by using Context::ptr_type instead of StructType::ptr_type as required by LLVM 15+. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Format runtime_builder.rs after ptr_type changes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Wrap unsafe function call in unsafe block (edition 2024 requirement) - Add #[allow(dead_code)] to stack methods called from generated IR Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove empty line after doc comment - Convert BasicTypeEnum to AnyTypeEnum with .into() Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Cast functions to *const () before usize per clippy - Add explicit '_ lifetimes to avoid elision confusion Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove unused 'error' import from engine/mod.rs - Fix BasicTypeEnum to AnyTypeEnum conversion in layout_tests.rs by matching on enum variants - Remove unnecessary let binding in ops.rs (clippy::let-and-return) - Add explicit '_ lifetime to iter() return type (mismatched-lifetime-syntaxes) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add missing ScalableVectorType case in BasicTypeEnum match to handle all possible variants and fix non-exhaustive pattern error. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change coinbase from 20-byte to 2-byte array to match ADDRESS_SIZE_BYTES constant defined in jet_runtime. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove nightly toolchain usage and use stable Rust for all operations: - Formatting (rustfmt) - Linting (clippy) - Building - Testing This avoids toolchain-specific issues and simplifies the CI workflow. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add libpolly-21-dev package to LLVM installation to provide the Polly static library required for linking. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update test_runtime_builder_creates_module to check for the actual function names generated by the builder: - "jet.stack.push.ptr" instead of "jet.stack.push.word" - Add checks for all generated stack and memory functions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add the jet.jit_engine global variable to the runtime module so that the Symbols loader can find all required runtime functions and globals. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Expand memory_len to accommodate writes when copying return data from contract calls. This fixes out-of-bounds panics when writing to memory that hasn't been expanded yet. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
791bf4c to
5ba279d
Compare
* ci: add GitHub Actions workflow with cargo-nextest Add comprehensive CI setup with single sequential job to minimize runner costs. - GitHub Actions workflow with efficient sequential execution - Use nightly Rust for formatting and linting (fail fast) - Use stable Rust for building and testing - Install cargo-nextest for faster test execution - Setup LLVM 21 and dependency caching - Enhanced Makefile with nextest and CI targets - Add test, test-all, doctest targets using nextest - Add fmt, fmt-check, clippy, clippy-fix targets - Add ci and commit-check targets for pre-commit validation - Add install-tools target for cargo-nextest setup - Add .nextest.toml for test runner configuration - Add rust-toolchain.toml specifying stable as default - Add DEVELOPMENT.md with comprehensive developer guide Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: apply rustfmt formatting Fix formatting issues identified by CI: - Reorder imports alphabetically - Format long function calls and method chains - Apply consistent line wrapping Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: fix documentation inconsistencies and improve CI configuration Address PR review feedback to fix documentation accuracy and improve CI workflow reliability. Makefile changes: - Add +nightly back to fmt/clippy targets for explicit toolchain control - Update target descriptions to reflect nightly usage CI workflow improvements: - Use scripts/install-llvm.sh instead of duplicating installation logic - Remove libpolly-21-dev (not used by the project) - Replace manual caching with Swatinem/rust-cache for better optimization - Add explicit +stable to build/test commands for clarity Documentation fixes (DEVELOPMENT.md): - Fix install-tools description to match actual behavior (only installs nextest) - Update CI section to accurately describe single sequential job - Clarify that Makefile uses cargo +nightly for fmt/clippy - Update configuration file descriptions Configuration improvements: - Remove rustfmt/clippy from rust-toolchain.toml (using nightly versions) - Simplify .nextest.toml by removing unused CI profile - Update comments to reflect actual usage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: apply rustfmt formatting after rebase Fix formatting issues detected by CI after rebasing onto master. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: remove empty line after doc comment in constants.rs Fix clippy error: empty line after doc comment. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: replace deprecated ptr_type with Context::ptr_type Fix clippy deprecation warnings by using Context::ptr_type instead of StructType::ptr_type as required by LLVM 15+. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: apply rustfmt formatting to runtime_builder Format runtime_builder.rs after ptr_type changes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add unsafe block and allow dead_code for IR-called methods - Wrap unsafe function call in unsafe block (edition 2024 requirement) - Add #[allow(dead_code)] to stack methods called from generated IR Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: apply rustfmt formatting Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: clippy errors in layout_tests - Remove empty line after doc comment - Convert BasicTypeEnum to AnyTypeEnum with .into() Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: clippy errors - function casts and lifetime elision - Cast functions to *const () before usize per clippy - Add explicit '_ lifetimes to avoid elision confusion Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: apply rustfmt Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: resolve unused import, type conversion, and clippy lints - Remove unused 'error' import from engine/mod.rs - Fix BasicTypeEnum to AnyTypeEnum conversion in layout_tests.rs by matching on enum variants - Remove unnecessary let binding in ops.rs (clippy::let-and-return) - Add explicit '_ lifetime to iter() return type (mismatched-lifetime-syntaxes) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add ScalableVectorType variant to match expression Add missing ScalableVectorType case in BasicTypeEnum match to handle all possible variants and fix non-exhaustive pattern error. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: correct coinbase address size in jetdbg Change coinbase from 20-byte to 2-byte array to match ADDRESS_SIZE_BYTES constant defined in jet_runtime. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * chore: simplify CI to use stable Rust only Remove nightly toolchain usage and use stable Rust for all operations: - Formatting (rustfmt) - Linting (clippy) - Building - Testing This avoids toolchain-specific issues and simplifies the CI workflow. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: install Polly library for LLVM static linking Add libpolly-21-dev package to LLVM installation to provide the Polly static library required for linking. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: correct function names in runtime_builder test Update test_runtime_builder_creates_module to check for the actual function names generated by the builder: - "jet.stack.push.ptr" instead of "jet.stack.push.word" - Add checks for all generated stack and memory functions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add JIT_ENGINE global to runtime module Add the jet.jit_engine global variable to the runtime module so that the Symbols loader can find all required runtime functions and globals. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: ensure memory is expanded before writing return data Expand memory_len to accommodate writes when copying return data from contract calls. This fixes out-of-bounds panics when writing to memory that hasn't been expanded yet. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary
Changes
CI Workflow (
.github/workflows/ci.yml)Makefile Enhancements
make test- Run tests with cargo-nextestmake test-all- Run all tests including doctestsmake fmt/make fmt-check- Format codemake clippy/make clippy-fix- Lint codemake ci- Run all CI checks locallymake commit-check- Pre-commit validationmake install-tools- Install cargo-nextestConfiguration Files
.nextest.toml- nextest configuration with default and CI profilesrust-toolchain.toml- Specifies stable as default toolchainDEVELOPMENT.md- Comprehensive developer guideTest Plan
🤖 Generated with Claude Code