Skip to content

Commit

Permalink
Add ASAN test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Mar 26, 2024
1 parent d173abf commit 4da5081
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/mosquitto-make-asan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Mosquitto - Make ASAN

on:
push:
branches:
- develop
- fixes
pull_request:
branches:
- develop
- fixes

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Install third party dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
docbook-xsl \
lcov \
libargon2-dev \
libc-ares-dev \
libcjson-dev \
libcjson1 \
libcunit1-dev \
libssl-dev \
libwrap0-dev \
microsocks \
python3-all \
python3-paho-mqtt \
python3-psutil \
uthash-dev \
xsltproc
-
uses: actions/checkout@v4
with:
submodules: 'true'
-
name: make
run: make WITH_ASAN=yes
-
name: make test
run: |
make WITH_ASAN=yes ptest
4 changes: 2 additions & 2 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ endif

ifeq ($(WITH_ASAN),yes)
CC:=clang
CFLAGS+=-fsanitize=address
LDFLAGS+=-fsanitize=address
LOCAL_CFLAGS+=-fsanitize=address
LOCAL_LDFLAGS+=-fsanitize=address
endif

ifeq ($(WITH_LTO),yes)
Expand Down

0 comments on commit 4da5081

Please # to comment.