2017-06-08 20:47:20 +03:00
#!/usr/bin/bash
# Install build dependencies, run unit tests and installed tests.
set -xeuo pipefail
dn = $( dirname $0 )
. ${ dn } /libbuild.sh
2017-09-06 19:42:51 +03:00
pkg_upgrade
2017-06-09 17:57:40 +03:00
pkg_install_builddeps ostree
2017-07-19 16:08:41 +03:00
# Until this propagates farther
pkg_install 'pkgconfig(libcurl)' 'pkgconfig(openssl)'
2017-09-18 21:29:16 +03:00
pkg_install sudo which attr fuse strace \
2017-06-09 17:57:40 +03:00
libubsan libasan libtsan PyYAML redhat-rpm-config \
2017-06-08 20:47:20 +03:00
elfutils
2017-09-06 19:42:51 +03:00
if test -n " ${ CI_PKGS :- } " ; then
pkg_install ${ CI_PKGS }
fi
2018-01-17 17:07:32 +03:00
pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang \
python3-PyYAML
( . /etc/os-release;
if test " ${ ID } " = "centos" ; then
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
pkg_install python34{ ,-PyYAML}
fi
)
2017-06-08 20:47:20 +03:00
2017-07-26 22:51:57 +03:00
# Default libcurl on by default in fedora unless libsoup is enabled
if sh -c '. /etc/os-release; test "${ID}" = fedora' ; then
case " ${ CONFIGOPTS :- } " in
2017-09-19 22:19:05 +03:00
*--with-soup*| *--without-curl*) ; ;
2017-07-26 22:51:57 +03:00
*) CONFIGOPTS = " ${ CONFIGOPTS :- } --with-curl "
esac
fi
2017-09-19 22:19:05 +03:00
case " ${ CONFIGOPTS :- } " in
*--with-curl*| --with-soup*)
if test -x /usr/bin/gnome-desktop-testing-runner; then
CONFIGOPTS = " ${ CONFIGOPTS } --enable-installed-tests=exclusive "
fi
; ;
esac
2017-10-04 00:34:43 +03:00
# always fail on warnings; https://github.com/ostreedev/ostree/pull/971
# NB: this disables the default set of flags from configure.ac
export CFLAGS = " -Wall -Werror ${ CFLAGS :- } "
2017-09-19 22:19:05 +03:00
build --enable-gtk-doc ${ CONFIGOPTS :- }