1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-29 08:22:11 +02:00
This commit is contained in:
DarthSim 2018-10-30 23:28:48 +06:00
parent 159e6b3f33
commit 42ab2e5330
4 changed files with 176 additions and 49 deletions

41
.circleci/Dockerfile Normal file
View File

@ -0,0 +1,41 @@
FROM debian:stretch
RUN apt-get -qq update \
&& apt-get install -y --no-install-recommends bash unzip ca-certificates build-essential \
curl git mercurial make binutils bison gcc autoconf libtool automake swig \
gobject-introspection libglib2.0-dev libexpat1-dev libxml2-dev libfftw3-dev \
libjpeg-dev libpng-dev libwebp-dev libgif-dev libexif-dev liblcms2-dev gtk-doc-tools
RUN curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer | bash -
RUN \
for VIPS_VERSION in "8.3" "8.4" "8.5" "8.6" "8.7"; do \
mkdir -p /root/vips \
&& cd /root/vips \
&& mkdir /root/vips/$VIPS_VERSION \
&& curl -s -S -L -o $VIPS_VERSION.zip https://github.com/libvips/libvips/archive/$VIPS_VERSION.zip \
&& unzip $VIPS_VERSION.zip \
&& cd libvips-$VIPS_VERSION \
&& test -f autogen.sh && ./autogen.sh || ./bootstrap.sh \
&& ./configure \
--prefix=/root/vips/$VIPS_VERSION \
--without-python \
--without-gsf \
--without-orc \
--disable-debug \
--disable-dependency-tracking \
--disable-static \
--enable-silent-rules \
--enable-gtk-doc-html=no \
--enable-gtk-doc=no \
--enable-pyvips8=no \
&& make \
&& make install \
&& cd .. \
&& rm -rf $VIPS_VERSION.zip libvips-$VIPS_VERSION; \
done
WORKDIR /go/src
ENV GOPATH=/go
ENTRYPOINT [ "/bin/bash" ]

134
.circleci/config.yml Normal file
View File

@ -0,0 +1,134 @@
version: 2.1
workflows:
version: 2
build:
jobs:
- checkout_code
- build:
name: go1.11_vips8.7
requires:
- checkout_code
go_version: "1.11"
vips_version: "8.7"
- build:
name: go1.11_vips8.6
requires:
- checkout_code
go_version: "1.11"
vips_version: "8.6"
- build:
name: go1.11_vips8.5
requires:
- checkout_code
go_version: "1.11"
vips_version: "8.5"
- build:
name: go1.11_vips8.4
requires:
- checkout_code
go_version: "1.11"
vips_version: "8.4"
- build:
name: go1.11_vips8.3
requires:
- checkout_code
go_version: "1.11"
vips_version: "8.3"
- build:
name: go1.10_vips8.7
requires:
- checkout_code
go_version: "1.10"
vips_version: "8.7"
- build:
name: go1.10_vips8.6
requires:
- checkout_code
go_version: "1.10"
vips_version: "8.6"
- build:
name: go1.10_vips8.5
requires:
- checkout_code
go_version: "1.10"
vips_version: "8.5"
- build:
name: go1.10_vips8.4
requires:
- checkout_code
go_version: "1.10"
vips_version: "8.4"
- build:
name: go1.10_vips8.3
requires:
- checkout_code
go_version: "1.10"
vips_version: "8.3"
- build:
name: go1.10_vips8.7
requires:
- checkout_code
go_version: "1.9"
vips_version: "8.7"
- build:
name: go1.9_vips8.6
requires:
- checkout_code
go_version: "1.9"
vips_version: "8.6"
- build:
name: go1.9_vips8.5
requires:
- checkout_code
go_version: "1.9"
vips_version: "8.5"
- build:
name: go1.9_vips8.4
requires:
- checkout_code
go_version: "1.9"
vips_version: "8.4"
- build:
name: go1.9_vips8.3
requires:
- checkout_code
go_version: "1.9"
vips_version: "8.3"
jobs:
checkout_code:
docker:
- image: circleci/slim-base:latest
working_directory: /go/src/imgproxy
steps:
- checkout:
path: /go/src/imgproxy
- persist_to_workspace:
root: .
paths: [.]
build:
docker:
- image: "darthsim/imgproxy-circleci:latest"
working_directory: /go/src/imgproxy
environment:
BASH_ENV: "/root/.bashrc"
parameters:
go_version:
type: string
vips_version:
type: string
steps:
- attach_workspace:
at: .
- run:
name: Build imgproxy
command: |
gvm install go<< parameters.go_version >> -B
gvm use go<< parameters.go_version >>
export GOPATH=/go
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/vips/<< parameters.vips_version >>/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/root/vips/<< parameters.vips_version >>/lib/pkgconfig
export CGO_LDFLAGS_ALLOW="-s|-w"
go build -v

View File

@ -1,48 +0,0 @@
language: go
go:
- '1.9'
- '1.10'
- '1.11'
- tip
env:
- VIPS_VERSION=8.3
- VIPS_VERSION=8.4
- VIPS_VERSION=8.5
- VIPS_VERSION=8.6
- VIPS_VERSION=8.7
- VIPS_VERSION=master
matrix:
allow_failures:
- env: VIPS_VERSION=master
cache: apt
install:
- sudo apt-get -qq update
- sudo apt-get install -y build-essential libxml2-dev libfftw3-dev gobject-introspection libglib2.0-dev libwebp-dev libgif-dev gtk-doc-tools
- wget https://github.com/libvips/libvips/archive/$VIPS_VERSION.zip
- unzip $VIPS_VERSION.zip
- pushd libvips-$VIPS_VERSION
- test -f autogen.sh && ./autogen.sh || ./bootstrap.sh
- >
./configure
--prefix=/usr
--without-python
--without-gsf
--without-orc
--disable-debug
--disable-dependency-tracking
--disable-static
--enable-silent-rules
--enable-gtk-doc-html=no
--enable-gtk-doc=no
--enable-pyvips8=no
- make
- sudo make install
- popd
script:
- CGO_LDFLAGS_ALLOW="-s|-w" go build

View File

@ -3,7 +3,7 @@
<img align="right" width="200" height="200" title="imgproxy logo"
src="https://cdn.rawgit.com/DarthSim/imgproxy/master/logo.svg">
[![Build Status](https://api.travis-ci.org/DarthSim/imgproxy.svg?branch=master)](https://travis-ci.org/DarthSim/imgproxy) [![Docker](https://img.shields.io/badge/docker-darthsim%2Fimgproxy-blue.svg)](https://hub.docker.com/r/darthsim/imgproxy/) [![MicroBadger Size](https://img.shields.io/microbadger/image-size/darthsim/imgproxy.svg)](https://hub.docker.com/r/darthsim/imgproxy/) [![Docker Pulls](https://img.shields.io/docker/pulls/darthsim/imgproxy.svg)](https://hub.docker.com/r/darthsim/imgproxy/)
[![CircleCI](https://circleci.com/gh/DarthSim/imgproxy.svg?style=svg)](https://circleci.com/gh/DarthSim/imgproxy) [![Docker](https://img.shields.io/badge/docker-darthsim%2Fimgproxy-blue.svg)](https://hub.docker.com/r/darthsim/imgproxy/) [![MicroBadger Size](https://img.shields.io/microbadger/image-size/darthsim/imgproxy.svg)](https://hub.docker.com/r/darthsim/imgproxy/) [![Docker Pulls](https://img.shields.io/docker/pulls/darthsim/imgproxy.svg)](https://hub.docker.com/r/darthsim/imgproxy/)
imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.