build: support CentOS Stream 9, make graphviz optional
Change-Id: I5c0d824720f9f701ee2a88774e661c7472baea88
This commit is contained in:
@@ -35,11 +35,15 @@ elif has Ubuntu $NODE_LABELS; then
|
||||
case $JOB_NAME in
|
||||
*code-coverage)
|
||||
sudo apt-get -qy install lcov python3-pip
|
||||
pip3 install --user --upgrade --upgrade-strategy=eager 'gcovr~=5.0'
|
||||
pip3 install --user --upgrade --upgrade-strategy=eager 'gcovr~=5.1'
|
||||
;;
|
||||
*Docs)
|
||||
sudo apt-get -qy install doxygen graphviz python3-pip
|
||||
pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
|
||||
;;
|
||||
esac
|
||||
|
||||
elif has CentOS $NODE_LABELS; then
|
||||
sudo dnf -y install gcc-c++ libasan pkgconf-pkg-config python3 \
|
||||
boost-devel openssl-devel sqlite-devel
|
||||
fi
|
||||
|
||||
@@ -35,19 +35,14 @@ sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
|
||||
|
||||
pushd ndn-cxx >/dev/null
|
||||
|
||||
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
|
||||
./waf --color=yes build -j$WAF_JOBS
|
||||
sudo_preserve_env PATH -- ./waf --color=yes install
|
||||
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
if has CentOS-8 $NODE_LABELS; then
|
||||
if has CentOS $NODE_LABELS; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if has Linux $NODE_LABELS; then
|
||||
|
||||
@@ -36,6 +36,9 @@ fi
|
||||
# Install
|
||||
sudo_preserve_env PATH -- ./waf --color=yes install
|
||||
|
||||
if has CentOS $NODE_LABELS; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if has Linux $NODE_LABELS; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,6 @@ set -ex
|
||||
|
||||
# Prepare environment
|
||||
rm -rf ~/.ndn
|
||||
ndnsec key-gen "/tmp/jenkins/$NODE_NAME" | ndnsec cert-install -
|
||||
|
||||
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
|
||||
ASAN_OPTIONS="color=always"
|
||||
|
||||
@@ -6,20 +6,21 @@
|
||||
# (similar to running all test cases), instead of failing at the first error.
|
||||
|
||||
PROJ=ChronoSync
|
||||
PCFILE=ChronoSync
|
||||
|
||||
if [[ -n $DISABLE_HEADERS_CHECK ]]; then
|
||||
echo 'Skipping headers check.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if has CentOS-8 $NODE_LABELS; then
|
||||
if has CentOS $NODE_LABELS; then
|
||||
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
||||
fi
|
||||
|
||||
CXX=${CXX:-g++}
|
||||
STD=-std=c++17
|
||||
CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PROJ)"
|
||||
INCLUDEDIR="$(pkg-config --variable=includedir $PROJ)"/$PROJ
|
||||
CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
|
||||
INCLUDEDIR="$(pkg-config --variable=includedir $PCFILE)"/$PROJ
|
||||
|
||||
echo "Using: $CXX $STD $CXXFLAGS"
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ OUTPUT_DIRECTORY = docs/doxygen
|
||||
# performance problems for the file system.
|
||||
# The default value is: NO.
|
||||
|
||||
CREATE_SUBDIRS = YES
|
||||
CREATE_SUBDIRS = NO
|
||||
|
||||
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
||||
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
||||
@@ -2117,7 +2117,7 @@ HIDE_UNDOC_RELATIONS = YES
|
||||
# set to NO
|
||||
# The default value is: YES.
|
||||
|
||||
HAVE_DOT = YES
|
||||
HAVE_DOT = @HAVE_DOT@
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
|
||||
@@ -25,6 +25,13 @@ def configure(conf):
|
||||
|
||||
conf.env.WITH_TESTS = conf.options.with_tests
|
||||
|
||||
conf.find_program('dot', mandatory=False)
|
||||
|
||||
# Prefer pkgconf if it's installed, because it gives more correct results
|
||||
# on Fedora/CentOS/RHEL/etc. See https://bugzilla.redhat.com/show_bug.cgi?id=1953348
|
||||
# Store the result in env.PKGCONFIG, which is the variable used inside check_cfg()
|
||||
conf.find_program(['pkgconf', 'pkg-config'], var='PKGCONFIG')
|
||||
|
||||
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
|
||||
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
|
||||
uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)
|
||||
@@ -99,6 +106,7 @@ def doxygen(bld):
|
||||
target=['docs/doxygen.conf',
|
||||
'docs/named_data_theme/named_data_footer-with-analytics.html'],
|
||||
VERSION=VERSION,
|
||||
HAVE_DOT='YES' if bld.env.DOT else 'NO',
|
||||
HTML_FOOTER='../build/docs/named_data_theme/named_data_footer-with-analytics.html' \
|
||||
if os.getenv('GOOGLE_ANALYTICS', None) \
|
||||
else '../docs/named_data_theme/named_data_footer.html',
|
||||
|
||||
Reference in New Issue
Block a user