From c32fab40c6084e695a503c2651549efc6acb7eab Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 6 May 2021 11:21:46 +0100 Subject: [PATCH] CI: Update build script for Linux Enable ZSTD support, except on Ubuntu 16.04 where it doesn't build, and explicitely set the build options as it is required now. Note that the serial backend is disabled on Ubuntu 16.04 as its version of libserialport is too old, and USB support in IIOD is disabled in CentOS 7 as its kernel headers are too old. Signed-off-by: Paul Cercueil --- CI/travis/before_install_linux | 4 ++-- CI/travis/make_linux | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CI/travis/before_install_linux b/CI/travis/before_install_linux index 3cdc3844f..db248fd65 100755 --- a/CI/travis/before_install_linux +++ b/CI/travis/before_install_linux @@ -27,7 +27,7 @@ handle_centos() { # FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel... yum -y groupinstall 'Development Tools' yum -y install cmake libxml2-devel libusb1-devel libaio-devel \ - bzip2 gzip rpm rpm-build + bzip2 gzip rpm rpm-build libzstd-devel if [ "$(get_version | head -c 1)" = "7" ] ; then # install Cmake3, and make it the default @@ -66,7 +66,7 @@ handle_generic_docker() { handle_default() { sudo apt-get -qq update sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake graphviz \ - libaio-dev libavahi-client-dev libserialport-dev \ + libaio-dev libavahi-client-dev libserialport-dev libzstd-dev \ libavahi-common-dev libusb-1.0-0-dev libxml2-dev rpm tar \ bzip2 gzip flex bison git libncurses5-dev libcdk5-dev \ doxygen man2html python3 python3-pip python3-setuptools diff --git a/CI/travis/make_linux b/CI/travis/make_linux index d215d4d6f..cf732d5d1 100755 --- a/CI/travis/make_linux +++ b/CI/travis/make_linux @@ -44,6 +44,13 @@ handle_default() { FLAGS="-DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DWITH_EXAMPLES=ON ${PYTHON_HELP} ${DOC_HELP} ${MAN_HELP}" + # Ubuntu Xenial's libserialport and libzstd are too old + if [ "${OS_VERSION}" = xenial ] ; then + FLAGS="${FLAGS} -DWITH_SERIAL_BACKEND=OFF" + else + FLAGS="${FLAGS} -DWITH_ZSTD=ON" + fi + echo "### cmake ${FLAGS}" cmake ${FLAGS} .. @@ -103,7 +110,13 @@ handle_centos() { echo "handle centos" mkdir -p build cd build - cmake -DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON .. + + FLAGS="-DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON -DWITH_SERIAL_BACKEND=OFF -DWITH_ZSTD=ON" + + # CentOS 7's kernel headers are too old for USB support in IIOD + [ "${OS_VERSION}" = centos7 ] && FLAGS="${FLAGS} -DWITH_IIOD_USBD=OFF" + + cmake ${FLAGS} .. make make package cd ..