-
Notifications
You must be signed in to change notification settings - Fork 778
199 lines (162 loc) · 6.54 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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: 'v1.2.1'
fastdds_branch:
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
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
env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
steps:
- name: Install wget
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: wget
- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas
- name: Get fastrtps.repos file
uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ env.FASTDDS_BRANCH }}
file_name: fastrtps.repos
file_result: fastrtps.repos
- name: Fetch Fast DDS & dependencies
uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0
with:
vcs_repos_file: fastrtps.repos
destination_workspace: src
- name: Checkout Fast DDS branch
run: |
cd ./src/fastrtps
git checkout ${{ env.FASTDDS_BRANCH }}
- name: Install apt packages
uses: ./src/fastrtps/.github/actions/install-apt-packages
- name: Install GTest
uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0
with:
version: v1.12.1
- name: Build workspace
run: |
cat src/fastrtps/.github/workflows/config/asan_colcon.meta
colcon build \
--event-handlers=console_direct+ \
--metas src/fastrtps/.github/workflows/config/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/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/fastrtps/stdout_stderr.log _tmp_specific_error_file.log
python3 src/fastrtps/.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
env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'v1.2.1' }}
steps:
- name: Install wget
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: wget
- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas
- name: Get fastrtps.repos file
uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ env.FASTDDS_BRANCH }}
file_name: fastrtps.repos
file_result: fastrtps.repos
- name: Fetch Fast DDS & dependencies
uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0
with:
vcs_repos_file: fastrtps.repos
destination_workspace: src
- name: Checkout Fast DDS branch
run: |
cd ./src/fastrtps
git checkout ${{ env.FASTDDS_BRANCH }}
- name: Sync eProsima/Discovery-Server repository
uses: actions/checkout@v4
with:
path: src/discovery_server
repository: eProsima/Discovery-Server
ref: ${{ env.DEFAULT_DISCOVERY_SERVER_BRANCH }}
- name: Install apt packages
uses: ./src/fastrtps/.github/actions/install-apt-packages
- name: Install GTest
uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0
with:
version: v1.12.1
- name: Build workspace
run: |
cat src/fastrtps/.github/workflows/config/asan_colcon.meta
colcon build \
--event-handlers=console_direct+ \
--metas src/fastrtps/.github/workflows/config/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/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/discovery-server/stdout_stderr.log _tmp_specific_error_file.log
python3 src/fastrtps/.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