Create CI workflow for Linux package building - #96
Conversation
Added a CI workflow for packaging and acceptance testing.
📝 WalkthroughWalkthroughAdded packaging documentation to ChangesPackaging Documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-packaging.yml:
- Around line 1-17: Replace the raw documentation in ci-packaging.yml with YAML
comments or a block scalar, then restore valid GitHub Actions structure
including name, on, and jobs mappings for building, packaging, artifact upload,
and acceptance testing. Ensure the workflow references the existing packaging
scripts and validate the completed workflow with actionlint.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: baec7639-86fb-4fc1-8d05-c3992ecc1b45
📒 Files selected for processing (1)
.github/workflows/ci-packaging.yml
| Packaging notes | ||
|
|
||
| This branch adds a CI workflow and helper scripts to produce Linux packages (.deb and .rpm) and run basic acceptance tests. | ||
|
|
||
| What was added | ||
| - .github/workflows/ci-packaging.yml: GitHub Actions workflow that builds the project, runs tests, produces .deb/.rpm packages, uploads them as artifacts, and performs simple acceptance tests. | ||
| - packaging/build_rpm.sh: Small helper script that uses fpm to create an RPM from the release binary. | ||
| - packaging/acceptance_test.sh: A tiny smoke-test script (expects trushell in PATH). | ||
|
|
||
| What you should check / customize | ||
| - Cargo.toml package metadata: cargo-deb derives package metadata from Cargo.toml under [package.metadata.deb]. Add fields like maintainer, description, assets, etc., to produce richer DEB/RPM metadata. | ||
| - Binary name: scripts assume the built binary is target/release/trushell. If your binary name differs, update the workflow and build_rpm.sh call accordingly. | ||
| - fpm dependencies: building RPM uses fpm; CI installs it via gem. If you prefer cargo-rpm or another tool, adjust packaging/build_rpm.sh and the workflow. | ||
|
|
||
| How to use locally | ||
| - Install cargo-deb: cargo install cargo-deb | ||
| - Build .deb: cargo |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Restore a valid GitHub Actions workflow before merging.
These lines are raw documentation, not valid workflow YAML. The parser fails at Line 6, so GitHub Actions cannot load .github/workflows/ci-packaging.yml. The supplied file also has no name, on, or jobs mapping, so it cannot build packages or run acceptance tests.
Move the notes into YAML comments or a block scalar, then restore the workflow definition and validate it with actionlint.
🧰 Tools
🪛 actionlint (1.7.12)
[error] 6-6: could not parse as YAML: mapping values are not allowed in this context
(syntax-check)
🪛 YAMLlint (1.37.1)
[error] 6-6: syntax error: mapping values are not allowed here
(syntax)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-packaging.yml around lines 1 - 17, Replace the raw
documentation in ci-packaging.yml with YAML comments or a block scalar, then
restore valid GitHub Actions structure including name, on, and jobs mappings for
building, packaging, artifact upload, and acceptance testing. Ensure the
workflow references the existing packaging scripts and validate the completed
workflow with actionlint.
Source: Linters/SAST tools
Added a CI workflow for packaging and acceptance testing.
Summary
Short description of the change and why it is needed.
Related issue
Closes: # (issue number) or link to discussion
Checklist
Description of changes
Provide details, references, and migration notes if needed.
Risk & Rollback
Describe the risk and how to roll back.
Summary by CodeRabbit
.deband.rpmbuilds.