From 71fd23d7e09c4eada00f844d348d9e895d522c25 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 09:37:47 -0600 Subject: [PATCH 01/22] Run ci tests on pull requests. --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3afc29dc6..f8c642a68 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,6 +4,7 @@ on: push: branches: [ main ] pull_request: + branches: [ main ] jobs: linux_make_check: From da2c14e24b5a0338909e8a45fae9967e49548ef3 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 09:23:04 -0600 Subject: [PATCH 02/22] Timeout for gh actions ci builds to enable catching hung tests. --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f8c642a68..ba398bea5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,7 +26,7 @@ jobs: make - name: make check run: | - make check + timeout --foreground 3m make check mac_build: runs-on: macos-latest @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - name: install deps run: | - brew install autoconf automake libtool + brew install autoconf automake libtool coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads. - name: install hwloc run: | brew install hwloc @@ -45,6 +45,6 @@ jobs: ./configure --enable-picky make ## Currently hangs on OSX -- https://github.com/Qthreads/qthreads/issues/59 -# - name: make check -# run: | -# make check + - name: make check + run: | + gtimeout --foreground 8m make check From 902e522005f8068602e0d17353aa05d82d8ebcb8 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 10:16:07 -0600 Subject: [PATCH 03/22] Enable parallel builds in CI. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ba398bea5..135a72b58 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: run: | ./autogen.sh ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} - make + make -j2 - name: make check run: | timeout --foreground 3m make check @@ -43,7 +43,7 @@ jobs: run: | ./autogen.sh ./configure --enable-picky - make + make -j3 ## Currently hangs on OSX -- https://github.com/Qthreads/qthreads/issues/59 - name: make check run: | From 5f696070de5ebb046c24eb137c52511fdc91d8a1 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 10:57:06 -0600 Subject: [PATCH 04/22] Pin the ubuntu version for CI. This is to prevent getting a bunch of failures about missing compilers whenever ubuntu-latest gets updated to a newer version. Instead, when a new LTS version gets released we should update the CI configuration and the compilers being tested accordingly. --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 135a72b58..6de055a72 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,7 +8,7 @@ on: jobs: linux_make_check: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: scheduler: [nemesis, sherwood] From 98d6e22d0a6dcc9ce7a6bf10c5c3bc4b23aecfab Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 10:49:10 -0600 Subject: [PATCH 05/22] Expand matrix to test across recent gcc versions. --- .github/workflows/CI.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6de055a72..accd1649d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,10 +11,17 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: + compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] + env: + CC: ${{ matrix.compiler }} steps: - uses: actions/checkout@v2 + - if: ${{ matrix.compiler == 'gcc-13' }} + run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 + - name: install gcc + run: sudo apt-get install ${{ matrix.compiler }} - name: install hwloc run: | sudo apt-get install hwloc libhwloc-dev From 1c9c2a7258b5a19867f04e8dbda6df2baad78667 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 11:36:32 -0600 Subject: [PATCH 06/22] Switch to checkout v3 to clear warnings about using an old node version. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index accd1649d..76e5ad026 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,7 +17,7 @@ jobs: env: CC: ${{ matrix.compiler }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - if: ${{ matrix.compiler == 'gcc-13' }} run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 - name: install gcc @@ -38,7 +38,7 @@ jobs: mac_build: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install deps run: | brew install autoconf automake libtool coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads. From 0cc1a9fa07b457e70c2d9e9e8ef8e9ce061f9939 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 12:09:26 -0600 Subject: [PATCH 07/22] Add builds with recent clang versions. --- .github/workflows/CI.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 76e5ad026..295b9c681 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13] + compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, clang-17] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] env: @@ -20,7 +20,15 @@ jobs: - uses: actions/checkout@v3 - if: ${{ matrix.compiler == 'gcc-13' }} run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 - - name: install gcc + - if: ${{ matrix.compiler == 'clang-16' }} + 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/jammy/ llvm-toolchain-jammy-16 main' && break || sleep 1 + - if: ${{ matrix.compiler == 'clang-17' }} + 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 + - name: install compiler run: sudo apt-get install ${{ matrix.compiler }} - name: install hwloc run: | From 26bf4b512768a74583c3d0d389e6afbe8852bc52 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 19 Oct 2023 12:28:58 -0600 Subject: [PATCH 08/22] Don't let a failed build prevent others from running. --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 295b9c681..5385ffe6a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,6 +9,7 @@ on: jobs: linux_make_check: runs-on: ubuntu-22.04 + continue-on-error: true strategy: matrix: compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, clang-17] From b6c66c3ad70156674b893b76d0a1444cd1e5f150 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Fri, 20 Oct 2023 08:18:07 -0600 Subject: [PATCH 09/22] Add sanitizer builds. --- .github/workflows/CI.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5385ffe6a..1cafff336 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -64,3 +64,35 @@ jobs: - name: make check run: | gtimeout --foreground 8m make check + + sanitizers: + runs-on: ubuntu-22.04 + continue-on-error: true + strategy: + matrix: + sanitizer: [address, memory, thread, undefined] + scheduler: [nemesis, sherwood] + topology: [hwloc, binders, no] + env: + CC: clang-17 + CFLAGS: "-fsanitize=${{ matrix.sanitizer }}" + LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}" + steps: + - uses: actions/checkout@v3 + - name: install compiler + 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 + sudo apt-get install clang-17 + - name: install hwloc + run: | + sudo apt-get install hwloc libhwloc-dev + hwloc-ls --version + - name: build qthreads + run: | + ./autogen.sh + ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} + make -j2 + - name: make check + run: | + timeout --foreground 6m make check From f52de838347f5ede882c4efba6dd9cfebf4944f2 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Fri, 20 Oct 2023 08:23:59 -0600 Subject: [PATCH 10/22] Remove outdated comment. --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1cafff336..b3fbfc420 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -60,7 +60,6 @@ jobs: ./autogen.sh ./configure --enable-picky make -j3 -## Currently hangs on OSX -- https://github.com/Qthreads/qthreads/issues/59 - name: make check run: | gtimeout --foreground 8m make check From 3aaf720add025ab1041f292d91b9363ab6c2abd8 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Fri, 20 Oct 2023 08:26:21 -0600 Subject: [PATCH 11/22] In CI, only install hwloc if it's needed. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b3fbfc420..e39094dfd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,7 +31,7 @@ jobs: sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 - name: install compiler run: sudo apt-get install ${{ matrix.compiler }} - - name: install hwloc + - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev hwloc-ls --version @@ -83,7 +83,7 @@ jobs: 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 sudo apt-get install clang-17 - - name: install hwloc + - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev hwloc-ls --version From c18efd06b6bcf0efb93a0257eb11fdcc5c68772d Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Mon, 23 Oct 2023 08:55:22 -0600 Subject: [PATCH 12/22] Use the correct C++ compiler for the sanitizer builds. This fixes a lingering linker error in one of the tests. --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e39094dfd..4d9f49a11 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -74,7 +74,9 @@ jobs: topology: [hwloc, binders, no] env: CC: clang-17 + CXX: clang++-17 CFLAGS: "-fsanitize=${{ matrix.sanitizer }}" + CXXFLAGS: "-fsanitize=${{ matrix.sanitizer }}" LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}" steps: - uses: actions/checkout@v3 From 5191afa34ca4f08b1bd415436175bbf35f2862ae Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Tue, 24 Oct 2023 14:23:14 -0600 Subject: [PATCH 13/22] Install and use C++ compiler for testing too. --- .github/workflows/CI.yml | 81 +++++++++++++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4d9f49a11..45599efb2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,30 +7,78 @@ on: branches: [ main ] jobs: - linux_make_check: + linux-gcc: runs-on: ubuntu-22.04 continue-on-error: true strategy: matrix: - compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, clang-17] + gcc_version: [9, 10, 11, 12, 13] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] env: - CC: ${{ matrix.compiler }} + CC: gcc-${{ matrix.gcc_version }} + CXX: g++-${{ matrix.gcc_version }} steps: - uses: actions/checkout@v3 - - if: ${{ matrix.compiler == 'gcc-13' }} + - if: ${{ matrix.gcc_version == '13' }} run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 - - if: ${{ matrix.compiler == 'clang-16' }} + - name: install compiler + run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }} + - if: ${{ matrix.topology != 'no' }} 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/jammy/ llvm-toolchain-jammy-16 main' && break || sleep 1 - - if: ${{ matrix.compiler == 'clang-17' }} + sudo apt-get install hwloc libhwloc-dev + hwloc-ls --version + - name: build qthreads + run: | + ./autogen.sh + ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} + make -j2 + - name: make check + run: | + timeout --foreground 3m make check + + linux-clang: + runs-on: ubuntu-22.04 + continue-on-error: true + strategy: + matrix: + clang_version: [11, 12, 13, 14, 15, 16, 17] + scheduler: [nemesis, sherwood] + topology: [hwloc, binders, no] + use_libcxx: [true, false] # check with libc++ too since there are plans to expand the use of C++ in qthreads + include: + - clang_version: 11 + gcc_version: 10 + - clang_version: 12 + gcc_version: 11 + - clang_version: 13 + gcc_version: 11 + - clang_version: 14 + gcc_version: 11 + - clang_version: 15 + gcc_version: 12 + - clang_version: 16 + gcc_version: 13 + - clang_version: 17 + gcc_version: 13 + env: + CC: clang-${{ matrix.clang_version }} + CXX: clang++${{ matrix.clang_version }} + CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }} + steps: + - uses: actions/checkout@v3 + - if: ${{ matrix.clang_version == '16' || matrix.clang_version == 17 }} 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 - - name: install compiler - run: sudo apt-get install ${{ matrix.compiler }} + sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.clang_version }} main' && break || sleep 1 + - if: ${{ matrix.gcc_version == '13' && ! matrix.use_libcxx }} + run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 + - if: ${{ ! matrix.use_libcxx }} + 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.use_libcxx }} + run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev @@ -44,7 +92,7 @@ jobs: run: | timeout --foreground 3m make check - mac_build: + mac: runs-on: macos-latest steps: - uses: actions/checkout@v3 @@ -72,19 +120,26 @@ jobs: sanitizer: [address, memory, thread, undefined] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] + use_libcxx: [true, false] env: CC: clang-17 CXX: clang++-17 CFLAGS: "-fsanitize=${{ matrix.sanitizer }}" - CXXFLAGS: "-fsanitize=${{ matrix.sanitizer }}" + CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0}', matrix.sanitizer) || format('-fsanitize={0}', matrix.sanitizer) }} LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}" steps: - uses: actions/checkout@v3 + - if: ${{ ! matrix.use_libcxx }} + run: | + sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 + sudo apt-get install gcc-13 g++-13 - name: install compiler 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 sudo apt-get install clang-17 + - if: ${{ matrix.use_libcxx }} + run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev From 2ddffc9d9b1ae514b724bb0518ca9cfc10e4b59d Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Tue, 24 Oct 2023 16:04:23 -0600 Subject: [PATCH 14/22] Add build with additional checks (e.g. asserts) that run only with the latest versions of clang and gcc. --- .github/workflows/CI.yml | 50 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 45599efb2..a3b3c7e01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,7 +139,7 @@ jobs: sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 sudo apt-get install clang-17 - if: ${{ matrix.use_libcxx }} - run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev + run: sudo apt-get install libc++-17-dev libc++abi-17-dev - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev @@ -152,3 +152,51 @@ jobs: - name: make check run: | timeout --foreground 6m make check + + linux-thorough: + runs-on: ubuntu-22.04 + continue-on-error: true + strategy: + matrix: + compiler: [gcc, clang] + scheduler: [nemesis, sherwood] + topology: [hwloc, binders, no] + use_libcxx: [true, false] + use_asserts: [true, false] + use_expensive_asserts: [true, false] + optimization_level: [0, 2, 3] + exclude: + - compiler: gcc + use_libcxx: true + - use_asserts: false + use_expensive_asserts: true + env: + CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-17' }} + CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-17' }} + CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -O{0}', matrix.optimization_level) || format('-O{0}', matrix.optimization_level) }} + QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} + QTHREADS_ENABLE_EXPENSIVE_ASSERTS: ${{ matrix.use_expensive_asserts && '--enable-paranoia' || '' }} + steps: + - uses: actions/checkout@v3 + - run: | + sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 + sudo apt-get install gcc-13 g++-13 + - if: ${{ matrix.compiler == 'clang' }} + 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/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1 + sudo apt-get install clang-17 + - if: ${{ matrix.use_libcxx }} + run: sudo apt-get install libc++-17-dev libc++abi-17-dev + - if: ${{ matrix.topology != 'no' }} + run: | + sudo apt-get install hwloc libhwloc-dev + hwloc-ls --version + - name: build qthreads + run: | + ./autogen.sh + ./configure $QTHREADS_ENABLE_ASSERTS $QTHREADS_ENABLE_EXPENSIVE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} + make -j2 + - name: make check + run: | + timeout --foreground 6m make check From 85296509d155ffdc7e8b52c4859392055db24a4d Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Tue, 24 Oct 2023 16:15:28 -0600 Subject: [PATCH 15/22] Increase allowed time for clang on linux builds and sanitizer builds. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a3b3c7e01..10a7a66ba 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,7 +90,7 @@ jobs: make -j2 - name: make check run: | - timeout --foreground 3m make check + timeout --foreground 6m make check mac: runs-on: macos-latest @@ -151,7 +151,7 @@ jobs: make -j2 - name: make check run: | - timeout --foreground 6m make check + timeout --foreground 8m make check linux-thorough: runs-on: ubuntu-22.04 From 8d18045c5dfd8f0ac6dfb547ceb41552f7a8b006 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Wed, 25 Oct 2023 09:49:11 -0600 Subject: [PATCH 16/22] Only test libc++ on latest clang since its a fairly unusual config and unlikely to matter since qthreads is mostly C. --- .github/workflows/CI.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 10a7a66ba..250e9c10d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,7 +45,6 @@ jobs: clang_version: [11, 12, 13, 14, 15, 16, 17] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] - use_libcxx: [true, false] # check with libc++ too since there are plans to expand the use of C++ in qthreads include: - clang_version: 11 gcc_version: 10 @@ -64,7 +63,6 @@ jobs: env: CC: clang-${{ matrix.clang_version }} CXX: clang++${{ matrix.clang_version }} - CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }} steps: - uses: actions/checkout@v3 - if: ${{ matrix.clang_version == '16' || matrix.clang_version == 17 }} @@ -73,12 +71,10 @@ jobs: sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.clang_version }} main' && break || sleep 1 - if: ${{ matrix.gcc_version == '13' && ! matrix.use_libcxx }} run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1 - - if: ${{ ! matrix.use_libcxx }} + - 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.use_libcxx }} - run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev - if: ${{ matrix.topology != 'no' }} run: | sudo apt-get install hwloc libhwloc-dev From c2a6ce8f1bf8b7babf8da910410072fc60874e3b Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 26 Oct 2023 13:12:21 -0600 Subject: [PATCH 17/22] Expand osx CI tests to include different schedulers, assertion, and optimization settings. --- .github/workflows/CI.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 250e9c10d..7932412d1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,19 +90,33 @@ jobs: mac: runs-on: macos-latest + continue-on-error: true + strategy: + matrix: + scheduler: [nemesis, sherwood] + topology: [hwloc, binders, no] + use_asserts: [true, false] + use_expensive_asserts: [true, false] + optimization_level: [0, 2, 3] + exclude: + - use_asserts: false + use_expensive_asserts: true + env: + QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} + QTHREADS_ENABLE_EXPENSIVE_ASSERTS: ${{ matrix.use_expensive_asserts && '--enable-paranoia' || '' }} steps: - uses: actions/checkout@v3 - name: install deps run: | brew install autoconf automake libtool coreutils # coreutils is to get gtimeout for CI and is not universally required by qthreads. - - name: install hwloc + - if: ${{ matrix.topology != 'no' }} run: | brew install hwloc hwloc-ls --version - name: build qthreads run: | ./autogen.sh - ./configure --enable-picky + ./configure $QTHREADS_ENABLE_ASSERTS $QTHREADS_ENABLE_EXPENSIVE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j3 - name: make check run: | From 6b562916c8b2b8006c623319ec8afcb7d3075210 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 26 Oct 2023 16:41:12 -0600 Subject: [PATCH 18/22] Turn off testing at different optimization levels since it's not filtering any distinct bugs. --- .github/workflows/CI.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7932412d1..c7dc59a53 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -97,7 +97,6 @@ jobs: topology: [hwloc, binders, no] use_asserts: [true, false] use_expensive_asserts: [true, false] - optimization_level: [0, 2, 3] exclude: - use_asserts: false use_expensive_asserts: true @@ -174,7 +173,6 @@ jobs: use_libcxx: [true, false] use_asserts: [true, false] use_expensive_asserts: [true, false] - optimization_level: [0, 2, 3] exclude: - compiler: gcc use_libcxx: true @@ -183,7 +181,7 @@ jobs: env: CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-17' }} CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-17' }} - CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -O{0}', matrix.optimization_level) || format('-O{0}', matrix.optimization_level) }} + CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }} QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} QTHREADS_ENABLE_EXPENSIVE_ASSERTS: ${{ matrix.use_expensive_asserts && '--enable-paranoia' || '' }} steps: From 6d1f1fe9139bc47025cd888e85a1448655830edd Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 26 Oct 2023 16:43:15 -0600 Subject: [PATCH 19/22] Disable testing with Linux/libc++ since the effect of switching between libstdc++ and libc++ is minimal right now. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c7dc59a53..eff43269c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -129,7 +129,7 @@ jobs: sanitizer: [address, memory, thread, undefined] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] - use_libcxx: [true, false] + use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. env: CC: clang-17 CXX: clang++-17 @@ -170,7 +170,7 @@ jobs: compiler: [gcc, clang] scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] - use_libcxx: [true, false] + use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. use_asserts: [true, false] use_expensive_asserts: [true, false] exclude: From ada5b8a86a42f40dd1dae4e90be21c8859df4dee Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Thu, 26 Oct 2023 17:13:37 -0600 Subject: [PATCH 20/22] Disable running the expensive asserts in CI since that setting makes no difference with known bugs and the use of that type of assert is extremely limited in the codebase. --- .github/workflows/CI.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eff43269c..3098144e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -96,13 +96,8 @@ jobs: scheduler: [nemesis, sherwood] topology: [hwloc, binders, no] use_asserts: [true, false] - use_expensive_asserts: [true, false] - exclude: - - use_asserts: false - use_expensive_asserts: true env: QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} - QTHREADS_ENABLE_EXPENSIVE_ASSERTS: ${{ matrix.use_expensive_asserts && '--enable-paranoia' || '' }} steps: - uses: actions/checkout@v3 - name: install deps @@ -115,7 +110,7 @@ jobs: - name: build qthreads run: | ./autogen.sh - ./configure $QTHREADS_ENABLE_ASSERTS $QTHREADS_ENABLE_EXPENSIVE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} + ./configure $QTHREADS_ENABLE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j3 - name: make check run: | @@ -172,18 +167,14 @@ jobs: topology: [hwloc, binders, no] use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. use_asserts: [true, false] - use_expensive_asserts: [true, false] exclude: - compiler: gcc use_libcxx: true - - use_asserts: false - use_expensive_asserts: true env: CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-17' }} CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-17' }} CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }} QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }} - QTHREADS_ENABLE_EXPENSIVE_ASSERTS: ${{ matrix.use_expensive_asserts && '--enable-paranoia' || '' }} steps: - uses: actions/checkout@v3 - run: | @@ -203,7 +194,7 @@ jobs: - name: build qthreads run: | ./autogen.sh - ./configure $QTHREADS_ENABLE_ASSERTS $QTHREADS_ENABLE_EXPENSIVE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} + ./configure $QTHREADS_ENABLE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j2 - name: make check run: | From 96e9466cb65b3b1da5c8c4551b40da4f2e945187 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Tue, 31 Oct 2023 10:45:11 -0600 Subject: [PATCH 21/22] Also test distrib scheduler. --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3098144e0..c6c7070b6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: gcc_version: [9, 10, 11, 12, 13] - scheduler: [nemesis, sherwood] + scheduler: [nemesis, sherwood, distrib] topology: [hwloc, binders, no] env: CC: gcc-${{ matrix.gcc_version }} @@ -43,7 +43,7 @@ jobs: strategy: matrix: clang_version: [11, 12, 13, 14, 15, 16, 17] - scheduler: [nemesis, sherwood] + scheduler: [nemesis, sherwood, distrib] topology: [hwloc, binders, no] include: - clang_version: 11 @@ -93,7 +93,7 @@ jobs: continue-on-error: true strategy: matrix: - scheduler: [nemesis, sherwood] + scheduler: [nemesis, sherwood, distrib] topology: [hwloc, binders, no] use_asserts: [true, false] env: @@ -122,7 +122,7 @@ jobs: strategy: matrix: sanitizer: [address, memory, thread, undefined] - scheduler: [nemesis, sherwood] + scheduler: [nemesis, sherwood, distrib] topology: [hwloc, binders, no] use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. env: @@ -163,7 +163,7 @@ jobs: strategy: matrix: compiler: [gcc, clang] - scheduler: [nemesis, sherwood] + scheduler: [nemesis, sherwood, distrib] topology: [hwloc, binders, no] use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now. use_asserts: [true, false] From 9f3b554a2775ba7ccf5cdca28a0eabe767feb048 Mon Sep 17 00:00:00 2001 From: Ian Henriksen Date: Tue, 31 Oct 2023 14:49:10 -0600 Subject: [PATCH 22/22] Add stricter timeout enforcement for cases where a test stops responding to signals. --- .github/workflows/CI.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c6c7070b6..86a6b6da1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,8 +34,8 @@ jobs: ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j2 - name: make check - run: | - timeout --foreground 3m make check + run: timeout -k 10s --foreground 3m make check + timeout-minutes: 4 linux-clang: runs-on: ubuntu-22.04 @@ -85,8 +85,8 @@ jobs: ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j2 - name: make check - run: | - timeout --foreground 6m make check + run: timeout -k 10s --foreground 6m make check + timeout-minutes: 7 mac: runs-on: macos-latest @@ -113,8 +113,8 @@ jobs: ./configure $QTHREADS_ENABLE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j3 - name: make check - run: | - gtimeout --foreground 8m make check + run: gtimeout -k 10s --foreground 8m make check + timeout-minutes: 9 sanitizers: runs-on: ubuntu-22.04 @@ -154,8 +154,8 @@ jobs: ./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j2 - name: make check - run: | - timeout --foreground 8m make check + run: timeout -k 10s --foreground 8m make check + timeout-minutes: 9 linux-thorough: runs-on: ubuntu-22.04 @@ -197,5 +197,5 @@ jobs: ./configure $QTHREADS_ENABLE_ASSERTS --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} make -j2 - name: make check - run: | - timeout --foreground 6m make check + run: timeout -k 10s --foreground 6m make check + timeout-minutes: 7