mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-15 02:15:54 -07:00
feat: add Dockerfile / Docker-driven CI job
This commit is contained in:
parent
a1976273e7
commit
5aca0ea5b1
6 changed files with 99 additions and 138 deletions
126
.travis.yml
126
.travis.yml
|
|
@ -3,9 +3,8 @@ language: go
|
|||
dist: xenial
|
||||
sudo: required
|
||||
|
||||
go:
|
||||
# - "1.13"
|
||||
- "1.14"
|
||||
services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
# - LIBVIPS=7.42.3
|
||||
|
|
@ -29,118 +28,15 @@ cache:
|
|||
directories:
|
||||
- $HOME/libvips
|
||||
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
# use a more recent imagemagick instead of 6.8.9-9
|
||||
- sourceline: 'ppa:cran/imagemagick'
|
||||
- sourceline: 'ppa:strukturag/libheif'
|
||||
- sourceline: 'ppa:strukturag/libde265'
|
||||
packages:
|
||||
- curl
|
||||
- automake
|
||||
- gtk-doc-tools
|
||||
- gobject-introspection
|
||||
- python3-pip
|
||||
- python3-setuptools
|
||||
- python3-wheel
|
||||
- libfftw3-dev
|
||||
- libexif-dev
|
||||
- libjpeg-turbo8-dev
|
||||
- libpng12-dev
|
||||
- libwebp-dev
|
||||
# missing on xenial, unfortunately
|
||||
# - libwebpmux2
|
||||
- libtiff5-dev
|
||||
- libheif-dev
|
||||
- libexpat1-dev
|
||||
- libmagick++-dev
|
||||
- libcfitsio3-dev
|
||||
- libgsl0-dev
|
||||
- libmatio-dev
|
||||
- liborc-0.4-dev
|
||||
- liblcms2-dev
|
||||
- libpoppler-glib-dev
|
||||
- librsvg2-dev
|
||||
- libgif-dev
|
||||
- libopenexr-dev
|
||||
- libpango1.0-dev
|
||||
- libgsf-1-dev
|
||||
- libopenslide-dev
|
||||
- libffi-dev
|
||||
before_install:
|
||||
- docker build -t bimg:testing --build-arg LIBVIPS_VERSION=$LIBVIPS .
|
||||
|
||||
script:
|
||||
- >
|
||||
cd /tmp && \
|
||||
curl -fsSLO https://github.com/libvips/libvips/releases/download/v${LIBVIPS}/vips-${LIBVIPS}.tar.gz && \
|
||||
tar zvxf vips-${LIBVIPS}.tar.gz && \
|
||||
cd /tmp/vips-${LIBVIPS} && \
|
||||
test -f autogen.sh && ./autogen.sh || ./bootstrap.sh && \
|
||||
CFLAGS="-g -O3" CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -g -O3" \
|
||||
./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 \
|
||||
--prefix=$HOME/libvips $1 && \
|
||||
make && \
|
||||
make install && \
|
||||
ldconfig
|
||||
- cd ..
|
||||
- export PATH=$PATH:$HOME/libvips/bin
|
||||
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/libvips/lib/pkgconfig
|
||||
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/libvips/lib
|
||||
- vips --vips-version
|
||||
- go get -u golang.org/x/lint/golint
|
||||
- docker run bimg:testing sh -c 'go vet . && golint . && go test -v -race -covermode=atomic -coverprofile=coverage.out'
|
||||
# - diff -u <(echo -n) <(gofmt -s -d ./)
|
||||
# - diff -u <(echo -n) <(go vet ./)
|
||||
# - diff -u <(echo -n) <(golint ./)
|
||||
# - go test -v -race -covermode=atomic -coverprofile=coverage.out
|
||||
|
||||
# - >
|
||||
# test "$LIBVIPS" != "master" -a "$LIBVIPS" \< "8.4" \
|
||||
# && wget http://www.vips.ecs.soton.ac.uk/supported/${LIBVIPS%.*}/vips-${LIBVIPS}.tar.gz -O vips.tgz \
|
||||
# || echo ":-)"
|
||||
# - >
|
||||
# test "$LIBVIPS" != "master" -a "$LIBVIPS" \> "8.4" \
|
||||
# && wget https://github.com/libvips/libvips/archive/v${LIBVIPS}.tar.gz -O vips.tgz \
|
||||
# || echo ":-)"
|
||||
# - >
|
||||
# test $LIBVIPS == "master" \
|
||||
# && wget https://github.com/libvips/libvips/archive/${LIBVIPS}.tar.gz -O vips.tgz \
|
||||
# || echo ":-)"
|
||||
# - mkdir libvips
|
||||
# - tar xf vips.tgz -C libvips --strip-components 1
|
||||
# - cd libvips
|
||||
# - test -f autogen.sh && ./autogen.sh || ./bootstrap.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
|
||||
# --prefix=$HOME/libvips
|
||||
# $1
|
||||
# - make
|
||||
# - make install
|
||||
# - cd ..
|
||||
# - export PATH=$PATH:$HOME/libvips/bin
|
||||
# - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/libvips/lib/pkgconfig
|
||||
# - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/libvips/lib
|
||||
# - vips --vips-version
|
||||
# script:
|
||||
- diff -u <(echo -n) <(gofmt -s -d ./)
|
||||
- diff -u <(echo -n) <(go vet ./)
|
||||
- diff -u <(echo -n) <(golint ./)
|
||||
- go test -v -race -covermode=atomic -coverprofile=coverage.out
|
||||
|
||||
after_success:
|
||||
- goveralls -coverprofile=coverage.out -service=travis-ci
|
||||
# after_success:
|
||||
# - goveralls -coverprofile=coverage.out -service=travis-ci
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue