-
Notifications
You must be signed in to change notification settings - Fork 774
175 lines (143 loc) · 5.81 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
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'
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
steps:
- uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: wget
- uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: vcstool
- uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
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: Install apt packages
uses: ./src/fastrtps/.github/actions/install-apt-packages
- name: Install Python packages
uses: ./src/fastrtps/.github/actions/install-python-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
steps:
- uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: wget
- uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: vcstool
- uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
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: Sync eProsima/Discovery-Server repository
uses: actions/checkout@v4
env:
DEFAULT_DISCOVERY_SERVER_BRANCH: 'master'
with:
path: src/discovery_server
repository: eProsima/Discovery-Server
ref: ${{ github.event.inputs.discovery_server_branch || env.DEFAULT_DISCOVERY_SERVER_BRANCH }}
- name: Install apt packages
uses: ./src/fastrtps/.github/actions/install-apt-packages
- name: Install Python packages
uses: ./src/fastrtps/.github/actions/install-python-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