Skip to content

Conversation

striezel
Copy link
Contributor

The pull requests adds an experimental workflow for Clang 20, currently the newest major release for Clang.

Clang 20 is not available on the ubuntu-24.04 or ubuntu-22.04 runner images provided by GitHub Actions, so the workflow uses the Docker image for the newer Ubuntu 25.04 release instead. Packages for Clang 20 are available there. The final release of Ubuntu 25.04 (codenamed "Plucky Puffin") is expected to occur on 2025-04-17, in approximately a month from now. However, according to its release schedule the feature freeze took place in February. That means no new packages are introduced after that and we can be sure that the clang-20 package currently available will also be available in the final release.

This is a proof of concept to show that even compiler versions which are not directly/easily available on the existing GitHub Actions runner images can be run and used for builds and tests when using other Docker images, as previously mentioned here.

A bit of explanation for the workflow syntax:

  • The main difference to the usual Clang workflow is that this one uses the container option to specify the image for a Docker container to run the workflow steps in. So the part
      runs-on: ubuntu-latest
      container: ${{ matrix.image }}
    
    means that the job itself runs on the ubuntu-latest runner image (currently ubuntu-24.04), but within that runner it starts a Docker container using the Docker image specified in ${{ matrix.image }} - which is ubuntu:25.04 in this case. See the matrix a few lines above.
  • Installation commands for the packages are changed from sudo apt-get install ... to just apt-get install ..., because there's no sudo inside the Docker container.
  • CMake has to be installed explicitly, too, because it's not available by default in the ubuntu:25.04 Docker image.
  • The export DEBIAN_FRONTEND=noninteractive line is there to make sure that any potential interactive dialog choices during package updates and installation get skipped. The documentation says:
    noninteractive
           This  is  the  anti-frontend. It never interacts with you at all, and makes the default answers be
           used for all questions. It might mail error messages to root,  but  that's  it;  otherwise  it  is
           completely  silent  and  unobtrusive,  a perfect frontend for automatic installs. [...]
    

Basically, that's all there is to it. Build and test commands are the same as for the "normal" Clang workflows.

If there are any more questions about the workflow, feel free to ask.

@martinmoene martinmoene merged commit 649d7a2 into nonstd-lite:master Mar 24, 2025
9 checks passed
@striezel striezel deleted the clang-20 branch March 25, 2025 15:51
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