[libcxx-commits] [libcxx] [llvm] [libc++][CI] Test with variables for compiler versions. (PR #124419)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 25 10:04:32 PST 2025
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/124419
>From eaa1932b38c6c9c2c30f4f4d97081c8cdec7a7e1 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Sat, 25 Jan 2025 18:13:27 +0100
Subject: [PATCH 1/3] [libc++][CI] Test with variables for compiler versions.
---
.github/workflows/libcxx-build-and-test.yaml | 221 +------------------
libcxx/delete_me | 0
2 files changed, 11 insertions(+), 210 deletions(-)
create mode 100644 libcxx/delete_me
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index a28bf4d5daf6d5..effc4112eb6781 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -33,6 +33,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
+env:
+ LLVM_VERSION_HEAD: 19
+ LLVM_VERSION_RELEASE: 18
+ LLVM_VERSION_RELEASE_1: 17
+ LLVM_VERSION_RELEASE_2: 16
+ GCC_VERSION_RELEASE: 14
+
jobs:
stage1:
if: github.repository_owner == 'llvm'
@@ -43,17 +50,14 @@ jobs:
fail-fast: false
matrix:
config: [
- 'frozen-cxx03-headers',
- 'generic-cxx03',
- 'generic-cxx26',
- 'generic-modules'
+ 'generic-cxx26'
]
- cc: [ 'clang-19' ]
+ cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
include:
- config: 'generic-gcc'
- cc: 'gcc-14'
- cxx: 'g++-14'
+ cc: ${{ format('gcc-{0}', env.GCC_VERSION_RELEASE) }}
+ cxx: ${{ format('g++-{0}', env.GCC_VERSION_RELEASE) }}
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}.${{ matrix.cxx }}
@@ -72,206 +76,3 @@ jobs:
**/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 }}
diff --git a/libcxx/delete_me b/libcxx/delete_me
new file mode 100644
index 00000000000000..e69de29bb2d1d6
>From f515669419f040a67f2bd72c3d029fdb25a853ed Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Sat, 25 Jan 2025 18:52:53 +0100
Subject: [PATCH 2/3] revert to test a stable state.
---
.github/workflows/libcxx-build-and-test.yaml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index effc4112eb6781..eb201485acdd83 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -54,10 +54,6 @@ jobs:
]
cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
- include:
- - config: 'generic-gcc'
- cc: ${{ format('gcc-{0}', env.GCC_VERSION_RELEASE) }}
- cxx: ${{ format('g++-{0}', env.GCC_VERSION_RELEASE) }}
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}.${{ matrix.cxx }}
>From 845f87787a23c9848c27850f702b3e7555fb13a1 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Sat, 25 Jan 2025 18:58:07 +0100
Subject: [PATCH 3/3] another test
---
.github/workflows/libcxx-build-and-test.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index eb201485acdd83..42943ea2ad5b62 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -53,7 +53,8 @@ jobs:
'generic-cxx26'
]
cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
+ cxx: [ "clang++-${{ env.LLVM_VERSION_HEAD }}" ]
+
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}.${{ matrix.cxx }}
More information about the libcxx-commits
mailing list