Conversation
WalkthroughThe GitHub Actions workflow is extended to support ARM-based Ubuntu 22.04 runners by adding a new matrix entry with conditional CMake installation logic, ensuring builds execute correctly on ARM architecture without affecting existing build paths. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/main.yml (1)
110-116: Output filename collision between ubuntu-latest and ubuntu-22.04-arm.Both
ubuntu-latestandubuntu-22.04-armwill produce a tarball namedcontrib_build-Linux.tar.gz(line 115 usesrunner.os). This causes:
- Filename collisions if both OS variants are released
- Ambiguity in release artifacts about which platform they target
- Potential overwrites or data loss
Consider embedding the matrix OS identifier in the tarball name to distinguish between Linux variants:
- tar -czvf "contrib_build-${{ runner.os }}.tar.gz" $(ls -d lib) $(ls -d bin) $(ls -d include) $(ls -d share) + tar -czvf "contrib_build-${{ runner.os }}-${{ matrix.os }}.tar.gz" $(ls -d lib) $(ls -d bin) $(ls -d include) $(ls -d share)This produces filenames like
contrib_build-Linux-ubuntu-latest.tar.gzandcontrib_build-Linux-ubuntu-22.04-arm.tar.gz.Also applies to: 129-138
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/main.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build (windows-latest)
- GitHub Check: build (macos-latest)
- GitHub Check: build (ubuntu-22.04-arm)
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (1)
.github/workflows/main.yml (1)
33-34: Verify runner name validity.
ubuntu-22.04-armappears to be a non-standard runner specification. GitHub Actions typically uses runner names likeubuntu-latest,macos-latest, etc. Confirm thatubuntu-22.04-armis a valid and accessible GitHub-hosted runner name for your repository.You can verify this by checking GitHub's runner documentation or testing the workflow to confirm the runner is recognized.
| - os: ubuntu-22.04-arm | ||
| CMAKE_ARGS: "" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, locate and read the workflow file
find . -type f -name "main.yml" -path "*/.github/workflows/*"Repository: OpenMS/contrib
Length of output: 86
🏁 Script executed:
#!/bin/bash
# Check file size
wc -l ./.github/workflows/main.ymlRepository: OpenMS/contrib
Length of output: 90
🏁 Script executed:
#!/bin/bash
# Read the full workflow file with line numbers
cat -n ./.github/workflows/main.ymlRepository: OpenMS/contrib
Length of output: 6152
🌐 Web query:
GitHub Actions ubuntu-22.04-arm runner valid official runner
💡 Result:
Yes — GitHub provides an official arm64 hosted runner labelled ubuntu-22.04-arm. It’s available as a standard GitHub-hosted (arm64) runner for public repositories; private-repo use requires a larger/paid arm64 runner. Use it in workflows with runs-on: ubuntu-22.04-arm. [1][2][3]
Sources:
- GitHub-hosted runners reference (lists ubuntu-22.04-arm). [1]
- GitHub changelog: arm64 hosted runners generally available for public repositories. [2]
- actions/runner-images repo (available images/labels). [3]
🌐 Web query:
GitHub Actions runner.os context variable returns what value for ubuntu runners
💡 Result:
For Ubuntu runners, runner.os = "Linux". (docs.github.com)
Citations:
🌐 Web query:
ubuntu-22.04 system cmake version apt-get default
💡 Result:
On Ubuntu 22.04 (Jammy), the cmake package provided by the official apt repositories is CMake 3.22.1 (package version 3.22.1-1ubuntu1 / 3.22.1-1ubuntu1.22.04.2 in jammy-updates). [1][2]
To check locally: apt policy cmake or apt show cmake. [1]
Sources:
[1] packages.ubuntu.com — jammy-updates cmake (3.22.1-1ubuntu1.22.04.2).
[2] ubuntuupdates.org — cmake (jammy) showing 3.22.1.
Based on my verification, I can now provide the rewritten review comment:
Verify CMake version compatibility: ARM runner uses older system CMake (3.22.1) instead of pinned 3.29.x.
The ARM runner installs system CMake via apt-get (line 56), which provides version 3.22.1 on ubuntu-22.04. Non-ARM runners are pinned to CMake 3.29.x (line 50). This 7-minor-version gap may cause:
- Build failures if the build requires features or APIs added in 3.23.x–3.29.x
- Inconsistent behavior across platforms
- Platform-specific bugs that are hard to diagnose
Either confirm the build is compatible with CMake 3.22.1, or pin the ARM runner to a compatible version:
- name: Install CMake (Ubuntu arm64)
if: matrix.os == 'ubuntu-22.04-arm'
run: |
sudo apt-get update
- sudo apt-get install -y cmake
+ sudo apt-get install -y cmake=3.29*Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
.github/workflows/main.yml around lines 33-34: the ARM runner (ubuntu-22.04-arm)
uses system CMake from apt (v3.22.1) while other runners are pinned to CMake
3.29.x, causing potential build incompatibility; either ensure the build is
compatible with CMake 3.22.1 or pin/install the same CMake version on the ARM
runner (use the same installer/pinned version step used for non-ARM runners or
add an explicit step to download and install CMake 3.29.x) so all runners use a
consistent CMake version.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.