Skip to content

Commit 6714258

Browse files
committed
ci: set up matrix builds with different QEMU and libvirt versions
1 parent a8293e2 commit 6714258

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.travis.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,49 @@
11
language: go
2+
os: ubuntu
3+
dist: trusty
4+
sudo: require
5+
26
go:
3-
- 1.7
7+
- 1.x
8+
9+
env:
10+
- QEMU=2.9.0 QEMU_EXT=xz LIBVIRT=1.2.2 LIBVIRT_EXT=gz
11+
- QEMU=2.9.0 QEMU_EXT=xz LIBVIRT=2.3.0 LIBVIRT_EXT=xz
12+
- QEMU=2.9.0 QEMU_EXT=xz LIBVIRT=3.1.0 LIBVIRT_EXT=xz
13+
14+
install:
15+
- sudo apt-get -qqy build-dep qemu-system-x86 libvirt
16+
- sudo apt-get -qqy install curl
17+
- sudo mkdir -p /usr/src && sudo chown $(id -u) /usr/src
18+
- curl -O -L -s http://download.qemu-project.org/qemu-${QEMU}.tar.${QEMU_EXT}
19+
- tar -C /usr/src -xf qemu-${QEMU}.tar.${QEMU_EXT}
20+
- pushd /usr/src/qemu-${QEMU}
21+
- |
22+
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
23+
--disable-docs \
24+
--target-list=x86_64-softmmu
25+
- make
26+
- sudo make install
27+
- popd
28+
- curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${LIBVIRT_EXT}
29+
- tar -C /usr/src -xf libvirt-${LIBVIRT}.tar.${LIBVIRT_EXT}
30+
- pushd /usr/src/libvirt-${LIBVIRT}
31+
- |
32+
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
33+
--without-polkit \
34+
--without-esx --without-vbox --without-xen --without-libxl --without-lxc \
35+
--with-qemu
36+
- make
37+
- sudo make install
38+
- popd
39+
- sudo libvirtd -d -l -f .travis/libvirtd.conf
40+
- sudo virtlogd -d || true
41+
- rm qemu-${QEMU}.tar.${QEMU_EXT} libvirt-${LIBVIRT}.tar.${LIBVIRT_EXT}
42+
443
before_install:
544
- go get github.com/golang/lint/golint
645
- go get golang.org/x/tools/cmd/stringer
46+
747
before_script:
848
- go get -d ./...
949
script:

.travis/libvirtd.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# libvirtd configuration for travis-ci
2+
listen_tls = 0
3+
listen_tcp = 1
4+
tcp_port = "16509"
5+
listen_addr = "127.0.0.1"
6+
auth_unix_rw = "none"
7+
auth_tcp = "none"

0 commit comments

Comments
 (0)