Skip to content

Commit c32fab4

Browse files
committed
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 <[email protected]>
1 parent b0f0540 commit c32fab4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

CI/travis/before_install_linux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ handle_centos() {
2727
# FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel...
2828
yum -y groupinstall 'Development Tools'
2929
yum -y install cmake libxml2-devel libusb1-devel libaio-devel \
30-
bzip2 gzip rpm rpm-build
30+
bzip2 gzip rpm rpm-build libzstd-devel
3131

3232
if [ "$(get_version | head -c 1)" = "7" ] ; then
3333
# install Cmake3, and make it the default
@@ -66,7 +66,7 @@ handle_generic_docker() {
6666
handle_default() {
6767
sudo apt-get -qq update
6868
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake graphviz \
69-
libaio-dev libavahi-client-dev libserialport-dev \
69+
libaio-dev libavahi-client-dev libserialport-dev libzstd-dev \
7070
libavahi-common-dev libusb-1.0-0-dev libxml2-dev rpm tar \
7171
bzip2 gzip flex bison git libncurses5-dev libcdk5-dev \
7272
doxygen man2html python3 python3-pip python3-setuptools

CI/travis/make_linux

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ handle_default() {
4444

4545
FLAGS="-DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DWITH_EXAMPLES=ON ${PYTHON_HELP} ${DOC_HELP} ${MAN_HELP}"
4646

47+
# Ubuntu Xenial's libserialport and libzstd are too old
48+
if [ "${OS_VERSION}" = xenial ] ; then
49+
FLAGS="${FLAGS} -DWITH_SERIAL_BACKEND=OFF"
50+
else
51+
FLAGS="${FLAGS} -DWITH_ZSTD=ON"
52+
fi
53+
4754
echo "### cmake ${FLAGS}"
4855
cmake ${FLAGS} ..
4956

@@ -103,7 +110,13 @@ handle_centos() {
103110
echo "handle centos"
104111
mkdir -p build
105112
cd build
106-
cmake -DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON ..
113+
114+
FLAGS="-DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON -DWITH_SERIAL_BACKEND=OFF -DWITH_ZSTD=ON"
115+
116+
# CentOS 7's kernel headers are too old for USB support in IIOD
117+
[ "${OS_VERSION}" = centos7 ] && FLAGS="${FLAGS} -DWITH_IIOD_USBD=OFF"
118+
119+
cmake ${FLAGS} ..
107120
make
108121
make package
109122
cd ..

0 commit comments

Comments
 (0)