From eef2fe703507bc18457aee0eea13cc2ff3ec9fab Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Wed, 24 Aug 2016 08:01:07 +0200 Subject: [PATCH] Update travis build We need to manually build of vips from master because of the Poppler requirements that is too strong in 8.3.3. --- .travis.yml | 43 ++++++++++++++++++++++++++++++++++++++++++- image_test.go | 6 +++--- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99b56ee..111aaac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +sudo: required +dist: trusty +cache: apt language: go go: @@ -5,8 +8,46 @@ go: - 1.5 - tip +addons: + apt: + packages: + - gobject-introspection + - gtk-doc-tools + - libcfitsio3-dev + - libfftw3-dev + - libgif-dev + - libgs-dev + - libgsf-1-dev + - libmatio-dev + - libopenslide-dev + - liborc-0.4-dev + - libpango1.0-dev + - libpoppler-glib-dev + - libwebp-dev + +# VIPS 8.3.3 requires Poppler 0.30 which is not released on Trusty. before_install: - - curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash - + - wget https://github.com/jcupitt/libvips/archive/master.zip + - unzip master + - cd libvips-master + - ./autogen.sh + - > + CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 + ./configure + --disable-debug + --disable-dependency-tracking + --disable-introspection + --disable-static + --enable-gtk-doc-html=no + --enable-gtk-doc=no + --enable-pyvips8=no + --without-orc + --without-python + $1 + - make + - sudo make install + - sudo ldconfig + - cd .. before_script: - go get -u github.com/golang/lint/golint diff --git a/image_test.go b/image_test.go index 54d71f9..0726fae 100644 --- a/image_test.go +++ b/image_test.go @@ -23,21 +23,21 @@ func TestImageResize(t *testing.T) { func TestImageGifResize(t *testing.T) { _, err := initImage("test.gif").Resize(300, 240) if err == nil { - t.Errorf("GIF shouldn't be saved within VIPS.") + t.Errorf("GIF shouldn't be saved within VIPS") } } func TestImagePdfResize(t *testing.T) { _, err := initImage("test.pdf").Resize(300, 240) if err == nil { - t.Errorf("PDF cannot be saved within VIPS.") + t.Errorf("PDF cannot be saved within VIPS") } } func TestImageSvgResize(t *testing.T) { _, err := initImage("test.svg").Resize(300, 240) if err == nil { - t.Errorf("SVG cannot be saved within VIPS.") + t.Errorf("SVG cannot be saved within VIPS") } }