Skip to content

chore: update ci workflow #83

chore: update ci workflow

chore: update ci workflow #83

name: Thread sanitizer
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main, next ]
jobs:
thread-sanitizer:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
echo BENCHMARK_DISABLE_JEMALLOC=true >> $GITHUB_ENV
brew install jemalloc
- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev
echo BENCHMARK_DISABLE_JEMALLOC=true >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Start consul
uses: ./.github/actions/consul-start
- name: Swift version
run: swift --version
# Required to clean build directory before sanitizer!
- name: Clean before debug build thread sanitizier
run: swift package clean
- name: Run thread sanitizer
run: swift test --sanitize=thread
- name: Clean before release build sanitizier
run: swift package clean
- name: Run thread sanitizer on release build
run: swift test --sanitize=thread -c release -Xswiftc -enable-testing