Clang 21 #1130
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
# Cancel the current workflow if a newer commit gets pushed to the | |
# branch or PR that triggered it. | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
linux-gcc: | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
gcc_version: [9, 10, 11, 12, 13, 14] | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
env: | |
CC: gcc-${{ matrix.gcc_version }} | |
CXX: g++-${{ matrix.gcc_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install compiler | |
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }} | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: build qthreads | |
run: | | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
pushd build | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
linux-clang: | |
runs-on: ubuntu-24.04 | |
container: ubuntu:25.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
clang_version: [14, 15, 16, 17, 18, 19, 20] | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
include: | |
- clang_version: 14 | |
gcc_version: 11 | |
- clang_version: 15 | |
gcc_version: 12 | |
- clang_version: 16 | |
gcc_version: 13 | |
- clang_version: 17 | |
gcc_version: 13 | |
- clang_version: 18 | |
gcc_version: 13 | |
- clang_version: 19 | |
gcc_version: 14 | |
- clang_version: 20 | |
gcc_version: 15 | |
env: | |
CC: clang-${{ matrix.clang_version }} | |
CXX: clang++-${{ matrix.clang_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: container prerequisites | |
run: | | |
# some additional setup steps are only needed when running in a container. | |
# These end up being no-ops in the github actions images. | |
apt-get update | |
apt-get install -y sudo wget software-properties-common cmake | |
- name: install gcc | |
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }} | |
- name: install clang | |
run: sudo apt-get install clang-${{ matrix.clang_version }} | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: build qthreads | |
run: | | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
pushd build | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
linux-icx: | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
env: | |
CC: icx | |
CXX: icpx | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: install gcc | |
run: | | |
sudo apt-get install gcc-14 g++-14 | |
- name: install icx | |
run: | | |
wget -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add - && break || sleep 1 | |
sudo apt-add-repository 'deb https://apt.repos.intel.com/oneapi all main' && break || sleep 1 | |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2025.1 | |
source /opt/intel/oneapi/setvars.sh | |
icx -v | |
- name: build qthreads | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
pushd build | |
source /opt/intel/oneapi/setvars.sh | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
linux-icc: | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
env: | |
CC: icc | |
CXX: icpc | |
CFLAGS: "-diag-disable=10441" | |
CXXFLAGS: "-diag-disable=10441" | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: install gcc | |
run: | | |
sudo apt-get install gcc-12 g++-12 # last compatible gcc version for icpc | |
- name: install icc | |
run: | | |
wget -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add - && break || sleep 1 | |
sudo apt-add-repository 'deb https://apt.repos.intel.com/oneapi all main' && break || sleep 1 | |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.4 | |
source /opt/intel/oneapi/setvars.sh | |
icc -v | |
- name: build qthreads | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
pushd build | |
source /opt/intel/oneapi/setvars.sh | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
linux-aocc: | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
env: | |
CC: clang | |
CXX: clang++ | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: install gcc | |
run: | | |
sudo apt-get install gcc-13 g++-13 | |
- name: install aocc | |
run: | | |
wget -nv -O aocc.deb https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0_1_amd64.deb | |
sudo apt install -y ./aocc.deb | |
clang -v | |
- name: build qthreads | |
run: | | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
pushd build | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
mac: | |
continue-on-error: true | |
strategy: | |
matrix: | |
image: [macos-15, macos-13] # Test on both ARM and X86 | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
build_type: [Release, Debug] | |
compiler: [gcc, clang] | |
runs-on: ${{ matrix.image }} | |
env: | |
QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install deps | |
run: | | |
brew install coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads. | |
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then brew install gcc; fi | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
brew install hwloc | |
hwloc-ls --version | |
- name: build qthreads | |
run: | | |
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then export CC=gcc && export CXX=g++ ; fi | |
export CFLAGS="-I$(brew --prefix)/include $CFLAGS" | |
export CXXFLAGS="-I$(brew --prefix)/include $CXXFLAGS" | |
export LDFLAGS="-L$(brew --prefix)/lib $LDFLAGS" | |
mkdir build | |
pushd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j3 VERBOSE=1 | |
popd | |
- name: run tests | |
run: | | |
# commented example for how to get a backtrace from CI usign lldb on OSX: | |
#echo "settings set target.process.stop-on-exec false" > ~/.lldbinit | |
#QT_NUM_SHEPHERDS=2 QT_NUM_WORKERS_PER_SHEPHERD=1 lldb bash --batch --one-line 'process launch' --one-line-on-crash 'bt' --one-line-on-crash 'quit' -- test/basics/hello_world | |
pushd build | |
CTEST_OUTPUT_ON_FAILURE=1 gtimeout -k 10s --foreground 12m make test VERBOSE=1 | |
popd | |
timeout-minutes: 13 | |
sanitizers: | |
runs-on: ubuntu-24.04 | |
container: ubuntu:25.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
sanitizer: [address, memory, thread, undefined] | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. | |
exclude: | |
- sanitizer: memory | |
topology: hwloc | |
- sanitizer: memory | |
topology: binders | |
- sanitizer: thread | |
scheduler: sherwood | |
- sanitizer: thread | |
scheduler: distrib | |
- sanitizer: thread | |
topology: hwloc | |
- sanitizer: thread | |
topology: binders | |
env: | |
CC: clang-21 | |
CXX: clang++-21 | |
CFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all" | |
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) || format('-fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) }} | |
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all" | |
QTHREAD_STACK_SIZE: 2097152 | |
ASAN_OPTIONS: "check_initialization_order=1" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: container prerequisites | |
run: | | |
# some additional setup steps are only needed when running in a container. | |
# These end up being no-ops in the github actions images. | |
apt-get update | |
apt-get install -y sudo wget software-properties-common cmake | |
- if: ${{ ! matrix.use_libcxx }} | |
run: | | |
sudo apt-get install -y gcc-15 g++-15 | |
- name: install compiler | |
run: | | |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
sudo apt-add-repository 'deb https://apt.llvm.org/plucky/ llvm-toolchain-plucky-21 main' && break || sleep 1 | |
sudo apt-get install -y clang-21 | |
- if: ${{ matrix.use_libcxx }} | |
run: sudo apt-get install -y libc++-21-dev libc++abi-21-dev | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install -y hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: build qthreads | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
- name: run tests | |
run: | | |
cd build | |
if [ "${{ matrix.sanitizer }}" = "thread" ]; then cd test/basics; fi | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 18m make test VERBOSE=1 | |
timeout-minutes: 19 | |
linux-thorough: | |
runs-on: ubuntu-24.04 | |
container: ubuntu:25.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
compiler: [gcc, clang] | |
scheduler: [nemesis, sherwood, distrib] | |
topology: [hwloc, binders, no] | |
use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. | |
build_type: [Release, Debug] | |
exclude: | |
- compiler: gcc | |
use_libcxx: true | |
env: | |
CC: ${{ matrix.compiler == 'gcc' && 'gcc-15' || 'clang-21' }} | |
CXX: ${{ matrix.compiler == 'gcc' && 'g++-15' || 'clang++-21' }} | |
CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }} | |
QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: container prerequisites | |
run: | | |
# some additional setup steps are only needed when running in a container. | |
# These end up being no-ops in the github actions images. | |
apt-get update | |
apt-get install -y sudo wget software-properties-common cmake | |
- run: | | |
sudo apt-get install -y gcc-15 g++-15 | |
- if: ${{ matrix.compiler == 'clang' }} | |
run: | | |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
sudo apt-add-repository 'deb https://apt.llvm.org/plucky/ llvm-toolchain-plucky-21 main' && break || sleep 1 | |
sudo apt-get install -y clang-21 | |
- if: ${{ matrix.use_libcxx }} | |
run: sudo apt-get install -y libc++-21-dev libc++abi-21-dev | |
- if: ${{ matrix.topology != 'no' }} | |
run: | | |
sudo apt-get install -y hwloc libhwloc-dev | |
hwloc-ls --version | |
- name: build qthreads | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} .. | |
make -j2 VERBOSE=1 | |
- name: run tests | |
run: | | |
cd build | |
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 18m make test VERBOSE=1 | |
timeout-minutes: 19 | |
clang-format: | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
env: | |
CC: 'clang-21' | |
CXX: 'clang++-21' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1 | |
sudo apt-add-repository 'deb https://apt.llvm.org/noble/ llvm-toolchain-noble-21 main' && break || sleep 1 | |
sudo apt-get install clang-format-21 | |
- name: check formatting | |
run: | | |
clang-format --version | |
sh clang-format.sh | |
git --no-pager diff | |
if [[ $(git --no-pager diff) ]]; then echo "need to rerun clang-format"; exit 1; fi |