forked from thumbor/thumbor-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (74 loc) · 2.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "pypy"
- "pypy3"
matrix:
fast_finish: true
allow_failures:
- python: "3.3"
- python: "3.4"
- python: "pypy3"
- python: "pypy"
env:
- PROJECT_DIR=$PWD
install:
- sudo apt-get update -y
- sudo apt-get -y install build-essential cmake libtool libwebp-dev unzip python-dev aptitude autoconf automake m4 nasm pkg-config libpng-dev libmagickcore-dev libmagickwand-dev pngnq pngcrush pngquant
- pip install setuptools
# install openjpeg for jpeg2000 support
- cd ~
- wget https://github.com/uclouvain/openjpeg/archive/version.2.0.1.tar.gz
- tar xf version.2.0.1.tar.gz
- cd openjpeg-version.2.0.1
- cmake .
- make
- sudo make install
- sudo make clean
# reload libs so pillow will find jpeg2000
- sudo ldconfig /usr/lib
# install pngquant2
- cd ~
- wget https://github.com/pornel/pngquant/archive/2.5.0.tar.gz
- tar xf 2.5.0.tar.gz
- cd pngquant-2.5.0
- make
- sudo make install
# install imgmin
- cd ~
- sudo apt-get install imagemagick libgraphicsmagick1-dev libmagickwand-dev perlmagick apache2-prefork-dev
- wget https://github.com/rflynn/imgmin/archive/v1.1.tar.gz
- tar xf v1.1.tar.gz
- cd imgmin-1.1
# because of https://github.com/rflynn/imgmin/issues/21
- cp $PROJECT_DIR/imgmin_apache2_makefile.am src/apache2/Makefile.am
- autoreconf -fi
- ./configure
- make
- sudo make install
# install aptitude packages
- cd $PROJECT_DIR
- LDFLAGS=-lm sudo aptitude install -y $(< requirements)
- make setup
# installing mozjpeg before pillow (make setup) or there will be errors
- cd ~
- wget https://github.com/mozilla/mozjpeg/archive/v3.1.tar.gz
- tar xf v3.1.tar.gz
- cd mozjpeg-3.1/
- autoreconf -fiv
- mkdir build
- cd build
- sh ../configure --disable-shared --enable-static --prefix=/usr/local
- sudo make install
# install zopflipng
- cd ~
- wget https://github.com/google/zopfli/archive/zopfli-1.0.1.tar.gz
- tar xf zopfli-1.0.1.tar.gz
- cd zopfli-zopfli-1.0.1
- make zopflipng
- sudo cp zopflipng /usr/local/bin
- cd $PROJECT_DIR
script:
- make test