CI: Update the Clang pipeline to Clang 20

This commit is contained in:
Timothy Flynn 2025-05-11 14:40:47 -04:00 committed by Andrew Kaster
commit 70d2b0b6f3
Notes: github-actions[bot] 2025-05-14 08:07:10 +00:00
8 changed files with 26 additions and 25 deletions

View file

@ -34,18 +34,19 @@ runs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main'
sudo apt-get update -y
sudo apt-get install -y autoconf autoconf-archive automake build-essential ccache cmake curl fonts-liberation2 \
gcc-14 g++-14 libcurl4-openssl-dev libegl1-mesa-dev libgl1-mesa-dev libpulse-dev libssl-dev \
libstdc++-14-dev lld-19 nasm ninja-build qt6-base-dev qt6-tools-dev-tools tar unzip zip
libstdc++-14-dev lld-20 nasm ninja-build qt6-base-dev qt6-tools-dev-tools tar unzip zip
if ${{ inputs.toolchain == 'Clang' }} ; then
sudo apt-get install -y clang-19 clang++-19 clang-tools-19
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
sudo apt-get install -y clang-20 clang++-20 clang-tools-20
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100
fi
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
@ -112,7 +113,7 @@ runs:
run: |
set -e
brew update
brew install autoconf autoconf-archive automake bash ccache coreutils llvm@19 nasm ninja pkg-config qt unzip wabt
brew install autoconf autoconf-archive automake bash ccache coreutils llvm@20 nasm ninja pkg-config qt unzip wabt
- name: 'Set required environment variables'
if: ${{ inputs.os == 'Linux' && inputs.arch == 'arm64' }}

View file

@ -51,8 +51,8 @@ jobs:
- name: Create build directory Ubuntu
run: |
cmake --preset Distribution_CI \
-DCMAKE_C_COMPILER=clang-19 \
-DCMAKE_CXX_COMPILER=clang++-19 \
-DCMAKE_C_COMPILER=clang-20 \
-DCMAKE_CXX_COMPILER=clang++-20 \
-DENABLE_GUI_TARGETS=OFF
if: ${{ matrix.os_name == 'Linux' }}

View file

@ -37,9 +37,9 @@ jobs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y clang++-19 python3-venv
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
sudo apt-get install -y clang++-20 python3-venv
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100
- name: 'Download JS repl artifact'
id: download-artifact

View file

@ -71,8 +71,8 @@ jobs:
CMAKE_OPTIONS="$CMAKE_OPTIONS -DENABLE_SWIFT=ON"
elif ${{ inputs.os_name == 'Linux' }} ; then
if ${{ inputs.toolchain == 'Clang' }} ; then
echo "host_cc=clang-19" >> "$GITHUB_OUTPUT"
echo "host_cxx=clang++-19" >> "$GITHUB_OUTPUT"
echo "host_cc=clang-20" >> "$GITHUB_OUTPUT"
echo "host_cxx=clang++-20" >> "$GITHUB_OUTPUT"
elif ${{ inputs.toolchain == 'GNU' }} ; then
echo "host_cc=gcc-14" >> "$GITHUB_OUTPUT"
echo "host_cxx=g++-14" >> "$GITHUB_OUTPUT"

View file

@ -51,10 +51,10 @@ jobs:
- name: Install dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main'
sudo apt-get update -y
sudo apt-get install -y ninja-build unzip clang-19 clang++-19 jq wget curl zip tar autoconf autoconf-archive automake nasm pkg-config libgl1-mesa-dev rsync
sudo apt-get install -y ninja-build unzip clang-20 clang++-20 jq wget curl zip tar autoconf autoconf-archive automake nasm pkg-config libgl1-mesa-dev rsync
test -e /opt/wabt-1.0.35 || (
cd /tmp
@ -96,11 +96,11 @@ jobs:
export HOME=${{ github.workspace }}/home
mkdir -p $HOME
env PATH="/opt/wabt-1.0.35/bin:$PATH" \
CC=clang-19 \
CXX=clang++-19 \
CC=clang-20 \
CXX=clang++-20 \
cmake --preset CI -B libjs-test262/Build \
-DCMAKE_C_COMPILER=clang-19 \
-DCMAKE_CXX_COMPILER=clang++-19 \
-DCMAKE_C_COMPILER=clang-20 \
-DCMAKE_CXX_COMPILER=clang++-20 \
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
-DINCLUDE_WASM_SPEC_TESTS=ON \
-DENABLE_GUI_TARGETS=OFF

View file

@ -4,7 +4,7 @@
Qt6 development packages, nasm, additional build tools, and a C++23 capable compiler are required.
We currently use gcc-14 and clang-19 in our CI pipeline. If these versions are not available on your system, see
We currently use gcc-14 and clang-20 in our CI pipeline. If these versions are not available on your system, see
[`Meta/find_compiler.sh`](../Meta/find_compiler.sh) for the minimum compatible version.
CMake 3.25 or newer must be available in $PATH.
@ -52,10 +52,10 @@ sudo wget -O /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm
# Optional: Verify the GPG key manually
# Use the key to authorize an entry for apt.llvm.org in apt sources list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-19 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-20 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
# Update apt package list and install clang and associated packages
sudo apt update -y && sudo apt install clang-19 clangd-19 clang-tools-19 clang-format-19 clang-tidy-19 lld-19 -y
sudo apt update -y && sudo apt install clang-20 clangd-20 clang-tools-20 clang-format-20 clang-tidy-20 lld-20 -y
```
- Alternative: Install gcc from [Ubuntu Toolchain PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test):
@ -122,7 +122,7 @@ brew install autoconf autoconf-archive automake ccache cmake nasm ninja pkg-conf
If you wish to use clang from homebrew instead:
```
brew install llvm@19
brew install llvm@20
```
If you also plan to use the Qt UI on macOS:

View file

@ -14,7 +14,7 @@ die() {
pick_clang() {
local BEST_VERSION=0
for CLANG_CANDIDATE in clang clang-17 clang-18 clang-19 /opt/homebrew/opt/llvm/bin/clang ; do
for CLANG_CANDIDATE in clang clang-17 clang-18 clang-19 clang-20 /opt/homebrew/opt/llvm/bin/clang ; do
if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then
continue
fi

View file

@ -56,7 +56,7 @@ pick_host_compiler() {
return
fi
find_newest_compiler clang clang-17 clang-18 clang-19 /opt/homebrew/opt/llvm/bin/clang
find_newest_compiler clang clang-17 clang-18 clang-19 clang-20 /opt/homebrew/opt/llvm/bin/clang
if is_supported_compiler "$HOST_COMPILER"; then
export CC="${HOST_COMPILER}"
export CXX="${HOST_COMPILER/clang/clang++}"