CI: Bump Lagom CI builds to gcc-13 and clang-18

This includes Lagom Tools for Serenity builds, and the Lagom builds on
Azure.
This commit is contained in:
Andrew Kaster 2024-02-05 03:45:43 -07:00 committed by Andrew Kaster
parent 913cffe928
commit 2e385e4c12
Notes: sideshowbarker 2024-07-17 02:14:39 +09:00
14 changed files with 53 additions and 53 deletions

View file

@ -59,7 +59,7 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
sudo apt-get update
sudo apt-get install -y clang-format-16 ccache e2fsprogs gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip generate-ninja libegl1-mesa-dev
sudo apt-get install -y clang-format-16 ccache e2fsprogs gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip generate-ninja libegl1-mesa-dev
if ${{ matrix.arch == 'aarch64' }}; then
# FIXME: Remove this when we no longer build our own Qemu binary.
sudo apt-get install libgtk-3-dev libpixman-1-dev libsdl2-dev libslirp-dev
@ -72,7 +72,7 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 requests
- name: Check versions
run: set +e; g++ --version; g++-12 --version; clang-format --version; clang-format-16 --version; prettier --version; python --version; python3 --version; ninja --version; flake8 --version; ccache --version; qemu-system-i386 --version; gn --version
run: set +e; g++ --version; g++-13 --version; clang-format --version; clang-format-16 --version; prettier --version; python --version; python3 --version; ninja --version; flake8 --version; ccache --version; qemu-system-i386 --version; gn --version
- name: Enable KVM group perms
run: |
@ -193,8 +193,8 @@ jobs:
-DSERENITY_ARCH=${{ matrix.arch }} \
-DSERENITY_TOOLCHAIN=GNU \
-DBUILD_LAGOM=ON \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DENABLE_ALL_DEBUG_FACILITIES=ON \
-DENABLE_PCI_IDS_DOWNLOAD=OFF \
-DENABLE_USB_IDS_DOWNLOAD=OFF
@ -207,8 +207,8 @@ jobs:
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
-DSERENITY_ARCH=${{ matrix.arch }} \
-DSERENITY_TOOLCHAIN=GNU \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DENABLE_UNDEFINED_SANITIZER=ON \
-DUNDEFINED_BEHAVIOR_IS_FATAL=ON \
-DDUMP_REGIONS_ON_CRASH=ON \

View file

@ -48,7 +48,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build unzip gcc-12 g++-12 jq wget
sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget
test -e /opt/wabt-1.0.27 || (
cd /tmp
wget https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz
@ -68,7 +68,7 @@ jobs:
pip install -r libjs-test262/requirements.txt
- name: Check versions
run: set +e; g++ --version; g++-12 --version; python --version; python3 --version; ninja --version
run: set +e; g++ --version; g++-13 --version; python --version; python3 --version; ninja --version
- name: TimeZoneData cache
uses: actions/cache@v4
@ -98,8 +98,8 @@ jobs:
run: |
env PATH="/opt/wabt-1.0.27/bin:$PATH" \
cmake -GNinja -B Build \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
-DINCLUDE_WASM_SPEC_TESTS=ON \
-DSERENITY_SOURCE_DIR=${{ env.SERENITY_SOURCE_DIR }} \

View file

@ -28,10 +28,10 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
sudo apt-get update
sudo apt-get install -y clang-format-16 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip pvs-studio
sudo apt-get install -y clang-format-16 gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build unzip pvs-studio
- name: Check versions
run: set +e; g++ --version; g++-12 --version; ninja --version;
run: set +e; g++ --version; g++-13 --version; ninja --version;
- name: Prepare useful stamps
id: stamps
@ -89,8 +89,8 @@ jobs:
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
-DSERENITY_ARCH=${{ env.PVS_STUDIO_ANALYSIS_ARCH }} \
-DSERENITY_TOOLCHAIN=GNU \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DENABLE_PCI_IDS_DOWNLOAD=OFF \
-DENABLE_USB_IDS_DOWNLOAD=OFF

View file

@ -29,7 +29,7 @@ jobs:
- name: Install dependencies Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y ninja-build unzip gcc-12 g++-12
sudo apt-get install -y ninja-build unzip gcc-13 g++-13
if: ${{ matrix.os == 'ubuntu-22.04' }}
- name: Install dependencies macOS
@ -45,7 +45,7 @@ jobs:
- name: Check versions Ubuntu
run: |
ninja --version; gcc-12 --version; g++-12 --version
ninja --version; gcc-13 --version; g++-13 --version
if: ${{ matrix.os == 'ubuntu-22.04' }}
- name: Check versions macOS
@ -80,8 +80,8 @@ jobs:
- name: Create build directory Ubuntu
run: |
cmake -S Meta/Lagom -B Build -G Ninja \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DBUILD_LAGOM=ON
if: ${{ matrix.os == 'ubuntu-22.04' }}

View file

@ -60,10 +60,10 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
sudo apt-get update
sudo apt-get install -y clang-format-16 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip
sudo apt-get install -y clang-format-16 gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build unzip
- name: Check versions
run: set +e; g++ --version; g++-12 --version; ninja --version;
run: set +e; g++ --version; g++-13 --version; ninja --version;
- name: Prepare useful stamps
id: stamps
@ -121,8 +121,8 @@ jobs:
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
-DSERENITY_ARCH=${{ env.SONAR_ANALYSIS_ARCH }} \
-DSERENITY_TOOLCHAIN=GNU \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DENABLE_PCI_IDS_DOWNLOAD=OFF \
-DENABLE_USB_IDS_DOWNLOAD=OFF

View file

@ -20,7 +20,7 @@ jobs:
- name: "Install Ubuntu dependencies"
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libstdc++-12-dev
sudo apt-get install -y ninja-build gcc-13 g++-13 libstdc++-13-dev
- name: "Install emscripten"
uses: mymindstorm/setup-emsdk@v14
with:
@ -64,8 +64,8 @@ jobs:
-S ${{ github.workspace }}/Meta/Lagom \
-DBUILD_LAGOM=OFF \
-DSERENITY_CACHE_DIR=${{ github.workspace }}/Build/caches \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Build/lagom-tools \
-Dpackage=LagomTools

View file

@ -30,9 +30,9 @@ brew install x86_64-elf-gdb
If you have Xcode version 14.2 or older, also install a newer host compiler from homebrew. Xcode 14.3 is known to work.
```console
brew install llvm@15
brew install llvm@18
# OR
brew install gcc@12
brew install gcc@13
```
# Notes

View file

@ -20,13 +20,13 @@ These instructions assume the OS installed is Ubuntu 22.04 (Jammy), so they migh
```shell
sudo add-apt-repository ppa:canonical-server/server-backports
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
apt update
apt install git build-essential make cmake clang-format-15 gcc-12 g++-12 libstdc++-12-dev libgmp-dev ccache libmpfr-dev libmpc-dev ninja-build e2fsprogs qemu-utils qemu-system-i386 wabt
apt install git build-essential make cmake clang-format-16 gcc-13 g++-13 libstdc++-13-dev libgmp-dev ccache libmpfr-dev libmpc-dev ninja-build e2fsprogs qemu-utils qemu-system-i386 wabt
```
### Force usage of GCC 12
### Force usage of GCC 13
```shell
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13
```
### Create a new user account named 'runner'
```shell

View file

@ -43,9 +43,9 @@ If this happens, run `Meta/serenity.sh rebuild x86_64` to start over from a fres
### GCC is missing or is outdated
Ensure your gcc version is >= 12 with `gcc --version`. Otherwise, install it. If your gcc binary is not
Ensure your gcc version is >= 13 with `gcc --version`. Otherwise, install it. If your gcc binary is not
called `gcc` you have to specify the names of your C and C++ compiler when you run cmake, e.g.
`cmake ../.. -GNinja -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12`.
`cmake ../.. -GNinja -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13`.
### Legacy renegotiation is disabled

View file

@ -25,15 +25,15 @@ jobs:
- name: host-cc
${{ if eq(parameters.os, 'macOS') }}:
value: $(brew --prefix llvm@15)/bin/clang
value: $(brew --prefix llvm@18)/bin/clang
${{ if not(eq(parameters.os, 'macOS')) }}:
value: gcc-12
value: gcc-13
- name: host-cxx
${{ if eq(parameters.os, 'macOS') }}:
value: $(brew --prefix llvm@15)/bin/clang++
value: $(brew --prefix llvm@18)/bin/clang++
${{ if not(eq(parameters.os, 'macOS')) }}:
value: g++-12
value: g++-13
- name: ndk_version # only relevant for Android
value: '25.2.9519653'

View file

@ -52,8 +52,8 @@ jobs:
-DDUMP_REGIONS_ON_CRASH=ON \
-DENABLE_PCI_IDS_DOWNLOAD=OFF \
-DENABLE_USB_IDS_DOWNLOAD=OFF \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13
displayName: 'Create Build Environment'
workingDirectory: $(Build.SourcesDirectory)
env:

View file

@ -11,22 +11,22 @@ steps:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
sudo apt-get update
sudo apt-get install clang-format-16 ccache e2fsprogs gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build qemu-utils qemu-system-i386 unzip lld
sudo apt-get install clang-format-16 ccache e2fsprogs gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build qemu-utils qemu-system-i386 unzip lld
displayName: 'Install Dependencies'
- ${{ if eq(parameters.os, 'Linux') }}:
- script: |
set -e
sudo apt-get purge -y clang-12 clang-13 clang-14 gcc-10
sudo apt-get purge -y clang-13 clang-14 clang-15 gcc-10 gcc-11 gcc-12
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo apt-get update
sudo apt-get install ccache gcc-12 g++-12 clang-15 libstdc++-12-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
sudo apt-get install ccache clang-18 clang++-18 lld-18 ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
wget https://github.com/WebAssembly/wabt/releases/download/1.0.23/wabt-1.0.23-ubuntu.tar.gz
tar -xzf ./wabt-1.0.23-ubuntu.tar.gz
@ -37,5 +37,5 @@ steps:
# macOS ships an ancient Bash 3.x by default
- script: |
set -e
brew install coreutils bash ninja wabt ccache unzip qt llvm@15
brew install coreutils bash ninja wabt ccache unzip qt llvm@18
displayName: 'Install Dependencies'

View file

@ -14,7 +14,7 @@ die() {
pick_clang() {
local BEST_VERSION=0
for CLANG_CANDIDATE in clang clang-15 clang-16 /opt/homebrew/opt/llvm/bin/clang ; do
for CLANG_CANDIDATE in clang clang-15 clang-16 clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang ; do
if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then
continue
fi
@ -33,8 +33,8 @@ pick_clang() {
BEST_CLANG_CANDIDATE="$CLANG_CANDIDATE"
fi
done
if [ "$BEST_VERSION" -lt 14 ]; then
die "Please make sure that Clang version 14 or higher is installed."
if [ "$BEST_VERSION" -lt 15 ]; then
die "Please make sure that Clang version 15 or higher is installed."
fi
}

View file

@ -56,14 +56,14 @@ pick_host_compiler() {
return
fi
find_newest_compiler clang clang-15 clang-16 /opt/homebrew/opt/llvm/bin/clang
find_newest_compiler clang clang-15 clang-16 clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang
if is_supported_compiler "$HOST_COMPILER"; then
export CC="${HOST_COMPILER}"
export CXX="${HOST_COMPILER/clang/clang++}"
return
fi
find_newest_compiler egcc gcc gcc-12 gcc-13 /usr/local/bin/gcc-{12,13} /opt/homebrew/bin/gcc-{12,13}
find_newest_compiler egcc gcc gcc-12 gcc-13 gcc-14 /usr/local/bin/gcc-{12,13,14} /opt/homebrew/bin/gcc-{12,13,14}
if is_supported_compiler "$HOST_COMPILER"; then
export CC="${HOST_COMPILER}"
export CXX="${HOST_COMPILER/gcc/g++}"