Skip to content

Commit

Permalink
Sanitizer workflow for macOS (#4431)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev authored Feb 13, 2024
1 parent 817f346 commit b824932
Showing 1 changed file with 60 additions and 3 deletions.
63 changes: 60 additions & 3 deletions .github/workflows/code_sanitizers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Code Sanitizers

on: [push, pull_request, workflow_dispatch]
on: [ push, pull_request, workflow_dispatch ]

jobs:
linux_sanitizers:
Expand All @@ -9,8 +9,8 @@ jobs:
strategy:
fail-fast: false
matrix:
BACKEND: [lmdb, rocksdb]
COMPILER: [clang]
BACKEND: [ lmdb, rocksdb ]
COMPILER: [ clang ]
SANITIZER:
- { name: UBSAN, ignore_errors: false }
- { name: ASAN, ignore_errors: true }
Expand Down Expand Up @@ -58,3 +58,60 @@ jobs:
continue-on-error: ${{ env.IGNORE_ERRORS == 'true' }}
run: ../ci/tests/show-sanitizer-reports.sh
working-directory: build


macos_sanitizers:
name: macOS [${{ matrix.SANITIZER.name }}] [${{ matrix.BACKEND }} | ${{ matrix.COMPILER }}] ${{ matrix.SANITIZER.ignore_errors && ' (Errors Ignored)' || '' }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
BACKEND: [ lmdb, rocksdb ]
COMPILER: [ clang ]
SANITIZER:
- { name: UBSAN, ignore_errors: false }
- { name: ASAN, ignore_errors: true }
- { name: TSAN, ignore_errors: true }
runs-on: macos-14
env:
COMPILER: ${{ matrix.COMPILER }}
BACKEND: ${{ matrix.BACKEND }}
SANITIZER: ${{ matrix.SANITIZER.name }}
IGNORE_ERRORS: ${{ matrix.SANITIZER.ignore_errors }}
TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }}
DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }}
ASAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../asan_suppressions
TSAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../tsan_suppressions
UBSAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:print_stacktrace=1
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Prepare
run: ci/prepare/macos/prepare.sh

- name: Build Tests
id: build
run: ci/build-tests.sh

- name: Core Tests
if: steps.build.outcome == 'success' && (success() || failure())
continue-on-error: true
run: timeout -sKILL 45m ../ci/tests/run-core-tests.sh
working-directory: build

- name: RPC Tests
if: steps.build.outcome == 'success' && (success() || failure())
continue-on-error: true
run: timeout -sKILL 20m ../ci/tests/run-rpc-tests.sh
working-directory: build

- name: Reports
if: steps.build.outcome == 'success' && (success() || failure())
continue-on-error: ${{ env.IGNORE_ERRORS == 'true' }}
run: ../ci/tests/show-sanitizer-reports.sh
working-directory: build

0 comments on commit b824932

Please sign in to comment.