[libcxx] [llvm] WIP: Experiment with improving the buildkite triggering (PR #122468)
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 07:24:23 PST 2025
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/122468
>From d2306251f8f196802b5f3d57a8a7bc09e753487e Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 10 Jan 2025 10:03:45 -0500
Subject: [PATCH 1/4] WIP: Experiment with improving the buildkite triggering
---
.ci/generate-buildkite-pipeline-premerge | 18 ------------------
.github/workflows/libcxx-build-and-test.yaml | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge
index 9d9ca321839449..a82a1cee8696e4 100755
--- a/.ci/generate-buildkite-pipeline-premerge
+++ b/.ci/generate-buildkite-pipeline-premerge
@@ -54,24 +54,6 @@ echo "$modified_dirs" >&2
. ./.ci/compute-projects.sh
-# Project specific pipelines.
-
-# If libc++ or one of the runtimes directories changed.
-if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then
- cat <<EOF
-- trigger: "libcxx-ci"
- build:
- message: "${buildMessage}"
- commit: "${BUILDKITE_COMMIT}"
- branch: "${BUILDKITE_BRANCH}"
-EOF
-fi
-
-# Generic pipeline for projects that have not defined custom steps.
-#
-# Individual projects should instead define the pre-commit CI tests that suits their
-# needs while letting them run on the infrastructure provided by LLVM.
-
# Figure out which projects need to be built on each platform
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index a28bf4d5daf6d5..ea87b5f0bba846 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -275,3 +275,20 @@ jobs:
- name: Build and test
run: |
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+
+ # Some smaller platforms provide
+ buildkite:
+ # needs: [ stage1 ]
+ steps:
+ - uses: "buildkite/trigger-pipeline-action at v2.3.0"
+ with:
+ buildkite_api_access_token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
+ pipeline: "llvm-project/libcxx-ci"
+ branch: "main"
+ commit: "HEAD"
+ message: ":github: Triggered from a GitHub Action"
+ ignore_pipeline_branch_filter: true
+ send_pull_request: true
+ wait: true
+ wait_interval: 10
+ wait_timeout: 300
>From 6abcc3442a9ce19eb5b619c243c35e042e6db589 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 10 Jan 2025 10:05:10 -0500
Subject: [PATCH 2/4] Touch libcxx file
---
libcxx/foo | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 libcxx/foo
diff --git a/libcxx/foo b/libcxx/foo
new file mode 100644
index 00000000000000..e69de29bb2d1d6
>From 64900844a24bddf6901e7439d9af9acfe606d948 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 10 Jan 2025 10:08:54 -0500
Subject: [PATCH 3/4] WIP
---
.ci/generate-buildkite-pipeline-premerge | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge
index a82a1cee8696e4..7e943f3169773f 100755
--- a/.ci/generate-buildkite-pipeline-premerge
+++ b/.ci/generate-buildkite-pipeline-premerge
@@ -54,6 +54,17 @@ echo "$modified_dirs" >&2
. ./.ci/compute-projects.sh
+# If libc++ or one of the runtimes directories changed.
+if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then
+ cat <<EOF
+- trigger: "libcxx-ci"
+ build:
+ message: "${buildMessage}"
+ commit: "${BUILDKITE_COMMIT}"
+ branch: "${BUILDKITE_BRANCH}"
+EOF
+fi
+
# Figure out which projects need to be built on each platform
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"
>From e8a8f6eff9328772055843dd95530c50caf77e4c Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 10 Jan 2025 10:24:09 -0500
Subject: [PATCH 4/4] Try triggering bk pipeline
---
.ci/generate-buildkite-pipeline-premerge | 11 -
.github/workflows/libcxx-build-and-test.yaml | 249 +------------------
2 files changed, 3 insertions(+), 257 deletions(-)
diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge
index 7e943f3169773f..a82a1cee8696e4 100755
--- a/.ci/generate-buildkite-pipeline-premerge
+++ b/.ci/generate-buildkite-pipeline-premerge
@@ -54,17 +54,6 @@ echo "$modified_dirs" >&2
. ./.ci/compute-projects.sh
-# If libc++ or one of the runtimes directories changed.
-if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then
- cat <<EOF
-- trigger: "libcxx-ci"
- build:
- message: "${buildMessage}"
- commit: "${BUILDKITE_COMMIT}"
- branch: "${BUILDKITE_BRANCH}"
-EOF
-fi
-
# Figure out which projects need to be built on each platform
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index ea87b5f0bba846..eb0f99af4621f0 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -34,255 +34,12 @@ concurrency:
cancel-in-progress: true
jobs:
- stage1:
- if: github.repository_owner == 'llvm'
- runs-on: libcxx-self-hosted-linux
- container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
- continue-on-error: false
- strategy:
- fail-fast: false
- matrix:
- config: [
- 'frozen-cxx03-headers',
- 'generic-cxx03',
- 'generic-cxx26',
- 'generic-modules'
- ]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
- include:
- - config: 'generic-gcc'
- cc: 'gcc-14'
- cxx: 'g++-14'
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}.${{ matrix.cxx }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- 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: libcxx-self-hosted-linux
- container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
- needs: [ stage1 ]
- continue-on-error: false
- strategy:
- fail-fast: false
- matrix:
- config: [
- 'generic-cxx11',
- 'generic-cxx14',
- 'generic-cxx17',
- 'generic-cxx20',
- 'generic-cxx23'
- ]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
- include:
- - config: 'generic-gcc-cxx11'
- cc: 'gcc-14'
- cxx: 'g++-14'
- - config: 'generic-cxx23'
- cc: 'clang-17'
- cxx: 'clang++-17'
- - config: 'generic-cxx26'
- cc: 'clang-18'
- cxx: 'clang++-18'
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- 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: [ stage1, 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-fast',
- 'generic-hardening-mode-fast-with-abi-breaks',
- 'generic-merged',
- 'generic-modules-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: [ 'libcxx-self-hosted-linux' ]
- include:
- - config: 'generic-cxx26'
- machine: libcxx-self-hosted-linux
- - config: 'generic-asan'
- machine: libcxx-self-hosted-linux
- - config: 'generic-tsan'
- machine: libcxx-self-hosted-linux
- - config: 'generic-ubsan'
- machine: libcxx-self-hosted-linux
- # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
- - config: 'generic-msan'
- machine: libcxx-self-hosted-linux
- runs-on: ${{ matrix.machine }}
- container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: clang-19
- CXX: clang++-19
- - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- if: always()
- with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeConfigureLog.yaml
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
-
- macos:
- needs: [ stage1 ]
- 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
- - config: apple-system
- os: macos-13
- - config: apple-system-hardened
- os: macos-13
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout at v4
- - uses: maxim-lobanov/setup-xcode at v1
- with:
- xcode-version: 'latest'
- - uses: seanmiddleditch/gha-setup-ninja at master
- - 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 at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- 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:
- runs-on: windows-2022
- needs: [ stage1 ]
- 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 }
- steps:
- - uses: actions/checkout at v4
- - name: Install dependencies
- run: |
- choco install -y ninja
- pip install psutil
- - name: Install a current LLVM
- if: ${{ matrix.mingw != true }}
- run: |
- choco install -y llvm --version=18.1.6 --allow-downgrade
- - name: Install llvm-mingw
- if: ${{ matrix.mingw == true }}
- run: |
- curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240606/llvm-mingw-20240606-ucrt-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 at v1
- - name: Build and test
- run: |
- bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
-
- # Some smaller platforms provide
buildkite:
- # needs: [ stage1 ]
steps:
- - uses: "buildkite/trigger-pipeline-action at v2.3.0"
+ - name: "Trigger a Buildkite Build"
+ uses: "buildkite/trigger-pipeline-action at v2.3.0"
with:
- buildkite_api_access_token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
+ buildkite_api_access_token: ${{ secrets.LIBCXX_CI_BUILDKITE_PIPELINE_ACCESS_TOKEN }}
pipeline: "llvm-project/libcxx-ci"
branch: "main"
commit: "HEAD"
More information about the llvm-commits
mailing list