2017-04-28 19:29:25 +03:00
#!/usr/bin/bash
# Install build dependencies, run unit tests and installed tests.
set -xeuo pipefail
dn = $( dirname $0 )
. ${ dn } /libbuild.sh
2017-04-28 18:40:22 +03:00
# Use the latest ostree by default
2017-07-17 20:40:25 +03:00
id = $( . /etc/os-release && echo $ID )
version_id = $( . /etc/os-release && echo $VERSION_ID )
if [ " $id " = = fedora ] && [ " $version_id " = = 26 ] ; then
echo -e '[fahc]\nbaseurl=https://ci.centos.org/artifacts/sig-atomic/fahc/rdgo/build/\ngpgcheck=0\n' > /etc/yum.repos.d/fahc.repo
# Until we fix https://github.com/rpm-software-management/libdnf/pull/149
sed -i -e 's,metadata_expire=6h,exclude=ostree ostree-devel ostree-libs ostree-grub2\nmetadata_expire=6h,' /etc/yum.repos.d/fedora-updates.repo
elif [ " $id " = = centos ] ; then
echo -e '[cahc]\nbaseurl=https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/build\ngpgcheck=0\n' > /etc/yum.repos.d/cahc.repo
fi
2017-04-28 19:29:25 +03:00
2017-04-28 18:40:22 +03:00
install_builddeps rpm-ostree
2017-04-28 19:29:25 +03:00
2017-07-13 23:39:01 +03:00
yum install -y /usr/bin/g-ir-scanner # Accidentally omitted
# Mostly dependencies for tests
2017-07-17 20:40:25 +03:00
yum install -y ostree{ ,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML clang \
2017-07-13 23:39:01 +03:00
libubsan libasan libtsan elfutils fuse sudo python-gobject-base
2017-04-28 19:29:25 +03:00
# create an unprivileged user for testing
adduser testuser
2017-04-28 18:40:22 +03:00
rpm -q ostree{ ,-devel,-grub2}
2017-04-28 19:29:25 +03:00
build --enable-installed-tests --enable-gtk-doc