Skip to content

Conversation

@misterquestions
Copy link

CI/CD Pipeline for Releases

Overview

This PR introduces a complete CI/CD pipeline for automated testing, building, and releasing FerrumC across multiple platforms, with automatic deployment integration to the website.

Changes

🔄 Refactored CI Workflow (ci.yml)

  • Separated concerns: Split formatting/linting, testing, and building into distinct jobs
  • Enhanced test matrix: Runs tests on Linux, macOS, and Windows to ensure cross-platform compatibility
  • Optimized builds: Added cross-compilation support for ARM64 Linux using cross
  • Artifact retention: Build artifacts are uploaded with 7-day retention for validation

🚀 New Release Workflow (release.yml)

  • Manual trigger with approval: Uses workflow_dispatch with required approval gate via GitHub environments
  • Multi-platform binary builds: Automatically builds for:
    • Linux: x64, ARM64
    • macOS: Intel (x64), Apple Silicon (ARM64)
    • Windows: x64
  • Docker image publishing: Builds and pushes multi-arch Docker images to GitHub Container Registry (ghcr.io)
  • GitHub Release creation: Automatically creates releases with:
    • Raw executable binaries (not zipped)
    • SHA256 checksums for verification
    • Comprehensive installation instructions (Docker + native)
  • Site deployment trigger: Automatically notifies the site repository to rebuild and fetch the new release

🐳 Docker Improvements

  • Multi-platform support (amd64 + arm64)
  • Published to GitHub Container Registry with version tags + latest
  • Layer caching for faster builds

🔗 Integration with Site Repository

  • Site fetches releases via GitHub API at build time
  • Automatic updates when new releases are published
  • Authenticated API calls to avoid rate limits

Benefits

  • Consistent quality: Every PR is tested across all platforms
  • Automated releases: One-click releases with approval gates
  • Better discoverability: Releases automatically appear on the website
  • User convenience: Direct binary downloads + Docker images
  • Security: SHA256 checksums for all binaries
  • Documentation: Auto-generated release notes with clear installation steps

@dylanopen
Copy link
Contributor

AI pull requests... Yay.

@Sunnickel
Copy link
Contributor

Holy AI

@MSKatKing
Copy link
Contributor

The commit looks AI too 😭

@dylanopen
Copy link
Contributor

What issue does this PR solve?

Copy link
Contributor

@Sunnickel Sunnickel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why even?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yk seems good and stuff, but how about you do something yourself without AI?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be rude and have no need to tell you my whole CV, anyways, addressed all of the points above.

@dylanopen
Copy link
Contributor

What issue does this PR solve?

^

@Sweattypalms
Copy link
Member

What issue does this PR solve?

^

I believe it's for the 'Download' section on the website.

@misterquestions is this PR ready to be merged?

Copy link
Collaborator

@ReCore-sys ReCore-sys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some changes, as others have said it's pretty clearly AI generated so can you please double check the output it gives you.

if: matrix.cross
uses: taiki-e/install-action@v2
with:
tool: cross
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using cross? Can't we just use multiple runners and compile natively?

- name: Build release binary
run: |
if [ "${{ matrix.cross }}" = "true" ]; then
cross build --release --target ${{ matrix.target }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using cross? It's already doing all this on native runners?

```
## What's Changed
<!-- Add your changelog here -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there meant to be a changelog here or did you not see chatgpt asking you to put in your changelog. Also this doesn't make much sense, it's automatically generated, no?

id: notes
run: |
cat > release_notes.md << 'EOF'
## Installation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really relevant to releases since the process will be the same for each one, this should just be in the readme

name: Release ${{ inputs.version }}
body_path: ${{ steps.notes.outputs.notes_file }}
draft: false
prerelease: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be configurable, would be annoying to have this entire workflow setup and then still have to do it manually for pre-releases

@ReCore-sys
Copy link
Collaborator

I'm hesitant to merge, with the number of problems that you've already had to fix I'd be worried about issues that no-one has caught yet

@Sweattypalms
Copy link
Member

@misterquestions any news?

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.

6 participants