提交 01c0179f 编写于 作者: D Daniel P. Berrangé

travis: switch to using Ubuntu 16.04 and 18.04

The container images provided by Travis only support Ubuntu 14.04,
however, Travis has ability to run docker, which allows the build
script to use arbitrary OS images. This takes advantage of that to
convert the build over to Ubuntu 16.04 and 18.04

This is using the official Ubuntu provided images and installing
extra build deps required, as we previously did with Travis container
images.
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 5c22daea
sudo: false sudo: required
language: c language: generic
cache: ccache
branches: branches:
except: except:
...@@ -8,17 +7,38 @@ branches: ...@@ -8,17 +7,38 @@ branches:
matrix: matrix:
include: include:
- compiler: gcc - services:
dist: trusty - docker
env: env:
- PYTHON=$(which python2) - IMAGE=ubuntu:18.04
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart"
- compiler: clang
dist: trusty
env:
- PYTHON=$(which python3)
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=systemd" - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=systemd"
script:
- docker run
--privileged
-v $(pwd):/build
-w /build
-e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
-e PACKAGES="$PACKAGES"
-e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
"$IMAGE"
/bin/sh -xc "$DOCKER_CMD"
- services:
- docker
env:
- IMAGE=ubuntu:16.04
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart"
script:
- docker run
--privileged
-v $(pwd):/build
-w /build
-e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
-e PACKAGES="$PACKAGES"
-e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
"$IMAGE"
/bin/sh -xc "$DOCKER_CMD"
- compiler: clang - compiler: clang
language: c
os: osx os: osx
env: env:
- PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH" - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH"
...@@ -27,80 +47,18 @@ matrix: ...@@ -27,80 +47,18 @@ matrix:
- brew update - brew update
- brew upgrade - brew upgrade
- brew install python ccache rpcgen yajl - brew install python ccache rpcgen yajl
before_script:
- ./autogen.sh --prefix=$(pwd)/install-root
script: script:
# We can't run make distcheck/syntax-check because they # We can't run make distcheck/syntax-check because they
# fail on macOS, but doing 'install' and 'dist' gives us # fail on macOS, but doing 'install' and 'dist' gives us
# some useful coverage # some useful coverage
- make -j3 && make -j3 install && make -j3 dist - make -j3 && make -j3 install && make -j3 dist
after_failure:
- echo '=== LOG FILE(S) START ==='
- find -name test-suite.log | xargs cat
- echo '=== LOG FILE(S) END ==='
addons:
apt:
# Please keep this list sorted alphabetically
packages:
- augeas-tools
- autoconf
- automake
- autopoint
- bash-completion
- ccache
- dnsmasq-base
- dwarves
- ebtables
- gcc
- gettext
- glusterfs-client
- libacl1-dev
- libapparmor-dev
- libattr1-dev
- libaudit-dev
- libavahi-client-dev
- libblkid-dev
- libc6-dev
- libcap-ng-dev
- libc-dev-bin
- libcurl4-gnutls-dev
- libdbus-1-dev
- libdevmapper-dev
- libfuse-dev
- libgnutls-dev
- libnetcf-dev
- libnl-3-dev
- libnl-route-3-dev
- libnuma-dev
- libopenwsman-dev
- libparted-dev
- libpcap-dev
- libpciaccess-dev
- librbd-dev
- libreadline-dev
- libsanlock-dev
- libsasl2-dev
- libselinux1-dev
- libssh2-1-dev
- libssh-dev
- libtirpc-dev
- libtool
- libudev-dev
- libxen-dev
- libxml2-dev
- libxml2-utils
- libyajl-dev
- lvm2
- make
# - nfs-common # broken on trusty since build #807 (2018-01-09)
- open-iscsi
- parted
- patch
- perl
- pkgconf
- policykit-1
- qemu-utils
- radvd
- scrub
- sheepdog
- systemtap-sdt-dev
- xsltproc
- zfs-fuse
git: git:
submodules: true submodules: true
...@@ -108,23 +66,87 @@ git: ...@@ -108,23 +66,87 @@ git:
env: env:
global: global:
- VIR_TEST_DEBUG=1 - VIR_TEST_DEBUG=1
- DOCKER_CMD="
before_script: apt-get update &&
- ./autogen.sh --prefix=$(pwd)/install-root apt-get install -y \$PACKAGES &&
./autogen.sh &&
script: make -j3 &&
- make -j3 && make -j3 syntax-check && make -j3 distcheck DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS make -j3 syntax-check &&
make -j3 distcheck DISTCHECK_CONFIGURE_FLAGS=\"\$DISTCHECK_CONFIGURE_FLAGS\" ||
after_failure: (
- echo '============================================================================' echo '=== LOG FILE(S) START ==='
- 'ver=$(sed -n "s/AC_INIT(\[libvirt\], \[\([0-9.]*\)\],.*/\1/p" configure.ac); find -name test-suite.log | xargs cat
if [ -f $(pwd)/tests/test-suite.log ]; then echo '=== LOG FILE(S) END ==='
cat $(pwd)/tests/test-suite.log; exit 1
elif [ -f libvirt-$ver/_build/tests/test-suite.log ]; then )
cat libvirt-$ver/_build/tests/test-suite.log; "
else # Please keep this list sorted alphabetically
echo "=== NO LOG FILE FOUND ==="; - PACKAGES="
fi' augeas-tools
autoconf
automake
autopoint
bash-completion
ccache
dnsmasq-base
dwarves
ebtables
gcc
gettext
git
glusterfs-client
libacl1-dev
libapparmor-dev
libattr1-dev
libaudit-dev
libavahi-client-dev
libblkid-dev
libc6-dev
libcap-ng-dev
libc-dev-bin
libdbus-1-dev
libdevmapper-dev
libfuse-dev
libgnutls28-dev
libnetcf-dev
libnl-3-dev
libnl-route-3-dev
libnuma-dev
libopenwsman-dev
libparted-dev
libpcap-dev
libpciaccess-dev
librbd-dev
libreadline-dev
libsanlock-dev
libsasl2-dev
libselinux1-dev
libssh2-1-dev
libssh-dev
libtirpc-dev
libtool
libudev-dev
libxen-dev
libxml2-dev
libxml2-utils
libyajl-dev
lvm2
make
nfs-common
open-iscsi
parted
patch
perl
pkgconf
policykit-1
qemu-utils
radvd
scrub
sheepdog
systemtap-sdt-dev
xsltproc
zfs-fuse
"
notifications: notifications:
irc: irc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册