feat: Implement Makefile-driven CI/CD architecture with automated publishing#3
Merged
feat: Implement Makefile-driven CI/CD architecture with automated publishing#3
Conversation
- Add comprehensive Makefile with ci-quick, ci-full, and ci-local targets - Create GitHub Actions workflows that delegate to Makefile targets - Implement automated publishing pipeline with version validation - Add complete workflow documentation and troubleshooting guide - Include CHANGELOG.md template for release management - Fix clippy warnings in build.rs doctests - Enhance Cargo.toml metadata for crates.io publication - Ensure zero drift between local development and CI environments The Makefile serves as the single source of truth for all build operations, ensuring consistency between local development and CI while providing fast feedback loops and easy debugging capabilities.
- Use stable channel instead of hardcoded version for future-proof builds - Add explicit directory creation with proper permissions - Include installation verification steps (solana --version, cargo --version) - Enhance caching to include Solana directories for better performance - Add cargo-build-sbf availability check for debugging - Align installation method with official Solana documentation This addresses the "Failed to install platform-tools" errors encountered in GitHub Actions by using more robust installation practices.
- Add `agave-install init --no-modify-path` after Solana CLI installation - Pre-download platform tools instead of relying on on-demand downloads - Prevent "Failed to install platform-tools" errors during cargo build-sbf - Add cargo-build-sbf version verification for debugging - Apply fix to both CI and release workflows for consistency This resolves the GitHub Actions failure where cargo build-sbf would try to dynamically download LLVM toolchain and hit filesystem permission issues. Based on solutions from solana-labs/solana#35719.
Replaces complex Solana toolchain installation with official Anchor container (solanafoundation/anchor:v0.31.1) for reproducible builds. Changes: - GitHub workflows now trivially simple (just `make ci-docker-full`) - All Docker complexity moved to Makefile targets - Added Cargo registry caching for faster subsequent builds - Docker-based release validation with `make release-validation` - Updated documentation for new Docker-first approach Benefits: - Same environment locally and in CI (eliminates "works on my machine") - Battle-tested official Solana Foundation container - Zero Solana toolchain installation complexity - Easy debugging: `make ci-docker-full` reproduces CI exactly - Robust caching strategy for speed optimization The architecture ensures reliable, maintainable, and debuggable CI/CD using proven tools from the Solana ecosystem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This PR implements a comprehensive Makefile-driven CI/CD architecture that eliminates drift between local development and CI while providing fast feedback loops and automated publishing capabilities.
🏗️ Architecture
Philosophy: The
Makefileis the single source of truth for all build operations. GitHub workflows are thin orchestration layers that delegate to Makefile targets.Key Components
Makefile- Canonical build logic with multiple CI strategies🎯 Makefile Targets
🚀 What This Enables
make ci-fullv0.1.0→ automatic crates.io release📋 Changes
New Files
Makefile- Build automation and CI targets.github/workflows/ci.yml- Parallel CI jobs.github/workflows/release.yml- Automated publishing.github/WORKFLOW_SETUP.md- Complete documentationCHANGELOG.md- Release notes templateEnhanced Files
crates/litesvm-testing/Cargo.toml- Complete crates.io metadataCargo.toml- Organized workspace dependencies🧪 Testing
All CI strategies tested locally:
make ci-quick- Core library validation (2-3 min)make ci-full- Complete workspace including Solana programs (5-7 min)make ci-local- Full development suite with clippy🎯 Ready for Production
This PR makes the project publish-ready with:
Next step: Merge → Tag
v0.1.0→ Automatic publication! 🎉