ci: build ndn-cxx with AddressSanitizer
Change-Id: I706ab29efe61c17511b87b477151d9a2a8e055bc
This commit is contained in:
1 parent
fce3963fc0
commit
d5c2447b3a
4 files changed
+17
-5
No files matched your search
@@ -4,6 +4,7 @@ source .jenkins.d/util.sh
|
||||
|
||||
export CACHE_DIR=${CACHE_DIR:-/tmp}
|
||||
export WAF_JOBS=${WAF_JOBS:-1}
|
||||
[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
|
||||
|
||||
nanos() {
|
||||
# Cannot use date(1) because macOS does not support %N format specifier
|
||||
|
||||
@@ -35,11 +35,16 @@ sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
|
||||
|
||||
pushd ndn-cxx >/dev/null
|
||||
|
||||
if has Linux $NODE_LABELS && [[ $CXX != clang* && -z $DISABLE_ASAN ]]; then
|
||||
# https://stackoverflow.com/a/47022141
|
||||
ASAN="--with-sanitizer=address"
|
||||
fi
|
||||
if has CentOS-8 $NODE_LABELS; then
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1721553
|
||||
PCH="--without-pch"
|
||||
fi
|
||||
|
||||
./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
|
||||
./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $ASAN $PCH
|
||||
./waf --color=yes build -j$WAF_JOBS
|
||||
sudo_preserve_env PATH -- ./waf --color=yes install
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ set -ex
|
||||
git submodule sync
|
||||
git submodule update --init
|
||||
|
||||
if [[ -z $DISABLE_ASAN ]]; then
|
||||
ASAN="--with-sanitizer=address"
|
||||
fi
|
||||
if [[ $JOB_NAME == *"code-coverage" ]]; then
|
||||
COVERAGE="--with-coverage"
|
||||
elif [[ -z $DISABLE_ASAN ]]; then
|
||||
ASAN="--with-sanitizer=address"
|
||||
fi
|
||||
|
||||
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
|
||||
|
||||
+7
-2
@@ -8,7 +8,7 @@ This document describes how to build and install ndn-tools.
|
||||
Please see [Getting Started with ndn-cxx](https://named-data.net/doc/ndn-cxx/current/INSTALL.html)
|
||||
for how to install ndn-cxx.
|
||||
Note: If you have installed ndn-cxx from a binary package, please make sure development headers
|
||||
are installed (if using Ubuntu PPA, `libndn-cxx-dev` package is needed).
|
||||
are installed (e.g., if using Ubuntu PPA, the `libndn-cxx-dev` package is needed).
|
||||
|
||||
Any operating system and compiler supported by ndn-cxx is supported by ndn-tools.
|
||||
|
||||
@@ -18,7 +18,12 @@ This document describes how to build and install ndn-tools.
|
||||
|
||||
On Ubuntu:
|
||||
|
||||
sudo apt-get install libpcap-dev
|
||||
sudo apt install libpcap-dev
|
||||
|
||||
On CentOS and Fedora:
|
||||
|
||||
sudo dnf config-manager --enable PowerTools # CentOS only
|
||||
sudo dnf install libpcap-devel
|
||||
|
||||
## Build Steps
|
||||
|
||||
|
||||
Reference in new issue
Block a user