forked from acaloiaro/bimg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,861 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
root = true | ||
|
||
[*] | ||
[*.go] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[Makefile] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
[*.yml] | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,33 @@ | ||
language: go | ||
|
||
dist: trusty | ||
sudo: false | ||
dist: focal | ||
sudo: required | ||
|
||
go: | ||
# - "1.10" | ||
#- "1.11" | ||
- "1.12" | ||
- "1.13" | ||
# - "tip" | ||
services: | ||
- docker | ||
|
||
env: | ||
# - LIBVIPS=7.42.3 | ||
# - LIBVIPS=8.2.3 | ||
# - LIBVIPS=8.3.3 | ||
# - LIBVIPS=8.4.6 | ||
# - LIBVIPS=8.5.8 | ||
- LIBVIPS=8.6.2 | ||
- LIBVIPS=8.8.4 | ||
- LIBVIPS=8.9.1 | ||
- LIBVIPS=master | ||
# - LIBVIPS=8.6.2 | ||
# - LIBVIPS=8.7.4 | ||
# - LIBVIPS=8.8.4 | ||
# - LIBVIPS=8.9.2 | ||
- LIBVIPS=8.10.1 | ||
- LIBVIPS=8.10.2 | ||
|
||
matrix: | ||
allow_failures: | ||
- env: LIBVIPS=7.42.3 | ||
- env: LIBVIPS=8.2.3 | ||
- env: LIBVIPS=8.3.3 | ||
- env: LIBVIPS=8.8.4 | ||
|
||
cache: | ||
apt: | ||
directories: | ||
- $HOME/libvips | ||
|
||
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: | ||
- > | ||
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 | ||
|
||
install: | ||
- go get -u golang.org/x/lint/golint | ||
- docker build -t h2non/bimg:ci --build-arg LIBVIPS_VERSION=$LIBVIPS . | ||
|
||
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 | ||
- docker run h2non/bimg:ci sh -c 'export LD_LIBRARY_PATH=/vips/lib:/usr/local/lib:$LD_LIBRARY_PATH; export PKG_CONFIG_PATH=/vips/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig; go vet . && 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
FROM golang:1.14 | ||
LABEL maintainer "[email protected]" | ||
|
||
ARG LIBVIPS_VERSION=8.9.2 | ||
ARG LIBHEIF_VERSION=1.9.1 | ||
ARG GOLANGCILINT_VERSION=1.29.0 | ||
|
||
# Installs libvips + required libraries | ||
RUN DEBIAN_FRONTEND=noninteractive \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
automake build-essential curl \ | ||
gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg62-turbo-dev libpng-dev \ | ||
libwebp-dev libtiff5-dev libgif-dev libexif-dev libxml2-dev libpoppler-glib-dev \ | ||
swig libmagickwand-dev libpango1.0-dev libmatio-dev libopenslide-dev libcfitsio-dev \ | ||
libgsf-1-dev fftw3-dev liborc-0.4-dev librsvg2-dev libimagequant-dev libaom-dev && \ | ||
cd /tmp && \ | ||
curl -fsSLO https://github.com/strukturag/libheif/releases/download/v${LIBHEIF_VERSION}/libheif-${LIBHEIF_VERSION}.tar.gz && \ | ||
tar zvxf libheif-${LIBHEIF_VERSION}.tar.gz && \ | ||
cd /tmp/libheif-${LIBHEIF_VERSION} && \ | ||
./configure --prefix=/vips && \ | ||
make && \ | ||
make install && \ | ||
echo '/vips/lib' > /etc/ld.so.conf.d/vips.conf && \ | ||
ldconfig -v && \ | ||
export LD_LIBRARY_PATH="/vips/lib:$LD_LIBRARY_PATH" && \ | ||
export PKG_CONFIG_PATH="/vips/lib/pkgconfig:$PKG_CONFIG_PATH" && \ | ||
cd /tmp && \ | ||
curl -fsSLO https://github.com/libvips/libvips/releases/download/v${LIBVIPS_VERSION}/vips-${LIBVIPS_VERSION}.tar.gz && \ | ||
tar zvxf vips-${LIBVIPS_VERSION}.tar.gz && \ | ||
cd /tmp/vips-${LIBVIPS_VERSION} && \ | ||
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 \ | ||
--prefix=/vips && \ | ||
make && \ | ||
make install && \ | ||
ldconfig | ||
|
||
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | ||
|
||
# Install runtime dependencies | ||
# RUN DEBIAN_FRONTEND=noninteractive \ | ||
# apt-get update && \ | ||
# apt-get install --no-install-recommends -y \ | ||
# libglib2.0-0 libjpeg62-turbo libpng16-16 libopenexr23 \ | ||
# libwebp6 libwebpmux3 libwebpdemux2 libtiff5 libgif7 libexif12 libxml2 libpoppler-glib8 \ | ||
# libmagickwand-6.q16-6 libpango1.0-0 libmatio4 libopenslide0 \ | ||
# libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libcfitsio7 libimagequant0 libheif1 && \ | ||
# apt-get autoremove -y && \ | ||
# apt-get autoclean && \ | ||
# apt-get clean && \ | ||
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Install Go lint | ||
RUN go get -u golang.org/x/lint/golint | ||
|
||
# ENV LD_LIBRARY_PATH="/vips/lib:$LD_LIBRARY_PATH" | ||
# ENV PKG_CONFIG_PATH="/vips/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig" | ||
|
||
WORKDIR ${GOPATH}/src/github.com/h2non/bimg | ||
COPY . . | ||
|
||
# RUN \ | ||
# # Clean up | ||
# apt-get remove -y automake curl build-essential && \ | ||
# apt-get autoremove -y && \ | ||
# apt-get autoclean && \ | ||
# apt-get clean && \ | ||
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
CMD [ "/bin/bash" ] |
Oops, something went wrong.