-
Notifications
You must be signed in to change notification settings - Fork 786
82 lines (73 loc) · 2.55 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
name: Code Sanitizers
on: [push, pull_request, workflow_dispatch]
env:
RELEASE: 0
artifact: 0
jobs:
google_sanitizers_linux:
name: ${{ matrix.SANITIZER }} / ROCKSDB=${{ matrix.TEST_USE_ROCKSDB }} / ${{ matrix.COMPILER }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
TEST_USE_ROCKSDB: [0, 1]
COMPILER: [clang]
SANITIZER: [ASAN, ASAN_INT, TSAN]
runs-on: ubuntu-22.04
outputs:
issue_reported: ${{ steps.show_report.outputs.issue_reported }}
env:
COMPILER: ${{ matrix.COMPILER }}
TEST_USE_ROCKSDB: ${{ matrix.TEST_USE_ROCKSDB }}
XSAN: ${{ endsWith(matrix.sanitizer, 'ASAN_INT') && 'ASAN' || matrix.SANITIZER }}
XSAN_SUPPRESSIONS: ${{ endsWith(matrix.SANITIZER, 'TSAN') && 'suppressions=../tsan_suppressions' || '' }}
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: XSan variable values
run: |
(
echo "XSAN: '${XSAN}'"
echo "XSAN_SUPPRESSIONS: '${XSAN_SUPPRESSIONS}'"
)
- name: Build Tests
id: build_tests
run: ${{ matrix.SANITIZER }}=1 ci/build-ci.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5 'core_test rpc_test'
- name: Run core_test
id: core_test
continue-on-error: true
run: |
export ${XSAN}_OPTIONS="${XSAN_SUPPRESSIONS} log_exe_name=1 log_path=sanitizer_report"
timeout -sHUP 45m ./core_test
working-directory: build
- name: Run rpc_test
id: rpc_test
continue-on-error: true
run: |
export ${XSAN}_OPTIONS="${XSAN_SUPPRESSIONS} log_exe_name=1 log_path=sanitizer_report"
timeout -sHUP 20m ./rpc_test
working-directory: build
- name: Test Reports
id: show_report
run: |
(
issue_reported=false
reports=$(ls build/sanitizer_report* 2>/dev/null)
if [[ -n "${reports}" ]]; then
echo "Report Output:"
for report in ${reports}; do
echo "File: $report"
cat ${report}
echo
done
issue_reported=true
else
echo "No report has been generated."
fi
echo "issue_reported=${issue_reported}" >> $GITHUB_OUTPUT
) || exit 0