diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 62dc6113a7..d87c07cb33 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -54,6 +54,20 @@ runs: 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 + - name: Ensure clang-cl is available + if: ${{ inputs.os == 'Windows' && inputs.toolchain == 'ClangCL' }} + shell: bash + run: | + if ! where clang-cl > /dev/null 2>&1 ; then + # Keep the LLVM version in sync with GitHub's Windows runner image: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md + choco install -y llvm --no-progress --version=20.1.8 + + echo "C:/Program Files/LLVM/bin" >> "${GITHUB_PATH}" + export PATH="/c/Program Files/LLVM/bin:${PATH}" + fi + clang-cl --version + - name: 'Select latest Xcode' if: ${{ inputs.os == 'macOS' || inputs.os == 'Android' }} uses: maxim-lobanov/setup-xcode@v1 diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml deleted file mode 100644 index 2d080eb5e8..0000000000 --- a/.github/workflows/ci-windows.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: CI (Windows) - -on: - pull_request: - types: - - opened - - synchronize - - reopened - - labeled - - unlabeled - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - # Do not cancel in-progress runs if a labeling action took place (other than 'windows'). Otherwise, adding irrelevant - # labels causes existing runs to be canceled and a new (identical) run to be started. - cancel-in-progress: ${{ (github.event.action != 'labeled' && github.event.action != 'unlabeled') || github.event.label.name == 'windows' }} - -jobs: - CI: - # Only run this job if the PR has the 'windows' label. - if: | - github.repository == 'LadybirdBrowser/ladybird' - && contains(github.event.pull_request.labels.*.name, 'windows') - name: 'Windows, x86_64, Windows_Sanitizer_CI, ClangCL' - secrets: inherit - uses: ./.github/workflows/lagom-template.yml - with: - toolchain: 'ClangCL' - os_name: 'Windows' - runner_labels: '["windows-2025"]' - arch: 'x86_64' - build_preset: 'Windows_Sanitizer_CI' - clang_plugins: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29f383f900..757b2bee3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,13 @@ jobs: clang_plugins: false runner_labels: '["blacksmith-16vcpu-ubuntu-2404"]' + - os_name: 'Windows' + arch: 'x86_64' + build_preset: 'Windows_Sanitizer_CI' + toolchain: 'ClangCL' + clang_plugins: false + runner_labels: '["blacksmith-16vcpu-windows-2025"]' + secrets: inherit uses: ./.github/workflows/lagom-template.yml with: