-
Notifications
You must be signed in to change notification settings - Fork 520
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: pin ubuntu to 22.04 #4213
ci: pin ubuntu to 22.04 #4213
Conversation
It seems that GitHub starts to point ubuntu-latest to ubuntu-24.04 (xref: actions/runner-images#10636), which brings some breaking changes. For example, cuda 11.8 doesn't support the default compiler in ubuntu-24.04.
📝 WalkthroughWalkthroughThe pull request introduces updates to several GitHub Actions workflow files, specifically for building, testing, and analyzing C++ projects. The primary change is the modification of the operating system environment from Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHubActions
participant BuildJob
participant AnalyzeJob
participant TestJob
User->>GitHubActions: Trigger workflow
GitHubActions->>BuildJob: Execute buildcc job on ubuntu-22.04
BuildJob->>BuildJob: Install dependencies (CUDA, ROCm)
BuildJob-->>GitHubActions: Build completed
GitHubActions->>AnalyzeJob: Execute analyze job on ubuntu-22.04
AnalyzeJob->>AnalyzeJob: Run CodeQL analysis
AnalyzeJob-->>GitHubActions: Analysis completed
GitHubActions->>TestJob: Execute testcc job on ubuntu-22.04
TestJob->>TestJob: Run tests
TestJob-->>GitHubActions: Tests completed
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: 2
🧹 Outside diff range and nitpick comments (5)
.github/workflows/codeql.yml (1)
CUDA Version Mismatch Detected
The workflow uses CUDA 12.2, while the project documentation references CUDA 11.8. Please confirm the intended CUDA version and ensure consistency across the codebase.
🔗 Analysis chain
Line range hint
35-46
: Verify CUDA version and approve CUDA setup step.The addition of the CUDA setup step is appropriate for C++ analysis. However, please verify if CUDA 12.2 is the intended version, as the PR objectives mentioned CUDA 11.8.
Let's check if CUDA 11.8 is mentioned elsewhere in the project:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for mentions of CUDA 11.8 in the project # Test: Search for 'CUDA 11.8' or 'cuda-11.8' in the project files rg -i 'cuda(-|\s)11\.8' --type-add 'script:*.{sh,bash,zsh}' --type script --type yaml --type markdownLength of output: 264
.github/workflows/test_cc.yml (1)
Line range hint
31-34
: Consider caching libtorch to speed up workflowTo optimize the workflow execution time, consider caching the downloaded libtorch. This can significantly reduce the time spent on repeatedly downloading the same file in subsequent runs.
Here's a suggested implementation using GitHub Actions cache:
- name: Cache libtorch uses: actions/cache@v3 with: path: libtorch key: ${{ runner.os }}-libtorch-2.1.2-cpu restore-keys: | ${{ runner.os }}-libtorch- - name: Download libtorch if: steps.cache-libtorch.outputs.cache-hit != 'true' run: | wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.1.2%2Bcpu.zip -O libtorch.zip unzip libtorch.zipThis change will cache the libtorch directory and only download it if it's not found in the cache.
.github/workflows/build_cc.yml (3)
Line range hint
41-51
: Approved: CUDA installation updates are correct and flexibleThe CUDA installation commands have been correctly updated to target Ubuntu 22.04 (
ubuntu2204
). The separation of CUDA 11.8 and 12.2 installations provides flexibility for testing with different CUDA versions. The use of conditional statements ensures that the correct CUDA version is installed based on the matrix variant.For consistency, consider adding the
DEBIAN_FRONTEND: noninteractive
environment variable to the CUDA 11.8 installation step as well, similar to the CUDA 12.2 step. This can help prevent any interactive prompts during the installation process.
Line range hint
54-59
: Approved: ROCm installation updated for Ubuntu 22.04The ROCm installation commands have been correctly updated to use the
jammy
repository, which is appropriate for Ubuntu 22.04. This change ensures compatibility with the new Ubuntu version while maintaining the overall installation process.For improved clarity and maintainability, consider adding a comment explaining that
jammy
corresponds to Ubuntu 22.04. This can help future maintainers understand the reasoning behind the specific repository choice.
Line range hint
1-105
: Summary: Successful update to Ubuntu 22.04 with appropriate adjustmentsThe changes in this file successfully address the PR objectives by pinning the CI environment to Ubuntu 22.04. This update:
- Ensures compatibility with CUDA 11.8 and other required software versions.
- Maintains the flexibility of the workflow by preserving different build variants.
- Updates installation commands for CUDA and ROCm to work correctly with Ubuntu 22.04.
These changes will help maintain stability in the CI process and prevent issues arising from unexpected OS updates. The overall structure and logic of the workflow remain intact, which is a positive aspect of this update.
To further improve the maintainability of this workflow:
- Consider using variables for Ubuntu and CUDA versions to make future updates easier.
- Document the reasoning behind version choices in comments within the workflow file.
- Regularly review and update the pinned versions to ensure they remain current with security updates and new features.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- .github/workflows/build_cc.yml (1 hunks)
- .github/workflows/codeql.yml (1 hunks)
- .github/workflows/test_cc.yml (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
.github/workflows/codeql.yml (1)
Line range hint
1-71
: Summary: Changes align with PR objectives, minor verification needed.The updates to the CodeQL workflow file align well with the PR objectives. The runner has been pinned to Ubuntu 22.04, addressing the compatibility issues with CUDA. The addition of the CUDA setup step for C++ analysis is appropriate.
However, please verify the use of CUDA 12.2 in the setup step, as the PR objectives mentioned CUDA 11.8. If 12.2 is intentional, consider updating the PR description for clarity.
.github/workflows/build_cc.yml (1)
14-14
: Approved: Pinning to Ubuntu 22.04 ensures CI stabilityThis change from
ubuntu-latest
toubuntu-22.04
aligns perfectly with the PR objectives. It addresses the potential breaking changes introduced by GitHub's transition to Ubuntu 24.04 and ensures compatibility with CUDA 11.8. This pinning strategy will maintain stability in the CI process and prevent unexpected issues arising from OS updates.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #4213 +/- ##
==========================================
- Coverage 83.50% 83.49% -0.01%
==========================================
Files 541 541
Lines 52459 52459
Branches 3047 3047
==========================================
- Hits 43804 43801 -3
Misses 7710 7710
- Partials 945 948 +3 ☔ View full report in Codecov by Sentry. |
It seems that GitHub starts to point ubuntu-latest to ubuntu-24.04 (xref: actions/runner-images#10636), which brings some breaking changes. For example, cuda 11.8 doesn't support the default compiler in ubuntu-24.04.
Summary by CodeRabbit
New Features
Bug Fixes
Chores