-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: support clang 19 #36
Conversation
WalkthroughThe changes involve updates to the build and test workflows in GitHub Actions, specifically adding support for Clang version 19. The Changes
Assessment against linked issues
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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
Outside diff range and nitpick comments (3)
README.md (1)
11-15
: LGTM! Consider adding a note about Clang 19.1.0.The table has been correctly updated to include support for Clang 19 across all platforms. This accurately reflects the PR objectives and maintains consistency with the existing format.
Consider adding a note below the table mentioning the specific version (19.1.0) that has been added, as mentioned in the linked issue. This would provide more precise information for users. For example:
Note: Version 19 refers to Clang 19.1.0. For more details, see the [official release announcement](https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.0)..github/workflows/test.yml (1)
Line range hint
31-66
: Consider refactoring repeated download and check processThe current implementation repeats the process of downloading, verifying, and checking the version for each Clang tool (clang-format, clang-tidy, clang-query, clang-apply-replacements). To improve maintainability and reduce the risk of inconsistencies, consider refactoring this repeated code into a reusable step or job.
Here's a suggested approach:
- Create a reusable job or step that takes the tool name as an input.
- Use this reusable component for each Clang tool.
Example refactor:
jobs: download-and-check: runs-on: ${{ matrix.os }} strategy: matrix: clang-version: [ 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17, 18, 19 ] os: [ ubuntu-latest, macos-latest, windows-latest ] tool: [ clang-format, clang-tidy, clang-query, clang-apply-replacements ] include: - os: ubuntu-latest bin_pattern: linux-amd64 checksum_pattern: linux-amd64 - os: macos-latest bin_pattern: macosx-amd64 checksum_pattern: macosx-amd64 - os: windows-latest bin_pattern: windows-amd64.exe checksum_pattern: windows-amd64 fail-fast: false env: GH_TOKEN: ${{ secrets.TOKEN }} bin_suffix: '${{ matrix.clang-version }}_${{ matrix.bin_pattern }}' checksum_suffix: '${{ matrix.clang-version }}_${{ matrix.checksum_pattern }}.sha512sum' steps: - uses: actions/checkout@v4 - name: Download and check ${{ matrix.tool }} shell: bash run: | gh release download ${{ inputs.tag }} --pattern '${{ matrix.tool }}-${{ env.bin_suffix }}' gh release download ${{ inputs.tag }} --pattern '${{ matrix.tool }}-${{ env.checksum_suffix }}' echo "== Output ${{ matrix.tool }} checksum" cat ${{ matrix.tool }}-${{ env.checksum_suffix }} chmod +x ${{ matrix.tool }}-${{ env.bin_suffix }} echo "== Output ${{ matrix.tool }} version" ./${{ matrix.tool }}-${{ env.bin_suffix }} --versionThis refactored version uses a matrix strategy to iterate over the different Clang tools, reducing code duplication and making it easier to add or modify tools in the future.
.github/workflows/build-amd64.yml (1)
Line range hint
1-190
: Consider monitoring build performance and artifact sizes.While the changes to add Clang 19 support are appropriate, it's important to be aware of potential impacts on the workflow:
- Build times might increase due to the addition of a new Clang version to the matrix.
- The total size of artifacts produced by the workflow may increase.
I recommend monitoring the workflow runs after these changes to ensure:
- Build times remain within acceptable limits.
- The total size of artifacts doesn't exceed GitHub's storage limits for Actions.
If issues arise, consider strategies like parallelizing builds or optimizing artifact retention.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/build-amd64.yml (2 hunks)
- .github/workflows/test.yml (1 hunks)
- README.md (1 hunks)
Additional comments not posted (3)
.github/workflows/test.yml (1)
17-17
: LGTM: Addition of Clang 19 aligns with PR objectivesThe inclusion of Clang version 19 in the test matrix is consistent with the pull request's objective to support Clang 19. This change ensures that the project will be tested against the latest Clang version across all supported operating systems.
To ensure full compatibility, let's verify that all necessary changes have been made:
.github/workflows/build-amd64.yml (2)
83-83
: Please clarify the reason for updating compiler paths.The paths for g++-11 and gcc-11 in MACOS_CMAKE_ARGS have been updated to use explicit paths (/opt/homebrew/bin/). While this change ensures the correct compiler versions are used, it's not directly related to supporting Clang 19.
Could you please provide more context on why this change was necessary? Additionally, consider adding a comment in the workflow file to explain the reason for using these specific paths, which will help with future maintenance.
To ensure these paths are correct on the macOS runner, we can run:
#!/bin/bash # Check if the specified compiler paths exist on the macOS runner if [ "$(uname)" == "Darwin" ]; then ls -l /opt/homebrew/bin/g++-11 /opt/homebrew/bin/gcc-11 /opt/homebrew/bin/g++-11 --version /opt/homebrew/bin/gcc-11 --version else echo "This check is only relevant on macOS runners." fi
22-22
: LGTM: Clang 19 support added correctly.The changes appropriately add support for Clang 19:
- Version 19 is correctly added to the
clang-version
list.- A new entry for version 19 is added to the
include
section with the correct release version.These changes align well with the PR objective to support Clang 19.
To confirm the correct release version, let's check the official LLVM releases:
Also applies to: 25-26
Verification successful
Clang 19 Release Version Confirmed
The latest Clang 19 release version (
llvmorg-19.1.0
) matches the version specified in theinclude
section of.github/workflows/build-amd64.yml
.These changes correctly add support for Clang 19 as intended.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the latest Clang 19 release version curl -s https://api.github.com/repos/llvm/llvm-project/releases | grep -m 1 '"tag_name": "llvmorg-19' | cut -d '"' -f 4Length of output: 135
Script:
#!/bin/bash # Verify the latest Clang 19 release version on Linux curl -s https://api.github.com/repos/llvm/llvm-project/releases | grep -m 1 '"tag_name": "llvmorg-19' | cut -d '"' -f 4Length of output: 136
This reverts commit 7e589c5.
The PR tested failed, but I will merge it just for testing on master branch. |
This reverts commit 8cef426.
Revert this PR 0a573d5 |
closes #35
Summary by CodeRabbit
New Features
Documentation