Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch CI Builds To CMake #323

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 114 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ jobs:
- run: |
sudo apt-add-repository -y universe
sudo apt-get install -y gcc-14 g++-14
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y cmake
sudo apt-get install -y hwloc libhwloc-dev
- run: |
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> --with-topology=<< parameters.topology >>
make -j2
make tests -j2
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
popd
- run:
command: timeout --foreground -k 10s 2m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
command: |
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 2m make test VERBOSE=1
popd
no_output_timeout: 180s

arm_clang:
Expand All @@ -47,18 +51,22 @@ jobs:
- run: |
sudo apt-add-repository -y universe
sudo apt-get install -y gcc-14 g++-14
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y cmake
sudo apt-get install -y hwloc libhwloc-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
sudo apt-get install -y clang-19
- run: |
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
make tests -j2
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
popd
- run:
command: timeout --foreground -k 10s 2m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
command: |
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 2m make test VERBOSE=1
popd
no_output_timeout: 180s

arm_sanitizers:
Expand All @@ -85,22 +93,23 @@ jobs:
- run: |
sudo apt-add-repository -y universe
sudo apt-get install -y gcc-14 g++-14
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y cmake
sudo apt-get install -y hwloc libhwloc-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
sudo apt-get install -y clang-19
- run: |
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
make tests -j2
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
popd
- run:
command: |
export QTHREADS_DIR="$(pwd)"
pushd build
if [[ "<< parameters.sanitizer >>" == "thread" ]]; then cd test/basics; fi
timeout --foreground -k 10s 4m make check || ( cd $QTHREADS_DIR && cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
no_output_timeout: 120s
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 4m make test VERBOSE=1
no_output_timeout: 180s

arm_acfl:
parameters:
Expand All @@ -117,27 +126,36 @@ jobs:
steps:
- checkout
- run: |
# Set up apt to get a more recent CMake directly from Kitware.
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -y
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y cmake
sudo apt-get install -y hwloc libhwloc-dev
wget -O acfl.tar https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_Ubuntu-22.04_aarch64.tar
wget -O acfl.tar https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_Ubuntu-22.04_aarch64.tar
tar -vxf acfl.tar
./arm-compiler-for-linux_24.04_Ubuntu-22.04/arm-compiler-for-linux_24.04_Ubuntu-22.04.sh -a -f -s acfl
ls
ls arm-compiler-for-linux_24.10.1_Ubuntu-22.04
./arm-compiler-for-linux_24.10.1_Ubuntu-22.04/arm-compiler-for-linux_24.10.1_Ubuntu-22.04.sh -a -f -s acfl
rm acfl.tar
sudo apt install -y ./acfl/gcc-13.2.0_Ubuntu-22.04.deb ./acfl/arm-linux-compiler-24.04_Ubuntu-22.04.deb
ls acfl
sudo apt install -y ./acfl/gcc-14.2.0_Ubuntu-22.04.deb ./acfl/arm-linux-compiler-24.10.1_Ubuntu-22.04.deb
rm -rf acfl
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.04_Ubuntu-22.04/bin
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.10.1_Ubuntu-22.04/bin
armclang -v
- run: |
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.04_Ubuntu-22.04/bin
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
make tests -j2
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.10.1_Ubuntu-22.04/bin
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
popd
- run:
command: |
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.04_Ubuntu-22.04/bin
timeout --foreground -k 10s 4m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
export PATH=$PATH:/opt/arm/arm-linux-compiler-24.10.1_Ubuntu-22.04/bin
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 4m make test VERBOSE=1
popd
no_output_timeout: 180s

nvc:
Expand All @@ -163,20 +181,23 @@ jobs:
if [ ${MACHINE_TYPE} == 'aarch64' ]; then echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/arm64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list; fi
sudo apt-get update -y
sudo apt-get install -y nvhpc-24-9
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y cmake
sudo apt-get install -y hwloc libhwloc-dev
- run: |
export MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_x86_64/24.9/compilers/bin"; fi
if [ ${MACHINE_TYPE} == 'aarch64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_aarch64/24.9/compilers/bin"; fi
nvc --version
./autogen.sh
./configure --enable-picky --disable-fastcontext --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
make tests -j2
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
popd
- run:
command: |
timeout --foreground -k 10s 4m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 4m make test VERBOSE=1
popd
no_output_timeout: 180s

musl:
Expand All @@ -187,20 +208,28 @@ jobs:
type: string
topology:
type: string
compiler:
type: string
docker:
- image: alpine:latest
resource_class: << parameters.worker_type >>
steps:
- checkout
- run: |
apk add --no-cache --no-progress bash make musl-dev hwloc-dev libtool autoconf automake gcc g++
apk add --no-cache --no-progress bash make musl-dev hwloc-dev cmake gcc g++
if [ "<< parameters.compiler >>" == "clang" ]; then apk add clang; fi
- run: |
bash autogen.sh
bash configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
make tests -j2
if [ "<< parameters.compiler >>" == "clang" ]; then export CC=clang && export CXX=clang++; fi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
make -j2 VERBOSE=1
cd ..
- run:
command: make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
command: |
cd build
CTEST_OUTPUT_ON_FAILURE=1 make test VERBOSE=1
cd ..
no_output_timeout: 180s

workflows:
Expand Down Expand Up @@ -276,29 +305,70 @@ workflows:
worker_type: [medium, arm.medium]
scheduler: [nemesis, sherwood, distrib]
topology: ['no', binders, hwloc]
compiler: [clang, gcc]
exclude:
- worker_type: medium
scheduler: sherwood
topology: binders
compiler: gcc
- worker_type: medium
scheduler: sherwood
topology: hwloc
compiler: gcc
- worker_type: medium
scheduler: distrib
topology: binders
compiler: gcc
- worker_type: medium
scheduler: distrib
topology: hwloc
compiler: gcc
- worker_type: arm.medium
scheduler: sherwood
topology: binders
compiler: gcc
- worker_type: arm.medium
scheduler: sherwood
topology: hwloc
compiler: gcc
- worker_type: arm.medium
scheduler: distrib
topology: binders
compiler: gcc
- worker_type: arm.medium
scheduler: distrib
topology: hwloc
compiler: gcc
- worker_type: medium
scheduler: sherwood
topology: binders
compiler: clang
- worker_type: medium
scheduler: sherwood
topology: hwloc
compiler: clang
- worker_type: medium
scheduler: distrib
topology: binders
compiler: clang
- worker_type: medium
scheduler: distrib
topology: hwloc
compiler: clang
- worker_type: arm.medium
scheduler: sherwood
topology: binders
compiler: clang
- worker_type: arm.medium
scheduler: sherwood
topology: hwloc
compiler: clang
- worker_type: arm.medium
scheduler: distrib
topology: binders
compiler: clang
- worker_type: arm.medium
scheduler: distrib
topology: hwloc
compiler: clang

58 changes: 33 additions & 25 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,24 @@ osx_m1_task:
QTHREADS_SCHEDULER: distrib
QTHREADS_TOPOLOGY: binders
install_deps_script: |
brew install autoconf automake libtool coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads.
brew install cmake coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads.
if [ "$QTHREADS_TOPOLOGY" != "no" ]; then brew install hwloc; fi
build_script: |
export CFLAGS="-g -I$(brew --prefix)/include $CFLAGS"
export CXXFLAGS="-g -I$(brew --prefix)/include $CXXFLAGS"
export LDFLAGS="-g -L$(brew --prefix)/lib $LDFLAGS"
./autogen.sh
./configure --enable-picky --with-scheduler=$QTHREADS_SCHEDULER --with-topology=$QTHREADS_TOPOLOGY
make -j$CIRRUS_CPU
make tests -j$CIRRUS_CPU
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=$QTHREADS_SCHEDULER -DQTHREADS_TOPOLOGY=$QTHREADS_TOPOLOGY ..
make -j$CIRRUS_CPU VERBOSE=1
popd
test_script: |
# 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
gtimeout --foreground 3m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
pushd build
CTEST_OUTPUT_ON_FAILURE=1 gtimeout --foreground 3m make test VERBOSE=1
popd

freebsd_task:
freebsd_instance:
Expand All @@ -59,16 +62,15 @@ freebsd_task:
env:
QTHREADS_SCHEDULER: distrib
install_deps_script: |
pkg install -y bash
pkg install -y llvm autoconf automake libtool
pkg install -y llvm cmake
pkg install -y coreutils # to get gtimeout for CI. The built-in timeout sometimes fails to kill the process.
build_script: |
bash autogen.sh
bash configure --enable-picky --with-scheduler=$QTHREADS_SCHEDULER --with-topology=no
make -j$CIRRUS_CPU
make tests -j$CIRRUS_CPU
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=$QTHREADS_SCHEDULER -DQTHREADS_TOPOLOGY=no -DQTHREADS_CONTEXT_SWAP_IMPL=system ..
make -j$CIRRUS_CPU VERBOSE=1
test_script: |
gtimeout --foreground -k 10s 2m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
CTEST_OUTPUT_ON_FAILURE=1 gtimeout --foreground -k 10s 2m make test VERBOSE=1

arm_linux_task:
arm_container:
Expand All @@ -92,15 +94,18 @@ arm_linux_task:
QTHREADS_TOPOLOGY: no
install_deps_script: |
apt-get update -y
apt-get install -y autoconf automake libtool
apt-get install -y cmake
apt-get install -y hwloc libhwloc-dev
build_script: |
./autogen.sh
./configure --enable-picky --with-scheduler=$QTHREADS_SCHEDULER --with-topology=$QTHREADS_TOPOLOGY
make -j$CIRRUS_CPU
make tests -j$CIRRUS_CPU
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=$QTHREADS_SCHEDULER -DQTHREADS_TOPOLOGY=$QTHREADS_TOPOLOGY ..
make -j$CIRRUS_CPU VERBOSE=1
popd
test_script: |
timeout --foreground -k 10s 5m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 5m make test VERBOSE=1
popd

arm_linux_clang_task:
arm_container:
Expand Down Expand Up @@ -143,13 +148,16 @@ arm_linux_clang_task:
apt-add-repository -y 'deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main'
apt-add-repository -y 'deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main' # Something's buggy upstream but running this twice fixes it.
apt-get install -y clang-19
apt-get install -y autoconf automake libtool
apt-get install -y cmake
apt-get install -y hwloc libhwloc-dev
build_script: |
./autogen.sh
./configure --enable-picky --with-scheduler=$QTHREADS_SCHEDULER --with-topology=$QTHREADS_TOPOLOGY
make -j$CIRRUS_CPU
make tests -j$CIRRUS_CPU
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=$QTHREADS_SCHEDULER -DQTHREADS_TOPOLOGY=$QTHREADS_TOPOLOGY ..
make -j$CIRRUS_CPU VERBOSE=1
popd
test_script: |
timeout --foreground -k 10s 5m make check || ( cat test/basics/test-suite.log && cat test/features/test-suite.log && cat test/stress/test-suite.log && exit 1 )
pushd build
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 5m make test VERBOSE=1
popd

2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros: ['Q_UNUSED', 'STACKLEFT_NOINLINE']
AttributeMacros: ['Q_UNUSED', 'STACKLEFT_NOINLINE', 'API_FUNC']
BinPackArguments: false
BinPackParameters: false
BreakArrays: false
Expand Down
Loading