Pin actions/checkout, setup-python, cache, and upload-artifact to full-length commit SHAs across the bench, lint, precision-gate, and tsan workflows (supply-chain hardening; mutable tags can be re-pointed).
74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: tsan
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: tsan-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tsan:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Install system deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
clang-19 \
|
|
llvm-19-dev libclang-19-dev libclang-cpp19-dev \
|
|
libz3-dev libsqlite3-dev \
|
|
meson ninja-build pkg-config \
|
|
nlohmann-json3-dev \
|
|
libcli11-dev libspdlog-dev libfmt-dev
|
|
|
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
with:
|
|
python-version: '3.12'
|
|
- run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install 'conan>=2,<3'
|
|
conan profile detect --force
|
|
|
|
- name: Cache Conan
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
|
with:
|
|
path: ~/.conan2
|
|
key: conan-tsan-${{ hashFiles('conanfile.py') }}
|
|
|
|
- name: Configure (TSan)
|
|
env:
|
|
CC: clang-19
|
|
CXX: clang++-19
|
|
run: |
|
|
conan install . --output-folder=build/tsan --build=missing \
|
|
-s build_type=Debug -o build_tests=True
|
|
ln -sf /usr/lib/x86_64-linux-gnu/pkgconfig/z3.pc build/tsan/z3.pc
|
|
meson setup build/tsan \
|
|
--native-file build/tsan/conan_meson_native.ini \
|
|
-Dcpp_std=c++23 \
|
|
-Dbuild-tests=true \
|
|
-Db_sanitize=thread \
|
|
-Db_lundef=false \
|
|
-Dllvm-config-path="$(command -v llvm-config-19)"
|
|
|
|
- name: Compile
|
|
run: meson compile -C build/tsan
|
|
|
|
- name: Test (TSan — unit tests only)
|
|
env:
|
|
TSAN_OPTIONS: >-
|
|
suppressions=.tsan-suppress
|
|
second_deadlock_stack=1
|
|
history_size=7
|
|
run: meson test -C build/tsan --print-errorlogs --timeout-multiplier=4 --suite unit
|