2016-05-20 03:05:37 +03:00
|
|
|
language: go
|
2016-10-20 21:51:44 +03:00
|
|
|
os: linux
|
|
|
|
dist: trusty
|
|
|
|
sudo: require
|
|
|
|
|
2016-05-20 03:05:37 +03:00
|
|
|
go:
|
2016-08-31 23:58:56 +03:00
|
|
|
- 1.7
|
2016-10-20 21:51:44 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
- LIBVIRT=1.2.2 EXT=gz
|
|
|
|
- LIBVIRT=2.3.0 EXT=xz
|
|
|
|
|
2016-05-20 03:05:37 +03:00
|
|
|
before_install:
|
|
|
|
- go get github.com/golang/lint/golint
|
2016-10-20 21:51:44 +03:00
|
|
|
|
|
|
|
install:
|
|
|
|
# credit here goes to the go-libvirt authors,
|
|
|
|
# see: https://github.com/rgbkrk/libvirt-go/blob/master/.travis.yml
|
|
|
|
- sudo apt-get -qqy build-dep libvirt
|
|
|
|
- sudo apt-get -qqy install curl qemu-system-x86
|
|
|
|
- sudo mkdir -p /usr/src && sudo chown $(id -u) /usr/src
|
|
|
|
- curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT}
|
|
|
|
- tar -C /usr/src -xf libvirt-${LIBVIRT}.tar.${EXT}
|
|
|
|
- pushd /usr/src/libvirt-${LIBVIRT}
|
|
|
|
- |
|
|
|
|
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
|
|
|
|
--without-polkit \
|
|
|
|
--without-esx --without-vbox --without-xen --without-libxl --without-lxc \
|
|
|
|
--with-qemu
|
|
|
|
- make
|
|
|
|
- sudo make install
|
|
|
|
- popd
|
|
|
|
- sudo libvirtd -d -l -f libvirtd.conf
|
|
|
|
- sudo virtlogd -d || true
|
|
|
|
|
2016-05-20 03:05:37 +03:00
|
|
|
before_script:
|
|
|
|
- go get -d ./...
|
2016-12-01 04:37:30 +03:00
|
|
|
- sudo qemu-img create -f raw -o size=10M /var/lib/libvirt/images/test.raw
|
2017-01-07 00:58:27 +03:00
|
|
|
- sudo virsh define .travis/test-domain.xml
|
2016-12-01 04:37:30 +03:00
|
|
|
- sudo virsh start test
|
2017-01-07 00:58:27 +03:00
|
|
|
- sudo virsh pool-create .travis/test-pool.xml
|
2016-10-20 21:51:44 +03:00
|
|
|
|
2016-05-20 03:05:37 +03:00
|
|
|
script:
|
|
|
|
- ./scripts/licensecheck.sh
|
|
|
|
- go build ./...
|
2016-10-05 03:26:25 +03:00
|
|
|
- golint -set_exit_status ./...
|
2016-05-20 03:05:37 +03:00
|
|
|
- go vet ./...
|
2016-10-20 21:51:44 +03:00
|
|
|
- go test -v -tags=integration ./...
|