Skip to content

Conversation

anupsdf
Copy link
Contributor

@anupsdf anupsdf commented Sep 25, 2025

What:

Update Github CI, docker setup and documentation to run on Ubuntu 24.04 with clang-19 and gcc-12

Why:

Since stellar-core packages would be produced for Ubuntu 22.04 (jammy) and 24.04 (noble) with clang-19 moving forward, we would like to switch our Github CI to run on the new leading OS version of Ubuntu.

  • Update Github action
  • Update docker setup
  • Update Update documentation
  • gcc/g++ versions. Noble comes with gcc/g++ version 14 while jammy comes with 12. We could get gcc/g++ 13 on Jammy with PPA dependency. Which version should we recommend? Currently, having Github CI run gcc/g++ version 14 since we run on Ubuntu 24.04.
  • evaluate switching to clang-20 instead

@anupsdf anupsdf force-pushed the clang-19-ci branch 2 times, most recently from 22bdd9a to c29f2ff Compare September 25, 2025 19:14
@anupsdf anupsdf marked this pull request as ready for review September 25, 2025 19:14
@Copilot Copilot AI review requested due to automatic review settings September 25, 2025 19:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the GitHub CI workflow to use Ubuntu 24.04 with clang-19 instead of Ubuntu 22.04 with clang-12, aligning the CI environment with the package distribution targets for stellar-core.

Key changes:

  • Upgrades Ubuntu runner versions from 22.04 to 24.04
  • Updates clang toolchain from version 12 to version 19
  • Removes the dedicated clang-19 static analysis workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/clang-19-static-analysis.yml Removes the entire dedicated clang-19 static analysis workflow file
.github/workflows/build.yml Updates Ubuntu versions, clang toolchain to version 19, and adds format check skip

@MonsieurNicolas
Copy link
Contributor

Not sure where the overall work to migrate to the right toolchain for Ubuntu 22.04 is tracked.
If this is the PR, you also need to update a few places, including https://github.com/stellar/stellar-core/blob/master/docker/Dockerfile.testing and https://github.com/stellar/stellar-core/tree/master/.devcontainer (grep for mentions of clang).

There is also the question of which version of gcc/g++ to reference in guides etc.

@anupsdf
Copy link
Contributor Author

anupsdf commented Sep 25, 2025

Not sure where the overall work to migrate to the right toolchain for Ubuntu 22.04 is tracked. If this is the PR, you also need to update a few places, including https://github.com/stellar/stellar-core/blob/master/docker/Dockerfile.testing and https://github.com/stellar/stellar-core/tree/master/.devcontainer (grep for mentions of clang).

There is also the question of which version of gcc/g++ to reference in guides etc.

I can use this PR to track the overall migration including the documentation. Will also include gcc/g++ updates here.

@anupsdf anupsdf marked this pull request as draft September 26, 2025 05:05
docker/README.md Outdated
For example:
```
export STELLAR_CORE_VERSION=17.0.0-557.096f6a7.focal
export STELLAR_CORE_VERSION=23.0.2-2724.7b9e6c863.noble
Copy link
Contributor

Choose a reason for hiding this comment

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

you are hiding an issue here.

the Dockerfile https://github.com/stellar/stellar-core/blob/master/docker/Dockerfile will not work when used with 22.04

I think you have as a pre-requisite to switch to llvm-19 to ensure that downstream dependencies still on 22.04 also add the llvm debian repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Let me modify this docker README and also the setup script, https://github.com/stellar/stellar-core/blob/master/docker/setup , that is called by Dockerfile to add pre-requisites based on OS versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a separate DISTRO argument that can now be passed in instead of suffixing jammy/noble to this STELLAR_CORE_VERSION argument. The /docker/setup has the LLVM dependency for jammy.

@anupsdf anupsdf changed the title Update Github CI to run on Ubuntu 24.04 with clang-19 Update Github CI, docker setup and documentation to run on Ubuntu 24.04 with clang-19 and gcc-12 Sep 26, 2025
@anupsdf anupsdf force-pushed the clang-19-ci branch 4 times, most recently from e60358b to 273dc36 Compare September 29, 2025 06:09
@anupsdf anupsdf changed the title Update Github CI, docker setup and documentation to run on Ubuntu 24.04 with clang-19 and gcc-12 Update Github CI, docker setup and documentation to run on Ubuntu 24.04 with clang-19 and gcc-14 Sep 29, 2025
# clang with libstdc++
# sudo apt-get install gcc-12
# if using g++ or building with libstdc++
# sudo apt-get install gcc-12 g++-12 cpp-12
Copy link
Contributor Author

Choose a reason for hiding this comment

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

With ppa:ubuntu-toolchain-r/test we can get gcc/g++ version 13 on Ubuntu Jammy 22.04. However, default Ubuntu Jammy ships only with gcc/g++ version of 12.

- `git submodule update`
- Type `./autogen.sh`.
- Type `./configure` *(If configure complains about compiler versions, try `CXX=clang-12 ./configure` or `CXX=g++-10 ./configure` or similar, depending on your compiler.)*
- Type `./configure` *(If configure complains about compiler versions, try `CXX=clang-19 ./configure` or `CXX=g++-12 ./configure` or similar, depending on your compiler.)*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For Windows, should this be g++-14 instead?

TAG = stellar/stellar-core:$(STELLAR_CORE_VERSION)
endif
$(SUDO) docker build --pull \
$(SUDO) docker build --pull --platform linux/amd64 \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case someone is building docker on a machine that is not on amd64.

Update Github CI to run on Ubuntu 24.04 with clang-19

add clang-format-19 and libstdc++-19-dev

update Dockerfile and readme

update INSTALL.md

remove CLANG_VERSION from build.yml

Update gcc version to 12

Fix INSTALL.md

fix

fix

fix docker

docker

fix docker file and readme

gcc
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