Skip to content

Commit 4da5081

Browse files
committed
Add ASAN test
1 parent d173abf commit 4da5081

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Mosquitto - Make ASAN
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- fixes
8+
pull_request:
9+
branches:
10+
- develop
11+
- fixes
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-22.04
16+
17+
steps:
18+
- name: Install third party dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y \
22+
clang \
23+
docbook-xsl \
24+
lcov \
25+
libargon2-dev \
26+
libc-ares-dev \
27+
libcjson-dev \
28+
libcjson1 \
29+
libcunit1-dev \
30+
libssl-dev \
31+
libwrap0-dev \
32+
microsocks \
33+
python3-all \
34+
python3-paho-mqtt \
35+
python3-psutil \
36+
uthash-dev \
37+
xsltproc
38+
-
39+
uses: actions/checkout@v4
40+
with:
41+
submodules: 'true'
42+
-
43+
name: make
44+
run: make WITH_ASAN=yes
45+
-
46+
name: make test
47+
run: |
48+
make WITH_ASAN=yes ptest

config.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ endif
232232

233233
ifeq ($(WITH_ASAN),yes)
234234
CC:=clang
235-
CFLAGS+=-fsanitize=address
236-
LDFLAGS+=-fsanitize=address
235+
LOCAL_CFLAGS+=-fsanitize=address
236+
LOCAL_LDFLAGS+=-fsanitize=address
237237
endif
238238

239239
ifeq ($(WITH_LTO),yes)

0 commit comments

Comments
 (0)