ci: workaround swift package diagnose-api-breaking-changes failure (#… #644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |