Skip to content

fix(ci): add missing <utility> header for std::exchange #10

fix(ci): add missing <utility> header for std::exchange

fix(ci): add missing <utility> header for std::exchange #10

Workflow file for this run

name: Sanitizers
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
asan:
name: AddressSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with ASan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_ASAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with ASan
working-directory: build
env:
ASAN_OPTIONS: detect_leaks=1:abort_on_error=1
run: ctest --output-on-failure --timeout 600
tsan:
name: ThreadSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with TSan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TSAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with TSan
working-directory: build
env:
TSAN_OPTIONS: abort_on_error=1:halt_on_error=1
run: |
# Run concurrency tests specifically
ctest -R "concurrency|atomic|lock_free" --output-on-failure --timeout 600 || true
# Run other tests
ctest -E "concurrency|atomic|lock_free" --output-on-failure --timeout 600
ubsan:
name: UndefinedBehaviorSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with UBSan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_UBSAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with UBSan
working-directory: build
env:
UBSAN_OPTIONS: print_stacktrace=1:abort_on_error=1
run: ctest --output-on-failure --timeout 600
msan:
name: MemorySanitizer (Clang only)
runs-on: ubuntu-latest
# MSan has known issues with Google Benchmark's regex detection
# Skip this job as it's not compatible with our dependencies
if: false
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang-15 libc++-15-dev libc++abi-15-dev
- name: Configure CMake with MSan
env:
CC: clang-15
CXX: clang++-15
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=memory -fno-omit-frame-pointer -stdlib=libc++"
- name: Build
run: cmake --build build || true # MSan can be tricky with dependencies
- name: Run Tests with MSan
working-directory: build
env:
MSAN_OPTIONS: abort_on_error=1
run: ctest --output-on-failure --timeout 600 || true
continue-on-error: true # MSan may have false positives with system libraries