-
Notifications
You must be signed in to change notification settings - Fork 187
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
Implement CI/CD workflows for Initia binary builds #227
Conversation
- Add build-and-upload.yml: Main workflow coordinating build processes * Set up matrix strategy for multiple platforms (Linux, Darwin) * Trigger builds for amd64 and arm64 architectures - Add build-darwin.yml: Darwin-specific build workflow * Configure macOS environment and build process * Support amd64 and arm64 architectures - Add build-linux.yml: Linux-specific build workflow * Set up Ubuntu environment and build process * Include steps for amd64 and arm64 builds - Implement automatic uploads to Google Cloud Storage for all builds - Add verification steps and public URL generation for uploaded binaries
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughThe changes introduce new GitHub Actions workflows to automate building and uploading a project to Google Cloud Storage (GCS) for both Linux and macOS. These workflows are triggered on tag pushes starting with 'v*' and support different architectures. Each workflow includes steps for building the project, archiving the artifacts, and uploading them to GCS with necessary authentication. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/build-and-upload.yml (1 hunks)
- .github/workflows/build-darwin.yml (1 hunks)
- .github/workflows/build-linux.yml (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/build-and-upload.yml
Additional comments not posted (14)
.github/workflows/build-linux.yml (7)
3-9
: LGTM! Workflow trigger and inputs are correctly defined.The workflow is triggered by a workflow call and requires an input for the architecture.
10-12
: LGTM! Job definition and runner specification are appropriate.The job runs on the
ubuntu-latest
runner.
14-15
: LGTM! Code checkout step is correctly defined.The step uses the
actions/checkout@v3
action.
17-20
: LGTM! Go setup step is correctly defined.The step uses the
actions/setup-go@v4
action and specifies Go version1.22.4
.
22-31
: LGTM! Build and packaging steps are correctly defined.The step runs a series of commands to build the project, create directories, and package the build artifacts. The use of
make
ensures that the build process is consistent with the project's build system.
32-39
: LGTM! Google Cloud authentication and SDK setup steps are correctly defined.The steps use the
google-github-actions/auth@v2
andgoogle-github-actions/setup-gcloud@v2
actions.
40-56
: LGTM! Upload and verification steps are correctly defined.The steps use
gsutil
to upload the build artifacts to GCS and verify the upload..github/workflows/build-darwin.yml (7)
3-9
: LGTM! Workflow trigger and inputs are correctly defined.The workflow is triggered by a workflow call and requires an input for the architecture.
10-12
: LGTM! Job definition and runner specification are appropriate.The job runs on the
macos-latest
runner.
14-15
: LGTM! Code checkout step is correctly defined.The step uses the
actions/checkout@v3
action.
17-20
: LGTM! Go setup step is correctly defined.The step uses the
actions/setup-go@v4
action and specifies Go version1.22.4
.
22-31
: LGTM! Build and packaging steps are correctly defined.The step runs a series of commands to build the project, create directories, and package the build artifacts. The use of
make
ensures that the build process is consistent with the project's build system.
32-39
: LGTM! Google Cloud authentication and SDK setup steps are correctly defined.The steps use the
google-github-actions/auth@v2
andgoogle-github-actions/setup-gcloud@v2
actions.
40-56
: LGTM! Upload and verification steps are correctly defined.The steps use
gsutil
to upload the build artifacts to GCS and verify the upload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I like the reusable workflow calls 👍
Just one thing, wouldn't it simpler and more user friendly to uploads the build artifacts directly to the github release instead of a GCS bucket? (Might need to change the trigger to new release instead of tag push)
I feel like this is where people expect to find build artifacts when looking at a project.
There is a bug in the current commit. . I will fix the issue and submit a new PR |
Implement CI/CD workflows for Initia binary builds
Motivation and Context
This patch significantly improves the Initia developer experience by automating the build and distribution process for multiple platforms and architectures. It reduces manual effort, ensures consistency in builds, and makes it easier to distribute binaries to users.
How Has This Been Tested?
The workflows have been tested locally on both Linux and macOS environments. However, full end-to-end testing requires the setup of Google Cloud Storage secrets in the GitHub repository.
Types of changes
Checklist:
Additional Notes
To fully utilize these workflows, the following secrets need to be added to the repository:
GCP_SA_KEY
: The service account key for Google Cloud authenticationGCS_BUCKET
: The name of the Google Cloud Storage bucket for uploads@repository-owner Please add these secrets to the repository settings before merging this PR.