[libcxx-commits] [libcxx] [llvm] [libc++] Trigger the buildkite CI only if stages 1 and 2 already passed (PR #79209)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 23 13:08:21 PST 2024
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/79209
>From 6b1f11e57f8a6bd00492f371fc172691f07e174c Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Tue, 23 Jan 2024 21:54:38 +0100
Subject: [PATCH] [libc++] Trigger the buildkite CI only if stages 1 and 2
already passed
---
.ci/generate-buildkite-pipeline-premerge | 11 -
.github/workflows/libcxx-build-and-test.yaml | 321 ++++++++++---------
libcxx/include/libcxx_trigger | 0
3 files changed, 166 insertions(+), 166 deletions(-)
create mode 100644 libcxx/include/libcxx_trigger
diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge
index f32eb7213b94027..318b968fbc70256 100755
--- a/.ci/generate-buildkite-pipeline-premerge
+++ b/.ci/generate-buildkite-pipeline-premerge
@@ -197,17 +197,6 @@ function check-targets() {
# 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
-
# If clang changed.
if echo "$modified_dirs" | grep -q -E "^(clang)$"; then
cat <<EOF
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 1666a687aa5d047..38955dafb7e9f02 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -48,162 +48,173 @@ env:
jobs:
- stage1:
+ # stage1:
+ # if: github.repository_owner == 'llvm'
+ # runs-on: libcxx-runners-8-set
+ # continue-on-error: false
+ # strategy:
+ # fail-fast: false
+ # matrix:
+ # config: [
+ # 'generic-cxx03',
+ # 'generic-cxx26',
+ # 'generic-modules'
+ # ]
+ # cc: [ 'clang-18' ]
+ # cxx: [ 'clang++-18' ]
+ # clang_tidy: [ 'ON' ]
+ # include:
+ # - config: 'generic-gcc'
+ # cc: 'gcc-13'
+ # cxx: 'g++-13'
+ # clang_tidy: 'OFF'
+ # 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 }}
+ # ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
+ # - uses: actions/upload-artifact at v3
+ # if: always()
+ # with:
+ # name: ${{ matrix.config }}-${{ matrix.cxx }}-results
+ # path: |
+ # **/test-results.xml
+ # **/*.abilist
+ # **/CMakeError.log
+ # **/CMakeOutput.log
+ # **/crash_diagnostics/*
+ # stage2:
+ # if: github.repository_owner == 'llvm'
+ # runs-on: libcxx-runners-8-set
+ # needs: [ stage1 ]
+ # continue-on-error: false
+ # strategy:
+ # fail-fast: false
+ # matrix:
+ # config: [
+ # 'generic-cxx11',
+ # 'generic-cxx14',
+ # 'generic-cxx17',
+ # 'generic-cxx20',
+ # 'generic-cxx23'
+ # ]
+ # cc: [ 'clang-18' ]
+ # cxx: [ 'clang++-18' ]
+ # clang_tidy: [ 'ON' ]
+ # include:
+ # - config: 'generic-gcc-cxx11'
+ # cc: 'gcc-13'
+ # cxx: 'g++-13'
+ # clang_tidy: 'OFF'
+ # - config: 'generic-cxx23'
+ # cc: 'clang-16'
+ # cxx: 'clang++-16'
+ # clang_tidy: 'OFF'
+ # - config: 'generic-cxx23'
+ # cc: 'clang-17'
+ # cxx: 'clang++-17'
+ # clang_tidy: 'OFF'
+ # steps:
+ # - uses: actions/checkout at v4
+ # - name: ${{ matrix.config }}
+ # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ # env:
+ # CC: ${{ matrix.cc }}
+ # CXX: ${{ matrix.cxx }}
+ # ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
+ # - uses: actions/upload-artifact at v3
+ # if: always() # Upload artifacts even if the build or test suite fails
+ # with:
+ # name: ${{ matrix.config }}-results
+ # path: |
+ # **/test-results.xml
+ # **/*.abilist
+ # **/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-random_device',
+ # 'generic-no-threads',
+ # 'generic-no-tzdb',
+ # 'generic-no-unicode',
+ # 'generic-no-wide-characters',
+ # 'generic-no-rtti',
+ # 'generic-optimized-speed',
+ # 'generic-static',
+ # # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
+ # # or don't provide much value since the benchmark run results are too noise on the bots.
+ # 'benchmarks',
+ # 'bootstrapping-build'
+ # ]
+ # machine: [ 'libcxx-runners-8-set' ]
+ # std_modules: [ 'OFF' ]
+ # include:
+ # - config: 'generic-cxx26'
+ # machine: libcxx-runners-8-set
+ # std_modules: 'ON'
+ # - config: 'generic-asan'
+ # machine: libcxx-runners-8-set
+ # std_modules: 'OFF'
+ # - config: 'generic-tsan'
+ # machine: libcxx-runners-8-set
+ # std_modules: 'OFF'
+ # - config: 'generic-ubsan'
+ # machine: libcxx-runners-8-set
+ # std_modules: 'OFF'
+ # # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
+ # - config: 'generic-msan'
+ # machine: libcxx-runners-8-set
+ # std_modules: 'OFF'
+ # runs-on: ${{ matrix.machine }}
+ # steps:
+ # - uses: actions/checkout at v4
+ # - name: ${{ matrix.config }}
+ # run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ # env:
+ # CC: clang-18
+ # CXX: clang++-18
+ # ENABLE_CLANG_TIDY: "OFF"
+ # ENABLE_STD_MODULES: ${{ matrix.std_modules }}
+ # - uses: actions/upload-artifact at v3
+ # if: always()
+ # with:
+ # name: ${{ matrix.config }}-results
+ # path: |
+ # **/test-results.xml
+ # **/*.abilist
+ # **/CMakeError.log
+ # **/CMakeOutput.log
+ # **/crash_diagnostics/*
+ buildkite-stage:
if: github.repository_owner == 'llvm'
- runs-on: libcxx-runners-8-set
+ runs-on: ubuntu-latest
+ # needs: [ stage1, stage2 ]
continue-on-error: false
- strategy:
- fail-fast: false
- matrix:
- config: [
- 'generic-cxx03',
- 'generic-cxx26',
- 'generic-modules'
- ]
- cc: [ 'clang-18' ]
- cxx: [ 'clang++-18' ]
- clang_tidy: [ 'ON' ]
- include:
- - config: 'generic-gcc'
- cc: 'gcc-13'
- cxx: 'g++-13'
- clang_tidy: 'OFF'
steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}.${{ matrix.cxx }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ - name: Trigger Buildkite Pipeline
+ uses: buildkite/trigger-pipeline-action at v2.0.0
env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- - uses: actions/upload-artifact at v3
- if: always()
- with:
- name: ${{ matrix.config }}-${{ matrix.cxx }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
- stage2:
- if: github.repository_owner == 'llvm'
- runs-on: libcxx-runners-8-set
- needs: [ stage1 ]
- continue-on-error: false
- strategy:
- fail-fast: false
- matrix:
- config: [
- 'generic-cxx11',
- 'generic-cxx14',
- 'generic-cxx17',
- 'generic-cxx20',
- 'generic-cxx23'
- ]
- cc: [ 'clang-18' ]
- cxx: [ 'clang++-18' ]
- clang_tidy: [ 'ON' ]
- include:
- - config: 'generic-gcc-cxx11'
- cc: 'gcc-13'
- cxx: 'g++-13'
- clang_tidy: 'OFF'
- - config: 'generic-cxx23'
- cc: 'clang-16'
- cxx: 'clang++-16'
- clang_tidy: 'OFF'
- - config: 'generic-cxx23'
- cc: 'clang-17'
- cxx: 'clang++-17'
- clang_tidy: 'OFF'
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- - uses: actions/upload-artifact at v3
- if: always() # Upload artifacts even if the build or test suite fails
- with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/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-random_device',
- 'generic-no-threads',
- 'generic-no-tzdb',
- 'generic-no-unicode',
- 'generic-no-wide-characters',
- 'generic-no-rtti',
- 'generic-optimized-speed',
- 'generic-static',
- # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
- # or don't provide much value since the benchmark run results are too noise on the bots.
- 'benchmarks',
- 'bootstrapping-build'
- ]
- machine: [ 'libcxx-runners-8-set' ]
- std_modules: [ 'OFF' ]
- include:
- - config: 'generic-cxx26'
- machine: libcxx-runners-8-set
- std_modules: 'ON'
- - config: 'generic-asan'
- machine: libcxx-runners-8-set
- std_modules: 'OFF'
- - config: 'generic-tsan'
- machine: libcxx-runners-8-set
- std_modules: 'OFF'
- - config: 'generic-ubsan'
- machine: libcxx-runners-8-set
- std_modules: 'OFF'
- # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
- - config: 'generic-msan'
- machine: libcxx-runners-8-set
- std_modules: 'OFF'
- runs-on: ${{ matrix.machine }}
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: clang-18
- CXX: clang++-18
- ENABLE_CLANG_TIDY: "OFF"
- ENABLE_STD_MODULES: ${{ matrix.std_modules }}
- - uses: actions/upload-artifact at v3
- if: always()
- with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
+ BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
+ PIPELINE: "llvm-project/libcxx-ci"
diff --git a/libcxx/include/libcxx_trigger b/libcxx/include/libcxx_trigger
new file mode 100644
index 000000000000000..e69de29bb2d1d64
More information about the libcxx-commits
mailing list