From 2e385e4c12e93d48f5d86b511eaf1079109dba9b Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 5 Feb 2024 03:45:43 -0700 Subject: [PATCH] CI: Bump Lagom CI builds to gcc-13 and clang-18 This includes Lagom Tools for Serenity builds, and the Lagom builds on Azure. --- .github/workflows/cmake.yml | 12 ++++++------ .github/workflows/libjs-test262.yml | 8 ++++---- .../workflows/pvs-studio-static-analysis.yml | 8 ++++---- .github/workflows/serenity-js-artifacts.yml | 8 ++++---- .../workflows/sonar-cloud-static-analysis.yml | 8 ++++---- .github/workflows/wasm.yml | 6 +++--- Documentation/BuildInstructionsMacOS.md | 4 ++-- Documentation/SelfHostedRunners.md | 8 ++++---- Documentation/Troubleshooting.md | 4 ++-- Meta/Azure/Lagom.yml | 8 ++++---- Meta/Azure/Serenity.yml | 4 ++-- Meta/Azure/Setup.yml | 18 +++++++++--------- Meta/Lagom/BuildFuzzers.sh | 6 +++--- Meta/find_compiler.sh | 4 ++-- 14 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c45bcdfbc7d..6ad1160845f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 \ diff --git a/.github/workflows/libjs-test262.yml b/.github/workflows/libjs-test262.yml index 10eb35ec2bc..bd4b57fc7da 100644 --- a/.github/workflows/libjs-test262.yml +++ b/.github/workflows/libjs-test262.yml @@ -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 }} \ diff --git a/.github/workflows/pvs-studio-static-analysis.yml b/.github/workflows/pvs-studio-static-analysis.yml index cf5d364628d..df8a4c980ac 100644 --- a/.github/workflows/pvs-studio-static-analysis.yml +++ b/.github/workflows/pvs-studio-static-analysis.yml @@ -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 diff --git a/.github/workflows/serenity-js-artifacts.yml b/.github/workflows/serenity-js-artifacts.yml index 0c83c6e5ef5..939a79583af 100644 --- a/.github/workflows/serenity-js-artifacts.yml +++ b/.github/workflows/serenity-js-artifacts.yml @@ -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' }} diff --git a/.github/workflows/sonar-cloud-static-analysis.yml b/.github/workflows/sonar-cloud-static-analysis.yml index a3730060d39..55e64ad6bf2 100644 --- a/.github/workflows/sonar-cloud-static-analysis.yml +++ b/.github/workflows/sonar-cloud-static-analysis.yml @@ -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 diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 74e1719d264..f242cab74f8 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -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 diff --git a/Documentation/BuildInstructionsMacOS.md b/Documentation/BuildInstructionsMacOS.md index e0545f0fca5..74d50dc07a3 100644 --- a/Documentation/BuildInstructionsMacOS.md +++ b/Documentation/BuildInstructionsMacOS.md @@ -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 diff --git a/Documentation/SelfHostedRunners.md b/Documentation/SelfHostedRunners.md index d8ed616824e..98b4bd5701c 100644 --- a/Documentation/SelfHostedRunners.md +++ b/Documentation/SelfHostedRunners.md @@ -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 diff --git a/Documentation/Troubleshooting.md b/Documentation/Troubleshooting.md index 477b8deb606..d02d6bf6fd4 100644 --- a/Documentation/Troubleshooting.md +++ b/Documentation/Troubleshooting.md @@ -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 diff --git a/Meta/Azure/Lagom.yml b/Meta/Azure/Lagom.yml index 05dfbced6f8..dfdc09c1d37 100644 --- a/Meta/Azure/Lagom.yml +++ b/Meta/Azure/Lagom.yml @@ -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' diff --git a/Meta/Azure/Serenity.yml b/Meta/Azure/Serenity.yml index a4c62f1b1c4..893af59885a 100644 --- a/Meta/Azure/Serenity.yml +++ b/Meta/Azure/Serenity.yml @@ -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: diff --git a/Meta/Azure/Setup.yml b/Meta/Azure/Setup.yml index 341eccd66a0..6ef62934cec 100644 --- a/Meta/Azure/Setup.yml +++ b/Meta/Azure/Setup.yml @@ -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' diff --git a/Meta/Lagom/BuildFuzzers.sh b/Meta/Lagom/BuildFuzzers.sh index 7f46cd647c7..d31890f2eba 100755 --- a/Meta/Lagom/BuildFuzzers.sh +++ b/Meta/Lagom/BuildFuzzers.sh @@ -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 } diff --git a/Meta/find_compiler.sh b/Meta/find_compiler.sh index ce52e6ec3a2..028f4f055ba 100644 --- a/Meta/find_compiler.sh +++ b/Meta/find_compiler.sh @@ -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++}"