From b7cae928699ceaa6e3a69a5cde30e0ef9f21993a Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 31 Oct 2025 14:54:59 -0700 Subject: [PATCH 1/7] [libc++] Trigger the BuildKite pipeline from Github Actions Instead of always triggering the BuildKite pipeline and then determining whether there is anything to do, trigger it from the libc++ CI Github action. Since that Github action is only triggered when relevant files have been modified, this simplifies the triggering logic. Importantly, it will also prevent all of the monorepo CI jobs from waiting on the Buildkite pipeline to report that there's nothing to do. --- .github/workflows/libcxx-build-and-test.yaml | 13 +++++++ libcxx/utils/ci/buildkite-pipeline-trigger.sh | 34 ------------------- 2 files changed, 13 insertions(+), 34 deletions(-) delete mode 100755 libcxx/utils/ci/buildkite-pipeline-trigger.sh diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 6c8f2cb45ee0a..b4384d693b9fc 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -288,3 +288,16 @@ jobs: - name: Build and test run: | bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} + + buildkite_platforms: + # needs: [ stage2 ] # TODO: temporarily always trigger + runs-on: llvm-premerge-libcxx-next-runners + steps: + - name: Trigger Buildkite pipeline + uses: buildkite/trigger-pipeline-action@v2.4.0 + with: + buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} + pipeline: llvm-project/libcxx-ci + branch: ${{ github.ref_name }} + commit: ${{ github.sha }} + message: "Triggered by GitHub Actions PR against ${{ github.ref_name }}" diff --git a/libcxx/utils/ci/buildkite-pipeline-trigger.sh b/libcxx/utils/ci/buildkite-pipeline-trigger.sh deleted file mode 100755 index 4661cd54fad42..0000000000000 --- a/libcxx/utils/ci/buildkite-pipeline-trigger.sh +++ /dev/null @@ -1,34 +0,0 @@ -# ===----------------------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -# ===----------------------------------------------------------------------===## - -# -# This script determines whether the libc++ Buildkite pipeline should be triggered -# on a change. This is required because Buildkite gets notified for every PR in the -# LLVM monorepo, and we make it a no-op unless the libc++ pipeline needs to be triggered. -# - -# Set by buildkite -: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=} - -# Fetch origin to have an up to date merge base for the diff. -git fetch origin -# List of files affected by this commit -: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)} - -echo "Files modified:" >&2 -echo "$MODIFIED_FILES" >&2 -modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u) -echo "Directories modified:" >&2 -echo "$modified_dirs" >&2 - -# If libc++ or one of the runtimes directories changed, trigger the libc++ Buildkite pipeline. -if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then - buildkite-agent pipeline upload libcxx/utils/ci/buildkite-pipeline.yml -else - echo "No Buildkite jobs to trigger" -fi From 6477ecb40dddcdfbadef61db47290b3226f3cb96 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Sun, 2 Nov 2025 12:49:23 -0800 Subject: [PATCH 2/7] Pin action version --- .github/workflows/libcxx-build-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index b4384d693b9fc..61d317ec20647 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -294,7 +294,7 @@ jobs: runs-on: llvm-premerge-libcxx-next-runners steps: - name: Trigger Buildkite pipeline - uses: buildkite/trigger-pipeline-action@v2.4.0 + uses: buildkite/trigger-pipeline-action@f0dcd5ae74452a8d17d473227c9d212dcc1eb8f9 # v2.4.0 with: buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} pipeline: llvm-project/libcxx-ci From 5c0e6078d0e3114bbbb43501ea77819a0219ddb6 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Sun, 2 Nov 2025 12:49:54 -0800 Subject: [PATCH 3/7] Temporarily disable other jobs, for testing --- .github/workflows/libcxx-build-and-test.yaml | 504 +++++++++---------- 1 file changed, 252 insertions(+), 252 deletions(-) diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 61d317ec20647..07a1b51e2eb5d 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -34,260 +34,260 @@ concurrency: cancel-in-progress: true jobs: - stage1: - if: github.repository_owner == 'llvm' - runs-on: llvm-premerge-libcxx-next-runners - continue-on-error: false - strategy: - fail-fast: false - matrix: - config: [ - 'frozen-cxx03-headers', - 'generic-cxx03', - 'generic-cxx26', - 'generic-modules' - ] - cc: [ 'clang-22' ] - cxx: [ 'clang++-22' ] - include: - - config: 'generic-gcc' - cc: 'gcc-15' - cxx: 'g++-15' - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: ${{ matrix.config }}.${{ matrix.cxx }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: always() - with: - name: ${{ matrix.config }}-${{ matrix.cxx }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - stage2: - if: github.repository_owner == 'llvm' - runs-on: llvm-premerge-libcxx-next-runners - needs: [ stage1 ] - continue-on-error: false - strategy: - fail-fast: false - matrix: - config: [ - 'generic-cxx11', - 'generic-cxx14', - 'generic-cxx17', - 'generic-cxx20', - 'generic-cxx23' - ] - cc: [ 'clang-22' ] - cxx: [ 'clang++-22' ] - include: - - config: 'generic-gcc-cxx11' - cc: 'gcc-15' - cxx: 'g++-15' - - config: 'generic-cxx26' - cc: 'clang-21' - cxx: 'clang++-21' - - config: 'generic-cxx26' - cc: 'clang-20' - cxx: 'clang++-20' - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: ${{ matrix.config }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: always() # Upload artifacts even if the build or test suite fails - with: - name: ${{ matrix.config }}-${{ matrix.cxx }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - stage3: - if: github.repository_owner == 'llvm' - needs: [ stage2 ] - continue-on-error: false - strategy: - fail-fast: false - max-parallel: 8 - matrix: - config: [ - 'generic-abi-unstable', - 'generic-hardening-mode-debug', - 'generic-hardening-mode-extensive', - 'generic-hardening-mode-extensive-observe-semantic', - 'generic-hardening-mode-fast', - 'generic-hardening-mode-fast-with-abi-breaks', - 'generic-merged', - 'generic-modules-cxx17-lsv', - 'generic-no-exceptions', - 'generic-no-experimental', - 'generic-no-filesystem', - 'generic-no-localization', - 'generic-no-terminal', - 'generic-no-random_device', - 'generic-no-threads', - 'generic-no-tzdb', - 'generic-no-unicode', - 'generic-no-wide-characters', - 'generic-no-rtti', - 'generic-optimized-speed', - 'generic-static', - 'bootstrapping-build' - ] - machine: [ 'llvm-premerge-libcxx-next-runners' ] - include: - - config: 'generic-cxx26' - machine: llvm-premerge-libcxx-next-runners - - config: 'generic-asan' - machine: llvm-premerge-libcxx-next-runners - - config: 'generic-tsan' - machine: llvm-premerge-libcxx-next-runners - - config: 'generic-ubsan' - machine: llvm-premerge-libcxx-next-runners - # Use a larger machine for MSAN to avoid timeout and memory allocation issues. - - config: 'generic-msan' - machine: llvm-premerge-libcxx-next-runners - runs-on: ${{ matrix.machine }} - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: ${{ matrix.config }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: clang-22 - CXX: clang++-22 - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: always() - with: - name: ${{ matrix.config }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* + # stage1: + # if: github.repository_owner == 'llvm' + # runs-on: llvm-premerge-libcxx-next-runners + # continue-on-error: false + # strategy: + # fail-fast: false + # matrix: + # config: [ + # 'frozen-cxx03-headers', + # 'generic-cxx03', + # 'generic-cxx26', + # 'generic-modules' + # ] + # cc: [ 'clang-22' ] + # cxx: [ 'clang++-22' ] + # include: + # - config: 'generic-gcc' + # cc: 'gcc-15' + # cxx: 'g++-15' + # steps: + # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # - name: ${{ matrix.config }}.${{ matrix.cxx }} + # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + # env: + # CC: ${{ matrix.cc }} + # CXX: ${{ matrix.cxx }} + # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + # if: always() + # with: + # name: ${{ matrix.config }}-${{ matrix.cxx }}-results + # path: | + # **/test-results.xml + # **/*.abilist + # **/CMakeConfigureLog.yaml + # **/CMakeError.log + # **/CMakeOutput.log + # **/crash_diagnostics/* + # stage2: + # if: github.repository_owner == 'llvm' + # runs-on: llvm-premerge-libcxx-next-runners + # needs: [ stage1 ] + # continue-on-error: false + # strategy: + # fail-fast: false + # matrix: + # config: [ + # 'generic-cxx11', + # 'generic-cxx14', + # 'generic-cxx17', + # 'generic-cxx20', + # 'generic-cxx23' + # ] + # cc: [ 'clang-22' ] + # cxx: [ 'clang++-22' ] + # include: + # - config: 'generic-gcc-cxx11' + # cc: 'gcc-15' + # cxx: 'g++-15' + # - config: 'generic-cxx26' + # cc: 'clang-21' + # cxx: 'clang++-21' + # - config: 'generic-cxx26' + # cc: 'clang-20' + # cxx: 'clang++-20' + # steps: + # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # - name: ${{ matrix.config }} + # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + # env: + # CC: ${{ matrix.cc }} + # CXX: ${{ matrix.cxx }} + # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + # if: always() # Upload artifacts even if the build or test suite fails + # with: + # name: ${{ matrix.config }}-${{ matrix.cxx }}-results + # path: | + # **/test-results.xml + # **/*.abilist + # **/CMakeConfigureLog.yaml + # **/CMakeError.log + # **/CMakeOutput.log + # **/crash_diagnostics/* + # stage3: + # if: github.repository_owner == 'llvm' + # needs: [ stage2 ] + # continue-on-error: false + # strategy: + # fail-fast: false + # max-parallel: 8 + # matrix: + # config: [ + # 'generic-abi-unstable', + # 'generic-hardening-mode-debug', + # 'generic-hardening-mode-extensive', + # 'generic-hardening-mode-extensive-observe-semantic', + # 'generic-hardening-mode-fast', + # 'generic-hardening-mode-fast-with-abi-breaks', + # 'generic-merged', + # 'generic-modules-cxx17-lsv', + # 'generic-no-exceptions', + # 'generic-no-experimental', + # 'generic-no-filesystem', + # 'generic-no-localization', + # 'generic-no-terminal', + # 'generic-no-random_device', + # 'generic-no-threads', + # 'generic-no-tzdb', + # 'generic-no-unicode', + # 'generic-no-wide-characters', + # 'generic-no-rtti', + # 'generic-optimized-speed', + # 'generic-static', + # 'bootstrapping-build' + # ] + # machine: [ 'llvm-premerge-libcxx-next-runners' ] + # include: + # - config: 'generic-cxx26' + # machine: llvm-premerge-libcxx-next-runners + # - config: 'generic-asan' + # machine: llvm-premerge-libcxx-next-runners + # - config: 'generic-tsan' + # machine: llvm-premerge-libcxx-next-runners + # - config: 'generic-ubsan' + # machine: llvm-premerge-libcxx-next-runners + # # Use a larger machine for MSAN to avoid timeout and memory allocation issues. + # - config: 'generic-msan' + # machine: llvm-premerge-libcxx-next-runners + # runs-on: ${{ matrix.machine }} + # steps: + # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # - name: ${{ matrix.config }} + # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + # env: + # CC: clang-22 + # CXX: clang++-22 + # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + # if: always() + # with: + # name: ${{ matrix.config }}-results + # path: | + # **/test-results.xml + # **/*.abilist + # **/CMakeConfigureLog.yaml + # **/CMakeError.log + # **/CMakeOutput.log + # **/crash_diagnostics/* - macos: - needs: [ stage2 ] - strategy: - fail-fast: false - matrix: - include: - - config: generic-cxx03 - os: macos-15 - - config: generic-cxx23 - os: macos-15 - - config: generic-modules - os: macos-15 - - config: apple-configuration - os: macos-15 - # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an - # older system-provided libc++.dylib). Doing this properly would require building the test suite on a - # recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an - # older mac. We could do that by e.g. sharing artifacts between the two jobs. - # - # However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only - # alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work - # since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent - # macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional - # coverage. - - config: apple-system - os: macos-15 - - config: apple-system-hardened - os: macos-15 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 - with: - # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md - xcode-version: '26.0' - - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - - name: Build and test - run: | - python3 -m venv .venv - source .venv/bin/activate - python -m pip install psutil - bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: always() # Upload artifacts even if the build or test suite fails - with: - name: macos-${{ matrix.config }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* + # macos: + # needs: [ stage2 ] + # strategy: + # fail-fast: false + # matrix: + # include: + # - config: generic-cxx03 + # os: macos-15 + # - config: generic-cxx23 + # os: macos-15 + # - config: generic-modules + # os: macos-15 + # - config: apple-configuration + # os: macos-15 + # # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an + # # older system-provided libc++.dylib). Doing this properly would require building the test suite on a + # # recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an + # # older mac. We could do that by e.g. sharing artifacts between the two jobs. + # # + # # However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only + # # alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work + # # since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent + # # macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional + # # coverage. + # - config: apple-system + # os: macos-15 + # - config: apple-system-hardened + # os: macos-15 + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + # with: + # # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md + # xcode-version: '26.0' + # - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 + # - name: Build and test + # run: | + # python3 -m venv .venv + # source .venv/bin/activate + # python -m pip install psutil + # bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} + # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + # if: always() # Upload artifacts even if the build or test suite fails + # with: + # name: macos-${{ matrix.config }}-results + # path: | + # **/test-results.xml + # **/*.abilist + # **/CMakeConfigureLog.yaml + # **/CMakeError.log + # **/CMakeOutput.log + # **/crash_diagnostics/* - windows: - needs: [ stage2 ] - strategy: - fail-fast: false - matrix: - include: - - { config: clang-cl-dll, mingw: false } - - { config: clang-cl-static, mingw: false } - - { config: clang-cl-no-vcruntime, mingw: false } - - { config: clang-cl-debug, mingw: false } - - { config: clang-cl-static-crt, mingw: false } - - { config: mingw-dll, mingw: true } - - { config: mingw-static, mingw: true } - - { config: mingw-dll-i686, mingw: true } - - { config: mingw-incomplete-sysroot, mingw: true } - - { config: mingw-static, mingw: true, runner: windows-11-arm } - runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }} - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Install dependencies - run: | - pip install psutil - - name: Install a current LLVM - if: ${{ matrix.mingw != true }} - run: | - choco install -y llvm --version=20.1.8 --allow-downgrade - - name: Install llvm-mingw - if: ${{ matrix.mingw == true }} - run: | - curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip - powershell Expand-Archive llvm-mingw*.zip -DestinationPath . - del llvm-mingw*.zip - mv llvm-mingw* c:\llvm-mingw - echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Simulate a from-scratch build of llvm-mingw - if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} - run: | - rm -r c:\llvm-mingw\include\c++ - rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* - rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* - - name: Add Git Bash to the path - run: | - echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Set up the MSVC dev environment - if: ${{ matrix.mingw != true }} - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - - name: Add the installed Clang at the start of the path - if: ${{ matrix.mingw != true }} - run: | - echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Build and test - run: | - bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} + # windows: + # needs: [ stage2 ] + # strategy: + # fail-fast: false + # matrix: + # include: + # - { config: clang-cl-dll, mingw: false } + # - { config: clang-cl-static, mingw: false } + # - { config: clang-cl-no-vcruntime, mingw: false } + # - { config: clang-cl-debug, mingw: false } + # - { config: clang-cl-static-crt, mingw: false } + # - { config: mingw-dll, mingw: true } + # - { config: mingw-static, mingw: true } + # - { config: mingw-dll-i686, mingw: true } + # - { config: mingw-incomplete-sysroot, mingw: true } + # - { config: mingw-static, mingw: true, runner: windows-11-arm } + # runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }} + # steps: + # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # - name: Install dependencies + # run: | + # pip install psutil + # - name: Install a current LLVM + # if: ${{ matrix.mingw != true }} + # run: | + # choco install -y llvm --version=20.1.8 --allow-downgrade + # - name: Install llvm-mingw + # if: ${{ matrix.mingw == true }} + # run: | + # curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip + # powershell Expand-Archive llvm-mingw*.zip -DestinationPath . + # del llvm-mingw*.zip + # mv llvm-mingw* c:\llvm-mingw + # echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + # - name: Simulate a from-scratch build of llvm-mingw + # if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} + # run: | + # rm -r c:\llvm-mingw\include\c++ + # rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* + # rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* + # - name: Add Git Bash to the path + # run: | + # echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + # - name: Set up the MSVC dev environment + # if: ${{ matrix.mingw != true }} + # uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + # - name: Add the installed Clang at the start of the path + # if: ${{ matrix.mingw != true }} + # run: | + # echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + # - name: Build and test + # run: | + # bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} buildkite_platforms: # needs: [ stage2 ] # TODO: temporarily always trigger From 4ba7bc789c2f0ec2f4c99f7fe15c0b9ca506dc37 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 3 Nov 2025 08:29:33 -1000 Subject: [PATCH 4/7] Setup docker --- .github/workflows/libcxx-build-and-test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 07a1b51e2eb5d..732c0de7e37e9 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -293,6 +293,9 @@ jobs: # needs: [ stage2 ] # TODO: temporarily always trigger runs-on: llvm-premerge-libcxx-next-runners steps: + - name: Set up Docker + uses: docker/setup-docker-action@3fb92d6d9c634363128c8cce4bc3b2826526370a + - name: Trigger Buildkite pipeline uses: buildkite/trigger-pipeline-action@f0dcd5ae74452a8d17d473227c9d212dcc1eb8f9 # v2.4.0 with: From b2171f6dccff8f3d657835c4a5de454eec57c966 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 3 Nov 2025 09:38:15 -1000 Subject: [PATCH 5/7] Run on Ubuntu latest again... --- .github/workflows/libcxx-build-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 732c0de7e37e9..63d125be21001 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -291,7 +291,7 @@ jobs: buildkite_platforms: # needs: [ stage2 ] # TODO: temporarily always trigger - runs-on: llvm-premerge-libcxx-next-runners + runs-on: ubuntu-latest steps: - name: Set up Docker uses: docker/setup-docker-action@3fb92d6d9c634363128c8cce4bc3b2826526370a From 371cec965f3dd444a04df1878cd439441ac32170 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 3 Nov 2025 09:46:15 -1000 Subject: [PATCH 6/7] No need to setup Docker on ubuntu:latest --- .github/workflows/libcxx-build-and-test.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 63d125be21001..37abce16cd0ea 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -293,9 +293,6 @@ jobs: # needs: [ stage2 ] # TODO: temporarily always trigger runs-on: ubuntu-latest steps: - - name: Set up Docker - uses: docker/setup-docker-action@3fb92d6d9c634363128c8cce4bc3b2826526370a - - name: Trigger Buildkite pipeline uses: buildkite/trigger-pipeline-action@f0dcd5ae74452a8d17d473227c9d212dcc1eb8f9 # v2.4.0 with: From c8382703cdb5a545c467e4958f45206d01c068e4 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 3 Nov 2025 09:51:50 -1000 Subject: [PATCH 7/7] Define in another workflow so we can use pull_request_target --- .github/workflows/libcxx-build-and-test.yaml | 515 +++++++++--------- .../workflows/libcxx-trigger-buildkite.yaml | 37 ++ 2 files changed, 288 insertions(+), 264 deletions(-) create mode 100644 .github/workflows/libcxx-trigger-buildkite.yaml diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 37abce16cd0ea..6c8f2cb45ee0a 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -34,270 +34,257 @@ concurrency: cancel-in-progress: true jobs: - # stage1: - # if: github.repository_owner == 'llvm' - # runs-on: llvm-premerge-libcxx-next-runners - # continue-on-error: false - # strategy: - # fail-fast: false - # matrix: - # config: [ - # 'frozen-cxx03-headers', - # 'generic-cxx03', - # 'generic-cxx26', - # 'generic-modules' - # ] - # cc: [ 'clang-22' ] - # cxx: [ 'clang++-22' ] - # include: - # - config: 'generic-gcc' - # cc: 'gcc-15' - # cxx: 'g++-15' - # steps: - # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # - name: ${{ matrix.config }}.${{ matrix.cxx }} - # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - # env: - # CC: ${{ matrix.cc }} - # CXX: ${{ matrix.cxx }} - # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - # if: always() - # with: - # name: ${{ matrix.config }}-${{ matrix.cxx }}-results - # path: | - # **/test-results.xml - # **/*.abilist - # **/CMakeConfigureLog.yaml - # **/CMakeError.log - # **/CMakeOutput.log - # **/crash_diagnostics/* - # stage2: - # if: github.repository_owner == 'llvm' - # runs-on: llvm-premerge-libcxx-next-runners - # needs: [ stage1 ] - # continue-on-error: false - # strategy: - # fail-fast: false - # matrix: - # config: [ - # 'generic-cxx11', - # 'generic-cxx14', - # 'generic-cxx17', - # 'generic-cxx20', - # 'generic-cxx23' - # ] - # cc: [ 'clang-22' ] - # cxx: [ 'clang++-22' ] - # include: - # - config: 'generic-gcc-cxx11' - # cc: 'gcc-15' - # cxx: 'g++-15' - # - config: 'generic-cxx26' - # cc: 'clang-21' - # cxx: 'clang++-21' - # - config: 'generic-cxx26' - # cc: 'clang-20' - # cxx: 'clang++-20' - # steps: - # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # - name: ${{ matrix.config }} - # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - # env: - # CC: ${{ matrix.cc }} - # CXX: ${{ matrix.cxx }} - # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - # if: always() # Upload artifacts even if the build or test suite fails - # with: - # name: ${{ matrix.config }}-${{ matrix.cxx }}-results - # path: | - # **/test-results.xml - # **/*.abilist - # **/CMakeConfigureLog.yaml - # **/CMakeError.log - # **/CMakeOutput.log - # **/crash_diagnostics/* - # stage3: - # if: github.repository_owner == 'llvm' - # needs: [ stage2 ] - # continue-on-error: false - # strategy: - # fail-fast: false - # max-parallel: 8 - # matrix: - # config: [ - # 'generic-abi-unstable', - # 'generic-hardening-mode-debug', - # 'generic-hardening-mode-extensive', - # 'generic-hardening-mode-extensive-observe-semantic', - # 'generic-hardening-mode-fast', - # 'generic-hardening-mode-fast-with-abi-breaks', - # 'generic-merged', - # 'generic-modules-cxx17-lsv', - # 'generic-no-exceptions', - # 'generic-no-experimental', - # 'generic-no-filesystem', - # 'generic-no-localization', - # 'generic-no-terminal', - # 'generic-no-random_device', - # 'generic-no-threads', - # 'generic-no-tzdb', - # 'generic-no-unicode', - # 'generic-no-wide-characters', - # 'generic-no-rtti', - # 'generic-optimized-speed', - # 'generic-static', - # 'bootstrapping-build' - # ] - # machine: [ 'llvm-premerge-libcxx-next-runners' ] - # include: - # - config: 'generic-cxx26' - # machine: llvm-premerge-libcxx-next-runners - # - config: 'generic-asan' - # machine: llvm-premerge-libcxx-next-runners - # - config: 'generic-tsan' - # machine: llvm-premerge-libcxx-next-runners - # - config: 'generic-ubsan' - # machine: llvm-premerge-libcxx-next-runners - # # Use a larger machine for MSAN to avoid timeout and memory allocation issues. - # - config: 'generic-msan' - # machine: llvm-premerge-libcxx-next-runners - # runs-on: ${{ matrix.machine }} - # steps: - # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # - name: ${{ matrix.config }} - # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - # env: - # CC: clang-22 - # CXX: clang++-22 - # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - # if: always() - # with: - # name: ${{ matrix.config }}-results - # path: | - # **/test-results.xml - # **/*.abilist - # **/CMakeConfigureLog.yaml - # **/CMakeError.log - # **/CMakeOutput.log - # **/crash_diagnostics/* - - # macos: - # needs: [ stage2 ] - # strategy: - # fail-fast: false - # matrix: - # include: - # - config: generic-cxx03 - # os: macos-15 - # - config: generic-cxx23 - # os: macos-15 - # - config: generic-modules - # os: macos-15 - # - config: apple-configuration - # os: macos-15 - # # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an - # # older system-provided libc++.dylib). Doing this properly would require building the test suite on a - # # recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an - # # older mac. We could do that by e.g. sharing artifacts between the two jobs. - # # - # # However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only - # # alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work - # # since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent - # # macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional - # # coverage. - # - config: apple-system - # os: macos-15 - # - config: apple-system-hardened - # os: macos-15 - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 - # with: - # # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md - # xcode-version: '26.0' - # - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - # - name: Build and test - # run: | - # python3 -m venv .venv - # source .venv/bin/activate - # python -m pip install psutil - # bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} - # - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - # if: always() # Upload artifacts even if the build or test suite fails - # with: - # name: macos-${{ matrix.config }}-results - # path: | - # **/test-results.xml - # **/*.abilist - # **/CMakeConfigureLog.yaml - # **/CMakeError.log - # **/CMakeOutput.log - # **/crash_diagnostics/* - - # windows: - # needs: [ stage2 ] - # strategy: - # fail-fast: false - # matrix: - # include: - # - { config: clang-cl-dll, mingw: false } - # - { config: clang-cl-static, mingw: false } - # - { config: clang-cl-no-vcruntime, mingw: false } - # - { config: clang-cl-debug, mingw: false } - # - { config: clang-cl-static-crt, mingw: false } - # - { config: mingw-dll, mingw: true } - # - { config: mingw-static, mingw: true } - # - { config: mingw-dll-i686, mingw: true } - # - { config: mingw-incomplete-sysroot, mingw: true } - # - { config: mingw-static, mingw: true, runner: windows-11-arm } - # runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }} - # steps: - # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - # - name: Install dependencies - # run: | - # pip install psutil - # - name: Install a current LLVM - # if: ${{ matrix.mingw != true }} - # run: | - # choco install -y llvm --version=20.1.8 --allow-downgrade - # - name: Install llvm-mingw - # if: ${{ matrix.mingw == true }} - # run: | - # curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip - # powershell Expand-Archive llvm-mingw*.zip -DestinationPath . - # del llvm-mingw*.zip - # mv llvm-mingw* c:\llvm-mingw - # echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - # - name: Simulate a from-scratch build of llvm-mingw - # if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} - # run: | - # rm -r c:\llvm-mingw\include\c++ - # rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* - # rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* - # - name: Add Git Bash to the path - # run: | - # echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - # - name: Set up the MSVC dev environment - # if: ${{ matrix.mingw != true }} - # uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - # - name: Add the installed Clang at the start of the path - # if: ${{ matrix.mingw != true }} - # run: | - # echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - # - name: Build and test - # run: | - # bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} + stage1: + if: github.repository_owner == 'llvm' + runs-on: llvm-premerge-libcxx-next-runners + continue-on-error: false + strategy: + fail-fast: false + matrix: + config: [ + 'frozen-cxx03-headers', + 'generic-cxx03', + 'generic-cxx26', + 'generic-modules' + ] + cc: [ 'clang-22' ] + cxx: [ 'clang++-22' ] + include: + - config: 'generic-gcc' + cc: 'gcc-15' + cxx: 'g++-15' + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: ${{ matrix.config }}.${{ matrix.cxx }} + run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: always() + with: + name: ${{ matrix.config }}-${{ matrix.cxx }}-results + path: | + **/test-results.xml + **/*.abilist + **/CMakeConfigureLog.yaml + **/CMakeError.log + **/CMakeOutput.log + **/crash_diagnostics/* + stage2: + if: github.repository_owner == 'llvm' + runs-on: llvm-premerge-libcxx-next-runners + needs: [ stage1 ] + continue-on-error: false + strategy: + fail-fast: false + matrix: + config: [ + 'generic-cxx11', + 'generic-cxx14', + 'generic-cxx17', + 'generic-cxx20', + 'generic-cxx23' + ] + cc: [ 'clang-22' ] + cxx: [ 'clang++-22' ] + include: + - config: 'generic-gcc-cxx11' + cc: 'gcc-15' + cxx: 'g++-15' + - config: 'generic-cxx26' + cc: 'clang-21' + cxx: 'clang++-21' + - config: 'generic-cxx26' + cc: 'clang-20' + cxx: 'clang++-20' + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: ${{ matrix.config }} + run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: always() # Upload artifacts even if the build or test suite fails + with: + name: ${{ matrix.config }}-${{ matrix.cxx }}-results + path: | + **/test-results.xml + **/*.abilist + **/CMakeConfigureLog.yaml + **/CMakeError.log + **/CMakeOutput.log + **/crash_diagnostics/* + stage3: + if: github.repository_owner == 'llvm' + needs: [ stage2 ] + continue-on-error: false + strategy: + fail-fast: false + max-parallel: 8 + matrix: + config: [ + 'generic-abi-unstable', + 'generic-hardening-mode-debug', + 'generic-hardening-mode-extensive', + 'generic-hardening-mode-extensive-observe-semantic', + 'generic-hardening-mode-fast', + 'generic-hardening-mode-fast-with-abi-breaks', + 'generic-merged', + 'generic-modules-cxx17-lsv', + 'generic-no-exceptions', + 'generic-no-experimental', + 'generic-no-filesystem', + 'generic-no-localization', + 'generic-no-terminal', + 'generic-no-random_device', + 'generic-no-threads', + 'generic-no-tzdb', + 'generic-no-unicode', + 'generic-no-wide-characters', + 'generic-no-rtti', + 'generic-optimized-speed', + 'generic-static', + 'bootstrapping-build' + ] + machine: [ 'llvm-premerge-libcxx-next-runners' ] + include: + - config: 'generic-cxx26' + machine: llvm-premerge-libcxx-next-runners + - config: 'generic-asan' + machine: llvm-premerge-libcxx-next-runners + - config: 'generic-tsan' + machine: llvm-premerge-libcxx-next-runners + - config: 'generic-ubsan' + machine: llvm-premerge-libcxx-next-runners + # Use a larger machine for MSAN to avoid timeout and memory allocation issues. + - config: 'generic-msan' + machine: llvm-premerge-libcxx-next-runners + runs-on: ${{ matrix.machine }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: ${{ matrix.config }} + run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} + env: + CC: clang-22 + CXX: clang++-22 + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: always() + with: + name: ${{ matrix.config }}-results + path: | + **/test-results.xml + **/*.abilist + **/CMakeConfigureLog.yaml + **/CMakeError.log + **/CMakeOutput.log + **/crash_diagnostics/* - buildkite_platforms: - # needs: [ stage2 ] # TODO: temporarily always trigger - runs-on: ubuntu-latest + macos: + needs: [ stage2 ] + strategy: + fail-fast: false + matrix: + include: + - config: generic-cxx03 + os: macos-15 + - config: generic-cxx23 + os: macos-15 + - config: generic-modules + os: macos-15 + - config: apple-configuration + os: macos-15 + # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an + # older system-provided libc++.dylib). Doing this properly would require building the test suite on a + # recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an + # older mac. We could do that by e.g. sharing artifacts between the two jobs. + # + # However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only + # alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work + # since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent + # macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional + # coverage. + - config: apple-system + os: macos-15 + - config: apple-system-hardened + os: macos-15 + runs-on: ${{ matrix.os }} steps: - - name: Trigger Buildkite pipeline - uses: buildkite/trigger-pipeline-action@f0dcd5ae74452a8d17d473227c9d212dcc1eb8f9 # v2.4.0 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + with: + # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md + xcode-version: '26.0' + - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 + - name: Build and test + run: | + python3 -m venv .venv + source .venv/bin/activate + python -m pip install psutil + bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: always() # Upload artifacts even if the build or test suite fails with: - buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} - pipeline: llvm-project/libcxx-ci - branch: ${{ github.ref_name }} - commit: ${{ github.sha }} - message: "Triggered by GitHub Actions PR against ${{ github.ref_name }}" + name: macos-${{ matrix.config }}-results + path: | + **/test-results.xml + **/*.abilist + **/CMakeConfigureLog.yaml + **/CMakeError.log + **/CMakeOutput.log + **/crash_diagnostics/* + + windows: + needs: [ stage2 ] + strategy: + fail-fast: false + matrix: + include: + - { config: clang-cl-dll, mingw: false } + - { config: clang-cl-static, mingw: false } + - { config: clang-cl-no-vcruntime, mingw: false } + - { config: clang-cl-debug, mingw: false } + - { config: clang-cl-static-crt, mingw: false } + - { config: mingw-dll, mingw: true } + - { config: mingw-static, mingw: true } + - { config: mingw-dll-i686, mingw: true } + - { config: mingw-incomplete-sysroot, mingw: true } + - { config: mingw-static, mingw: true, runner: windows-11-arm } + runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Install dependencies + run: | + pip install psutil + - name: Install a current LLVM + if: ${{ matrix.mingw != true }} + run: | + choco install -y llvm --version=20.1.8 --allow-downgrade + - name: Install llvm-mingw + if: ${{ matrix.mingw == true }} + run: | + curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip + powershell Expand-Archive llvm-mingw*.zip -DestinationPath . + del llvm-mingw*.zip + mv llvm-mingw* c:\llvm-mingw + echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + - name: Simulate a from-scratch build of llvm-mingw + if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} + run: | + rm -r c:\llvm-mingw\include\c++ + rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* + rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* + - name: Add Git Bash to the path + run: | + echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + - name: Set up the MSVC dev environment + if: ${{ matrix.mingw != true }} + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + - name: Add the installed Clang at the start of the path + if: ${{ matrix.mingw != true }} + run: | + echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + - name: Build and test + run: | + bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} diff --git a/.github/workflows/libcxx-trigger-buildkite.yaml b/.github/workflows/libcxx-trigger-buildkite.yaml new file mode 100644 index 0000000000000..d274f027838c7 --- /dev/null +++ b/.github/workflows/libcxx-trigger-buildkite.yaml @@ -0,0 +1,37 @@ +# This workflow triggers the Buildkite pipeline for libc++. +# +# The Buildkite pipeline implements pre-commit CI checks on platforms +# where the Github actions runner can't be used. + +name: "[libc++] Trigger Buildkite pipeline" +on: + pull_request_target: + paths: + - 'libcxx/**' + - 'libcxxabi/**' + - 'libunwind/**' + - 'runtimes/**' + - 'cmake/**' + schedule: + # Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern) + - cron: '0 8 * * *' + +permissions: + contents: read # Default everything to read-only + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + trigger_buildkite: + runs-on: ubuntu-latest + steps: + - name: Trigger Buildkite pipeline + uses: buildkite/trigger-pipeline-action@f0dcd5ae74452a8d17d473227c9d212dcc1eb8f9 # v2.4.0 + with: + buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} + pipeline: llvm-project/libcxx-ci + branch: ${{ github.ref_name }} + commit: ${{ github.sha }} + message: "Triggered by GitHub Actions PR against ${{ github.ref_name }}"