-
Notifications
You must be signed in to change notification settings - Fork 774
136 lines (111 loc) · 4.44 KB
/
sanitizer-tests.yaml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Sanitizer analysis
on:
workflow_dispatch:
inputs:
discovery_server_branch:
description: 'Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server)'
required: true
default: 'master'
pull_request:
push:
branches:
- master
schedule:
- cron: '0 1 * * *'
jobs:
asan-test:
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
runs-on: ubuntu-22.04
steps:
- name: Sync eProsima/Fast-DDS repository
uses: actions/checkout@v3
with:
path: src/Fast-DDS
- name: Install apt packages
uses: ./src/Fast-DDS/.github/actions/install-apt-packages
- name: Install Python packages
uses: ./src/Fast-DDS/.github/actions/install-python-packages
- name: Fetch Fast DDS dependencies
uses: ./src/Fast-DDS/.github/actions/fetch-fastdds-repos
with:
target_directory: src
googletest: true
- name: Build workspace
run: |
cat src/Fast-DDS/.github/workflows/asan/asan_colcon.meta
colcon build \
--event-handlers=console_direct+ \
--metas src/Fast-DDS/.github/workflows/asan/asan_colcon.meta
- name: Run tests Fast DDS
run: |
source install/setup.bash && \
colcon test \
--packages-select fastrtps \
--event-handlers=console_direct+ \
--return-code-on-test-failure \
--ctest-args \
--label-exclude xfail \
--timeout 300
continue-on-error: true
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: asan-logs
path: log/
if: always()
- name: Report ASAN errors
if: always()
run: |
bash src/Fast-DDS/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/fastrtps/stdout_stderr.log _tmp_specific_error_file.log
python3 src/Fast-DDS/.github/workflows/utils/log_parser.py --log-file log/latest_test/fastrtps/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer asan
asan-discovery-server-test:
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
runs-on: ubuntu-22.04
steps:
- name: Sync eProsima/Fast-DDS repository
uses: actions/checkout@v3
with:
path: src/Fast-DDS
- name: Install apt packages
uses: ./src/Fast-DDS/.github/actions/install-apt-packages
- name: Install Python packages
uses: ./src/Fast-DDS/.github/actions/install-python-packages
- name: Fetch Fast DDS dependencies
uses: ./src/Fast-DDS/.github/actions/fetch-fastdds-repos
env:
DEFAULT_DISCOVERY_SERVER_BRANCH: 'master'
with:
target_directory: src
googletest: true
discovery_server: true
discovery_server_branch: ${{ github.event.inputs.discovery_server_branch || env.DEFAULT_DISCOVERY_SERVER_BRANCH }}
- name: Build workspace
run: |
cat src/Fast-DDS/.github/workflows/asan/asan_colcon.meta
colcon build \
--event-handlers=console_direct+ \
--metas src/Fast-DDS/.github/workflows/asan/asan_colcon.meta
- name: Run tests Fast DDS
run: |
source install/setup.bash && \
colcon test \
--packages-select discovery-server \
--event-handlers=console_direct+ \
--return-code-on-test-failure \
--ctest-args \
--label-exclude xfail \
--timeout 300
continue-on-error: true
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: asan-ds-logs
path: log/
if: always()
- name: Report ASAN errors
if: always()
run: |
bash src/Fast-DDS/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/discovery-server/stdout_stderr.log _tmp_specific_error_file.log
python3 src/Fast-DDS/.github/workflows/utils/log_parser.py --log-file log/latest_test/discovery-server/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer=asan