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

Add a workflow to create release build. #217

Merged
merged 3 commits into from
Jul 20, 2024

Conversation

shenhanc78
Copy link
Collaborator

This PR setup a workflow to create a release build. Below is the steps to create a release

  1. submit all changes to master branch
  2. create a RELEASE.md file under the root directory, the "RELEASE.md" can be created via github's draft new release text helper page
  3. submit RELEASE.md to master branch
  4. create a release tag, a release tag is like "v[0-9]+.[0-9]+.[0-9]+", this can be done locally:
    git tag <tag_name>
  5. push the tag, this can be done on the local machine:
    git push <repo> tag <tag_name>
  6. the work flow will be triggered

This workflow can also be manually triggered to create a release for older versions.

The workflow shall be further improved so that we can create the release on the github webpage and let it trigger the release build.

.github/workflows/create-release-build.yaml Show resolved Hide resolved
.github/workflows/create-release-build.yaml Outdated Show resolved Hide resolved
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_TOOL=LLVM -S ${{github.workspace}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this will default to using g++ as the compiler. Is that desired?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This can be built with clang toolchain too, either works. Except for clang, we need to install necessary packages in the previous step.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should build the release binaries with clang to minimize surprises. Also the runner should already have clang-13 [1] on it so it's not necessary to install clang as a package.

https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. I will add -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ and test build on my personal repo.

.github/workflows/create-release-build.yaml Outdated Show resolved Hide resolved
.github/workflows/create-release-build.yaml Outdated Show resolved Hide resolved
.github/workflows/create-release-build.yaml Show resolved Hide resolved
.github/workflows/create-release-build.yaml Outdated Show resolved Hide resolved
@shenhanc78 shenhanc78 self-assigned this Jul 19, 2024
Copy link
Collaborator

@snehasish snehasish left a comment

Choose a reason for hiding this comment

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

LGTM modulo the comment to use clang when building the binaries we release.

@shenhanc78 shenhanc78 merged commit 4765163 into google:master Jul 20, 2024
2 checks passed
@shenhanc78 shenhanc78 deleted the create-release-build branch July 22, 2024 21:35
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