From e609b3518346a5984eb41fb769132d79e63c27ea Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Wed, 10 Jan 2024 14:26:21 -0500 Subject: [PATCH] Explore using higher LLVM, MSVC, Xcode versions - Compile with LLVM 21 on Linux (we do not expect to upgrade beyond 19 anytime soon). - Use latest MSVC --- .github/actions/setup-runner/action.yml | 38 +++++++++++++------------ .github/workflows/test.yml | 4 +-- build/ci.bazelrc | 4 +-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index 45b8fb23928..74fe9095b29 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -11,26 +11,26 @@ runs: wget https://apt.llvm.org/llvm.sh sed -i '/apt-get install/d' llvm.sh chmod +x llvm.sh - sudo ./llvm.sh 19 + sudo ./llvm.sh 21 # keep in sync with build/ci.bazelrc sudo apt-get install -y -qq --no-install-recommends \ - clang-19 \ - lld-19 \ - libunwind-19 \ - libc++abi1-19 \ - libc++1-19 \ - libc++-19-dev \ - libclang-rt-19-dev \ - llvm-19 - sudo ln -s /usr/bin/llvm-symbolizer-19 /usr/bin/llvm-symbolizer - sudo ln -s /usr/bin/llvm-profdata-19 /usr/bin/llvm-profdata - sudo ln -s /usr/bin/llvm-cov-19 /usr/bin/llvm-cov - echo "build:linux --action_env=CC=/usr/lib/llvm-19/bin/clang" >> .bazelrc - echo "build:linux --host_action_env=CC=/usr/lib/llvm-19/bin/clang" >> .bazelrc - echo "build:linux --linkopt=--ld-path=/usr/lib/llvm-19/bin/ld.lld" >> .bazelrc - echo "build:linux --host_linkopt=--ld-path=/usr/lib/llvm-19/bin/ld.lld" >> .bazelrc - echo "build:linux --action_env=AR=/usr/lib/llvm-19/bin/llvm-ar" >> .bazelrc - echo "build:linux --host_action_env=AR=/usr/lib/llvm-19/bin/llvm-ar" >> .bazelrc + clang-21 \ + lld-21 \ + libunwind-21 \ + libc++abi1-21 \ + libc++1-21 \ + libc++-21-dev \ + libclang-rt-21-dev \ + llvm-21 + sudo ln -s /usr/bin/llvm-symbolizer-21 /usr/bin/llvm-symbolizer + sudo ln -s /usr/bin/llvm-profdata-21 /usr/bin/llvm-profdata + sudo ln -s /usr/bin/llvm-cov-21 /usr/bin/llvm-cov + echo "build:linux --action_env=CC=/usr/lib/llvm-21/bin/clang" >> .bazelrc + echo "build:linux --host_action_env=CC=/usr/lib/llvm-21/bin/clang" >> .bazelrc + echo "build:linux --linkopt=--ld-path=/usr/lib/llvm-21/bin/ld.lld" >> .bazelrc + echo "build:linux --host_linkopt=--ld-path=/usr/lib/llvm-21/bin/ld.lld" >> .bazelrc + echo "build:linux --action_env=AR=/usr/lib/llvm-21/bin/llvm-ar" >> .bazelrc + echo "build:linux --host_action_env=AR=/usr/lib/llvm-21/bin/llvm-ar" >> .bazelrc - name: Setup Windows shell: pwsh if: runner.os == 'Windows' @@ -45,6 +45,8 @@ runs: git config --show-scope --show-origin core.symlinks git config --system core.longpaths true [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=\\\\?\\C:\\tmp') + # TODO: Test that the build is still compatible with the latest LLVM release + # choco upgrade llvm --version=21.1.8 - name: Setup macOS if: runner.os == 'macOS' shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79d7f2c8d09..85abcf10134 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: { name: linux, arch: X64, image: ubuntu-22.04-16core }, { name: linux-arm, arch: ARM64, image: ubuntu-22.04-arm-16core }, { name: macOS, arch: ARM64, image: macos-15-xlarge, use_lld: true }, - { name: windows, arch: X64, image: windows-2025-16core }, + { name: windows, arch: X64, image: windows-2025-vs2026 }, ] config: [ # Default build: no suffix or additional bazel arguments @@ -55,7 +55,7 @@ jobs: # - os: { name : windows, image : windows-2025 } # config: { suffix: -debug, bazel-args: --config=windows_dbg } exclude: - - os: { name: windows, arch: X64, image: windows-2025-16core } + - os: { name: windows, arch: X64, image: windows-2025-vs2026 } config: { suffix: -debug } # due to resource constraints, exclude the macOS and x64 Linux debug runners for now. # linux-asan and arm64 linux-debug should provide sufficient coverage for building in the diff --git a/build/ci.bazelrc b/build/ci.bazelrc index 1ae89a8d120..b7ee016b8d4 100644 --- a/build/ci.bazelrc +++ b/build/ci.bazelrc @@ -56,8 +56,8 @@ build:ci-linux-common --copt='-Werror' build:ci-linux-common --copt='-Wno-error=#warnings' build:ci-linux-common --copt='-Wno-error=deprecated-declarations' # keep in sync with .github/workflows/test.yml -build:ci-linux-common --action_env=CC=/usr/lib/llvm-19/bin/clang -build:ci-linux-common --host_action_env=CC=/usr/lib/llvm-19/bin/clang +build:ci-linux-common --action_env=CC=/usr/lib/llvm-21/bin/clang +build:ci-linux-common --host_action_env=CC=/usr/lib/llvm-21/bin/clang build:ci-linux --config=ci-linux-common --remote_download_regex=".*src/workerd/server/workerd.*" build:ci-linux-arm --config=ci-linux-common