forked from nanocurrency/nano-node
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (107 loc) · 4.73 KB
/
code_sanitizers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Code Sanitizers
on: [ push, pull_request, workflow_dispatch ]
jobs:
linux_sanitizers:
name: Linux [${{ 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: false, leak_check: false }
- { name: ASAN_INT, ignore_errors: true, leak_check: false }
- { name: TSAN, ignore_errors: false }
- { name: LEAK, ignore_errors: true, leak_check: true }
exclude:
# Bug when running with TSAN: "ThreadSanitizer: CHECK failed: sanitizer_deadlock_detector"
- BACKEND: rocksdb
SANITIZER: { name: TSAN }
runs-on: ubuntu-22.04
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:detect_leaks=${{ matrix.SANITIZER.leak_check && '1' || '0' }}
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: sudo -E ci/prepare/linux/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
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: false }
- { name: TSAN, ignore_errors: false }
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