Skip to content

Commit

Permalink
CI: Update build script for Linux
Browse files Browse the repository at this point in the history
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 <paul@crapouillou.net>
  • Loading branch information
pcercuei committed May 11, 2021
1 parent b0f0540 commit c32fab4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CI/travis/before_install_linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion CI/travis/make_linux
Original file line number Diff line number Diff line change
Expand Up @@ -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} ..

Expand Down Expand Up @@ -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 ..
Expand Down

0 comments on commit c32fab4

Please sign in to comment.