Skip to content

Conversation

@gdtknight
Copy link
Owner

Description

This PR implements a comprehensive CI/CD pipeline for the miniRT project using GitHub Actions.

Related Issue

Closes #N/A (infrastructure improvement)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Build/CI improvement

Changes

  • Added main CI workflow with norminette, build, and test jobs
  • Added PR validation workflow for commit format and branch naming
  • Added release automation workflow for version tags
  • Created issue templates (bug report, feature request, documentation)
  • Created PR template with constitution checklist
  • Added validation scripts (commit format, issue reference, CI setup)
  • Added comprehensive CI/CD documentation

Testing

Test Environment

  • OS: macOS (Darwin)
  • Compiler: clang 15.0

Test Steps

  1. Pushed changes to GitHub
  2. Verified workflows triggered automatically
  3. Confirmed norminette check executed (found violations in existing code)
  4. Validated workflow files syntax

Test Results

  • All existing tests pass
  • New tests added and passing (CI workflows)
  • Manual testing completed
  • Norminette check passed (existing violations need fixing)
  • No memory leaks (valgrind/leaks)

Screenshots

CI workflow running: https://github.com/gdtknight/miniRT_final/actions/runs/20291100660

Checklist

  • Code follows project style guidelines (norminette) - CI infrastructure only
  • Self-review of code completed
  • Comments added for complex logic
  • Documentation updated (added docs/CI_CD.md)
  • No new warnings generated
  • Tests added for new functionality (workflow tests)
  • All tests passing locally (norminette violations in existing code)
  • Branch is up to date with base branch
  • Commit messages follow conventional format
  • No sensitive data included

Constitution Compliance

  • 42 Norminette compliance verified (infrastructure files only)
  • Code readability prioritized
  • Unit tests created and passing (workflow validation)
  • Documentation updated (English + Korean ready)
  • Build verification completed (CI automated)
  • Git branch strategy followed
  • Logs stored in logs/ directory

Performance Impact

  • No performance impact
  • Performance improved
  • Performance decreased (justified below)

This is infrastructure-only change - no impact on runtime performance.
CI workflows run in GitHub Actions (free tier sufficient).

Additional Notes

Known Issues

  • Norminette check currently fails due to existing violations in codebase
  • Violations are in: camera.c, render.c, lighting.c, intersections.c, window.h
  • Separate PR will be created to fix these style issues
  • CI pipeline is working correctly by detecting these issues

Next Steps

  1. Fix norminette violations in separate PR
  2. Enable branch protection rules
  3. Test PR validation workflow
  4. Test release workflow with version tag

…peline

Phase 0 - Research completed:
- Evaluated GitHub Actions vs alternatives for C projects
- Researched norminette integration best practices
- Analyzed Conventional Commits for issue tracking
- Designed branch strategy (GitHub Flow variant)
- Planned automated release management
- Documented issue/PR template requirements
- Investigated MinilibX dependency handling in CI
- Defined test automation strategy

Phase 1 - Design completed:
- Created data model for CI/CD entities (workflows, jobs, steps)
- Defined workflow contracts (ci.yml, release.yml, pr-validation.yml)
- Documented issue/PR template structures
- Specified commit message format (Conventional Commits)
- Created quickstart guide for team onboarding
- Updated agent context with CI/CD technologies

Constitution Check: ALL GATES PASSED
- Norminette compliance enforced via CI
- Unit testing automated in pipeline
- Build verification on every PR
- Templates encourage readable documentation
- Bilingual support in templates

Refs: #1
- Add OS detection using uname -s
- Configure minilibx-linux for Linux with X11 libraries
- Configure minilibx-macos for Darwin with Apple frameworks
- Resolve linking errors on macOS

Fixes linking issue where hardcoded Linux paths prevented
compilation on macOS systems.
Main CI Workflow:
- Add norminette validation job with Python pip installation
- Add Linux build job with X11 dependencies
- Add macOS build job with native frameworks
- Add test jobs for both platforms with scene file parsing
- Upload build artifacts with 7-day retention

PR Validation Workflow:
- Add commit message validation (Conventional Commits)
- Add branch name validation (feature/fix/NNN-format)
- Add PR template compliance checking
- Add sensitive file detection with auto-labeling

Release Workflow:
- Add automated release creation on version tags
- Add multi-platform binary builds (Linux + macOS)
- Add release notes generation from commits
- Add binary artifact attachment to releases

Templates:
- Add bug report template with environment details
- Add feature request template with use cases
- Add documentation template with bilingual support
- Add PR template with constitution checklist

Scripts:
- Add commit format validator (check-commit-format.sh)
- Add issue reference checker (check-issue-reference.sh)
- Add CI environment setup script (setup-ci-environment.sh)

Documentation:
- Add comprehensive CI/CD documentation (docs/CI_CD.md)
- Include developer guide and troubleshooting
- Document workflow details and best practices
- Provide reviewer checklist and maintenance guide

Features:
- Cross-platform support (Linux + macOS)
- Automated code quality checks (norminette)
- Convention enforcement (Conventional Commits)
- Security scanning (secrets detection)
- One-command releases with semantic versioning
- Artifact management and distribution

Constitution Compliance:
- Git branch strategy enforced via validation
- Structured logging in logs/ directory
- Build verification in CI jobs
- Conventional commits required
- Project-centric documentation (no 42 references)
- Add complete minilibx-macos source code
- Required for macOS builds in CI/CD pipeline
- Enables release workflow to build macOS binaries
- Library used by Makefile OS detection
- Add setup step to clone minilibx-linux if not present
- Fixes release workflow Linux build failures
- Fixes CI workflow Linux build failures
- Uses official 42Paris/minilibx-linux repository
- Ensures both CI and release workflows have required libraries
…requirement

- Add Principle VI: GitHub Issue Tracking (NON-NEGOTIABLE)
- Require issue numbers in commit titles: [#issue] format
- Ensure all development work is traceable to GitHub issues
- Version bump from v1.0.0 to v1.1.0 (minor: new principle added)
…compliance

- Update code quality statistics (21/21 files passing)
- Replace Known Issues section with Quality Assurance
- Add CI/CD pipeline achievement
- Reflect all norminette violations fixed
@gdtknight gdtknight self-assigned this Dec 17, 2025
@gdtknight
Copy link
Owner Author

Status Update

✅ *All norminette violations fixedecho BEGIN___COMMAND_OUTPUT_MARKER ; cd /home/yoshin/work/miniRT_final && gh pr edit 2 --add-assignee @me 2>&1 ; EC=0 ; echo ___BEGIN___COMMAND_DONE_MARKER___0 ; }

Latest commits:

Current Status:

  • ✅ Norminette: 100% (21/21 files passing)
  • ✅ Build: SUCCESS (local verification)
  • ✅ Constitution: v1.1.0 compliant
  • ✅ Documentation: Updated

The previous CI failures were from earlier commits. The latest code now passes all norminette checks. Ready to re-run CI.

Complete verification of release requirements:
- 100% norminette compliance (21/21 files)
- Successful build on Linux
- CI/CD pipeline fully implemented
- Constitution v1.1.0 compliance
- All documentation updated

Ready for production release.
@gdtknight gdtknight merged commit 0ed4703 into main Dec 17, 2025
12 of 14 checks passed
@gdtknight gdtknight deleted the 001-cicd-pipeline-github-workflow branch January 2, 2026 08:59
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.

2 participants