Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build-release-binaries workflow #3484

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

ci: build-release-binaries workflow #3484

wants to merge 5 commits into from

Conversation

bussyjd
Copy link

@bussyjd bussyjd commented Jan 27, 2025

This workflow handles the automated build and release process for Charon binaries. Key features include:

  1. Cross-Platform Build Support:

    • Builds for both AMD64 (x86_64) and ARM64 (aarch64) architectures
    • Uses Docker-based build environment for consistent compilation
    • Enables CGO with appropriate cross-compilation toolchains
    • Includes netgo and osusergo tags for better portability
  2. Version Management:

    • Extracts version information from code or git tags
    • Injects version information during compilation via ldflags
    • Maintains consistent version naming across artifacts
  3. Release Artifacts:

    • Generates compressed archives (.tar.gz) for each architecture
    • Creates a detailed checksums.txt with architecture-specific labels
    • Preserves both compressed and uncompressed binaries as build artifacts
  4. Release Process:

    • Integrates with the main release workflow
    • Attaches binaries to draft releases for review
    • Uses Ubuntu 24.04 for stable and modern build environment

The workflow ensures reliable, reproducible builds while maintaining a clear and organized release process.

category: fixbuild
ticket: none

bussyjd and others added 4 commits January 21, 2025 18:36
- Pin ubuntu runner to 24.04 for stability
- Add architecture labels to checksum file for clarity
- Coordinate binary builds with main release workflow
- Attach binaries to existing draft release
mkdir -p dist
docker run --rm --platform linux/amd64 \
-v $(pwd):/workspace -w /workspace \
golang:1.23.4-bookworm \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hope we can make this golang:1.23.4-bookworm matching our globally set golang version..
We typically bump it in one place.

mkdir -p dist

# Build for linux/amd64
echo "Building for linux/amd64..."
Copy link
Collaborator

@pinebit pinebit Jan 27, 2025

Choose a reason for hiding this comment

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

Do we know for sure we don't need a build for Mac ARM? (I see this becomes very common in OSS)

@pinebit
Copy link
Collaborator

pinebit commented Jan 27, 2025

FYI. pre-commit fails because CI already bumped buf version:

-// 	protoc-gen-go v1.36.3
+// 	protoc-gen-go v1.36.4

We will need to update our code and PR separately to get you unblocked. Then you will need to rebase.
cc @KaloyanTanev @DiogoSantoss

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.39%. Comparing base (081e4bc) to head (5ba012c).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3484      +/-   ##
==========================================
+ Coverage   56.98%   57.39%   +0.40%     
==========================================
  Files         218      217       -1     
  Lines       32519    32238     -281     
==========================================
- Hits        18532    18503      -29     
+ Misses      12088    11826     -262     
- Partials     1899     1909      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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