forked from pngwriter/pngwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (68 loc) · 2.44 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
language: cpp
sudo: required
dist: trusty
compiler:
- gcc
- clang
env:
global:
- CXXFLAGS="-Werror -Wall -Wshadow -Wextra -pedantic"
- BUILD=~/buildTmp
- LIBPNG_DOWNLOAD=http://download.sourceforge.net/libpng/libpng-
- LIBFREETYPE_DOWNLOAD=http://download.savannah.gnu.org/releases/freetype/freetype-
matrix:
- LIBPNG_VERSION=1.2.56 FREETYPE=OFF BUILD_TYPE=Release PERFTEST=OFF CPP11=OFF
- LIBPNG_VERSION=1.2.56 FREETYPE=2.4.12 BUILD_TYPE=Release PERFTEST=ON CPP11=OFF # risky due to stdlib 98/11 incomp.
- LIBPNG_VERSION=1.2.56 FREETYPE=2.4.12 BUILD_TYPE=Debug PERFTEST=ON CPP11=ON
- LIBPNG_VERSION=1.4.19 FREETYPE=2.4.12 BUILD_TYPE=Debug PERFTEST=OFF CPP11=OFF
- LIBPNG_VERSION=1.5.26 FREETYPE=2.5.5 BUILD_TYPE=Debug PERFTEST=OFF CPP11=OFF
- LIBPNG_VERSION=1.6.21 FREETYPE=2.6.3 BUILD_TYPE=Release PERFTEST=OFF CPP11=OFF
- LIBPNG_VERSION=1.7.0beta89 FREETYPE=2.7.1 BUILD_TYPE=Debug PERFTEST=OFF CPP11=OFF
matrix:
allow_failures:
- env: LIBPNG_VERSION=1.7.0beta89 FREETYPE=2.7.1 BUILD_TYPE=Debug PERFTEST=OFF CPP11=OFF
script:
- cd $BUILD
- if [ "$CPP11" == "ON" ]; then
export CXXFLAGS="$CXXFLAGS -std=c++11";
fi
- cmake -DBUILD_PERFORMANCE=$PERFTEST -DCMAKE_BUILD_TYPE=BUILD_TYPE $TRAVIS_BUILD_DIR
- make
# tests
- make test
# install
- sudo make install
before_script:
- uname -r
- lsb_release -a
# kick without checking dependencies
- sudo dpkg -r --force-depends libpng12-dev
- sudo dpkg -r --force-depends libpng12-0
- sudo dpkg -r --force-depends libfreetype6-dev
- sudo dpkg -r --force-depends libfreetype6
- sudo rm -rf /usr/include/freetype* /usr/lib/x86_64-linux-gnu/libfreetype*
- sudo rm -rf /usr/include/libpng12 /usr/include/png*.h /usr/lib/x86_64-linux-gnu/libpng*
# - sudo apt-get remove -qq libpng12-0 libpng14-0:i386
- sudo dpkg --get-selections
# BUILD libpng
- wget "$LIBPNG_DOWNLOAD$LIBPNG_VERSION.tar.xz"
- tar -xJf libpng-$LIBPNG_VERSION.tar.xz
- cd libpng-$LIBPNG_VERSION
- ls
- ./configure --prefix=/usr
- make
- sudo make install
- cd ..
- sudo find /usr/lib -name 'libpng*'
# BUILD libfreetype (depends on libpng)
- if [ "$FREETYPE" != "OFF" ]; then
wget "$LIBFREETYPE_DOWNLOAD$FREETYPE.tar.gz";
tar -xzf freetype-$FREETYPE.tar.gz;
cd freetype-$FREETYPE;
./configure --prefix=/usr;
make; sudo make install;
cd ..;
fi
- sudo find /usr/lib -name 'libfreetype*'
# create build dir
- mkdir -p $BUILD