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

Bump main Ubuntu version to 24.04 in GitHub Actions [circle skip] #588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laurynas-biveinis
Copy link
Owner

@laurynas-biveinis laurynas-biveinis commented Jul 16, 2024

Summary by CodeRabbit

  • Chores
    • Updated build workflows to use the latest Ubuntu version for improved compatibility and performance.
    • Changed LLVM dependency source URL for better access to necessary components.
    • Updated CodeQL analysis workflow to run on the latest Ubuntu version while maintaining existing configurations.

Copy link

coderabbitai bot commented Dec 5, 2024

Walkthrough

The changes involve updating the operating system version in two GitHub workflow files from ubuntu-22.04 to ubuntu-latest. This update applies to the build jobs in .github/workflows/build.yml and the CodeQL analysis jobs in .github/workflows/codeql-analysis.yml. Additionally, the repository source for LLVM dependencies has been modified in the build workflow. No other significant changes to logic or public entity declarations were made.

Changes

File Change Summary
.github/workflows/build.yml Updated OS version from ubuntu-22.04 to ubuntu-latest; changed LLVM dependency URL from http://apt.llvm.org/jammy/ to http://apt.llvm.org/noble/.
.github/workflows/codeql-analysis.yml Updated OS version from ubuntu-22.04 to ubuntu-latest; no other changes to workflow structure.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CI_Build
    participant CI_CodeQL

    User->>CI_Build: Trigger build job
    CI_Build->>CI_Build: Run on ubuntu-latest
    CI_Build->>CI_Build: Setup LLVM dependencies
    CI_Build->>User: Build completed

    User->>CI_CodeQL: Trigger CodeQL analysis
    CI_CodeQL->>CI_CodeQL: Run on ubuntu-latest
    CI_CodeQL->>User: Analysis completed
Loading

Poem

🐰 In the meadow, fresh and bright,
Ubuntu's changed, a lovely sight!
From twenty-two to latest cheer,
Our builds will hop with joy, oh dear!
With LLVM now in noble land,
We code with glee, a happy band! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b7345fe and 9058bea.

📒 Files selected for processing (2)
  • .github/workflows/build.yml (3 hunks)
  • .github/workflows/codeql-analysis.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/build.yml

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
.github/workflows/codeql-analysis.yml (1)

Line range hint 44-47: Consider updating GCC version to 13

Ubuntu 24.04 ships with GCC 13 by default. Consider updating the symlinks to use gcc-13/g++-13 instead of version 11.

-          sudo ln -sf /usr/bin/g++-11 /usr/bin/g++
-          sudo ln -sf /usr/bin/gcc-11 /usr/bin/gcc
+          sudo ln -sf /usr/bin/g++-13 /usr/bin/g++
+          sudo ln -sf /usr/bin/gcc-13 /usr/bin/gcc
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 35ca435 and b7345fe.

📒 Files selected for processing (2)
  • .github/workflows/build.yml (3 hunks)
  • .github/workflows/codeql-analysis.yml (1 hunks)
🔇 Additional comments (3)
.github/workflows/codeql-analysis.yml (1)

29-29: Verify CodeQL compatibility with Ubuntu 24.04

While the upgrade to Ubuntu 24.04 aligns with the latest LTS release, we should verify the compatibility of the current toolchain with Noble Numbat.

✅ Verification successful

Ubuntu 24.04 upgrade is compatible with CodeQL workflow

The workflow uses GitHub's CodeQL action v3 which is compatible with Ubuntu 24.04. The analysis shows:

  • The workflow uses official github/codeql-action at version 3
  • Only C++ language analysis is configured
  • Uses standard autobuild feature without custom build commands
  • No specific toolchain dependencies are enforced in the workflow

Since GitHub officially supports Ubuntu 24.04 runners and CodeQL v3 is the latest major version, this upgrade is safe.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the current dependencies are available in Ubuntu 24.04 repositories

# Check if gcc-11 package is available in Ubuntu 24.04
curl -s "https://packages.ubuntu.com/noble/gcc-11" | grep -q "No such package"
GCC11_STATUS=$?

# Check if libboost-dev package is available
curl -s "https://packages.ubuntu.com/noble/libboost-dev" | grep -q "No such package"
BOOST_STATUS=$?

if [ $GCC11_STATUS -eq 0 ] || [ $BOOST_STATUS -eq 0 ]; then
    echo "Warning: Some dependencies might not be available in Ubuntu 24.04"
    [ $GCC11_STATUS -eq 0 ] && echo "- gcc-11 not found"
    [ $BOOST_STATUS -eq 0 ] && echo "- libboost-dev not found"
fi

Length of output: 233


Script:

#!/bin/bash
# Let's verify the CodeQL action compatibility and configurations

# Check if there are any specific CodeQL configurations or language settings
rg -l "codeql" --type yaml

# Check the CodeQL configuration details
rg "language|runs-on|codeql" .github/workflows/codeql-analysis.yml -A 2 -B 2

# Check if there are any build or compile steps that might be affected
rg "build|compile|make|cmake" .github/workflows/codeql-analysis.yml

Length of output: 2302

.github/workflows/build.yml (2)

38-38: LGTM! Ubuntu version updates are consistent

The Ubuntu version has been consistently updated to 24.04 across all Linux build configurations.

Also applies to: 43-43, 49-49, 55-55, 61-61, 66-66, 72-72, 78-78, 84-84, 90-90, 97-97, 101-101, 106-106, 112-112, 118-118, 124-124, 129-129, 135-135, 141-141, 147-147, 153-153, 269-269, 276-276


Line range hint 1-500: Build matrix configuration looks good

The Ubuntu version updates have been applied consistently across all Linux builds while maintaining:

  • All compiler configurations (GCC and Clang)
  • All build types (Debug and Release)
  • All sanitizer configurations (ASan, TSan, UBSan)
  • Coverage builds
  • Static analysis builds

MacOS configurations are correctly left unchanged.

Comment on lines +308 to 311
echo 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main' \
| sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y clang-19 iwyu
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Switch to LLVM 18 as LLVM 19 packages are not yet available

LLVM 19 packages are currently not available in the noble repository. The workflow has multiple dependencies on LLVM 19 components (clang-19, libomp5-19, llvm-19, lld-19, clang-tools-19, clang-tidy-19) that need to be updated to use version 18 instead.

  • .github/workflows/build.yml: Update all occurrences of LLVM/Clang 19 to version 18
    • Repository URL: Change llvm-toolchain-noble-19 to llvm-toolchain-noble-18
    • Package installations: Update all package names from -19 suffix to -18
    • Job names: Update all references from "clang 19" to "clang 18"
🔗 Analysis chain

Verify LLVM 19 package availability in Ubuntu 24.04

The change to the noble repository is correct, but we should verify the availability and stability of LLVM 19 packages.


Let me verify the LLVM 18 availability as a fallback option before making the final recommendation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify LLVM 19 package availability in Ubuntu 24.04 repository

# Check if LLVM 19 packages are available
curl -s "http://apt.llvm.org/noble/dists/llvm-toolchain-noble-19/main/binary-amd64/Packages" | \
  grep -E "Package: (clang-19|llvm-19|lld-19|clang-tools-19|libomp5-19)"

if [ $? -ne 0 ]; then
    echo "Warning: Some LLVM 19 packages might not be available yet"
fi

Length of output: 308


Script:

#!/bin/bash
# Check if LLVM 18 packages are available as a stable alternative
curl -s "http://apt.llvm.org/noble/dists/llvm-toolchain-noble-18/main/binary-amd64/Packages" | \
  grep -E "Package: (clang-18|llvm-18)"

# Also verify if there's any mention of LLVM 19 in the workflow file that needs to be updated
rg "llvm.*19|clang.*19" .github/workflows/

Length of output: 1324

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.

1 participant