forked from fontforge/fontforge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (117 loc) · 5.8 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
language: c
compiler: gcc
sudo: false
dist: trusty
osx_image: xcode8
branches:
only:
- master
- travis
- coverity_scan
os:
- linux
- osx
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
packages: [autoconf, automake, autotools-dev, bzip2, gcc-4.9, libtool,
libjpeg-dev, libtiff4-dev, libpng12-dev, libfreetype6-dev, libgif-dev,
libx11-dev, libxml2-dev, libpango1.0-dev, libcairo2-dev, python3.5-dev]
coverity_scan:
project:
name: "fontforge/fontforge"
description: "Free (libre) font editor for Windows, Mac OS X and GNU+Linux"
build_command_prepend: cov-configure --comptype gcc --compiler $CC --template && ./bootstrap --force && ./configure $FFCONFIG
build_command: make -j4
branch_pattern: coverity_scan
notification_email: [email protected]
cache:
directories:
- $TRAVIS_BUILD_DIR/travisdeps
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update || brew update; fi
install:
- |
set -e
export DEPSPREFIX=$TRAVIS_BUILD_DIR/travisdeps
export PREFIX=$TRAVIS_BUILD_DIR/target
export PATH=$PATH:$DEPSPREFIX/bin:$PREFIX/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEPSPREFIX/lib:$PREFIX/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$DEPSPREFIX/lib/pkgconfig
export FFCONFIG="--prefix=$PREFIX"
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export FTVER=`dpkg -s libfreetype6-dev | perl -ne 'print $1 if /^Version: (\d+(?:\.\d+)+)/'`
export SFFTVER=`echo $FTVER | perl -ne 'print $1 if /^(\d+(?:\.\d+){1,2})/'`
export FFCONFIG="$FFCONFIG --with-freetype-source=$DEPSPREFIX/freetype-$FTVER"
export CC=gcc-4.9
# This block only runs if the cache isn't present.
if [ ! "$(ls -A $DEPSPREFIX)" ]; then
mkdir -p work && pushd work
wget 'https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz' -O - |tar -zxf -
wget 'https://github.com/zeromq/czmq/releases/download/v3.0.2/czmq-3.0.2.tar.gz' -O - |tar -zxf -
wget 'https://github.com/fontforge/libspiro/releases/download/0.5.20150702/libspiro-0.5.20150702.tar.gz' -O - | tar -zxf -
wget 'https://github.com/fontforge/libuninameslist/releases/download/20160701/libuninameslist-20160701.tar.gz' -O - | tar -zxf -
wget 'https://bitbucket.org/sortsmill/libunicodenames/downloads/libunicodenames-1.1.0_beta1.tar.xz' -O - | tar -Jxf -
wget --tries 1 "http://download.savannah.gnu.org/releases/freetype/freetype-$FTVER.tar.gz" || \
wget "https://sourceforge.net/projects/freetype/files/freetype2/$SFFTVER/freetype-$FTVER.tar.gz"
pushd zeromq-4.1.5 && ./configure --prefix=$DEPSPREFIX && make -j4 && make install && popd
pushd czmq-3.0.2 && ./configure --prefix=$DEPSPREFIX && make -j4 && make install && popd
pushd libspiro-0.5.20150702 && ./configure --prefix=$DEPSPREFIX && make -j4 && make install && popd
pushd libuninameslist-20160701 && ./configure --prefix=$DEPSPREFIX && make -j4 && make install && popd
pushd libunicodenames-1.1.0_beta1 && ./configure --prefix=$DEPSPREFIX && make -j4 && make install && popd
tar -zxf freetype-$FTVER.tar.gz -C $DEPSPREFIX
popd
fi
# These are FF-specific mods (set here so it runs also in Coverity)
export PYTHON=python3.5
export PYTHONPATH=$PYTHONPATH:$PREFIX/lib/python$($PYTHON -c "import sys; print('{0}.{1}'.format(sys.version_info.major, sys.version_info.minor))")/site-packages
export CFLAGS="-fdiagnostics-color=auto -Wall -Wno-switch"
#Why.
export LIBSPIRO_CFLAGS=`pkg-config --cflags libspiro` && export LIBSPIRO_LIBS=`pkg-config --libs libspiro`
export LIBUNINAMESLIST_CFLAGS=`pkg-config --cflags libuninameslist` && export LIBUNINAMESLIST_LIBS=`pkg-config --libs libuninameslist`
else
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
export MSGFMT=/usr/local/opt/gettext/bin/msgfmt
export PYTHON=python
export PYTHONPATH=$PYTHONPATH:$PREFIX/lib/python2.7/site-packages
# IPython??
# pip install ipython
# Disable fc-cache on fontconfig install. Because it's slow.
sed -i.bak '/fc-cache/d' "$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/fontconfig.rb"
# Install cairo and pango, using cached bottles if possible
pushd $DEPSPREFIX
brew install *cairo*bottle* || (brew install --build-bottle cairo --with-x11 && brew bottle cairo)
brew install *pango*bottle* || (brew install --build-bottle pango --with-x11 && brew bottle pango)
brew outdated | grep -q cairo && rm *cairo*bottle* || true
brew outdated | grep -q pango && rm *pango*bottle* || true
popd
brew install ./travis-scripts/fontforge.rb --HEAD --with-x11 --only-dependencies
fi
set +e
script:
- ./bootstrap
- ./configure $FFCONFIG
- make -j4
- make install
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then make distcheck -j4; fi
- fontforge -version
- $PYTHON -c "import fontforge; import psMat; print(fontforge.__version__, fontforge.version())"
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then travis-scripts/ffosxbuild.sh $PREFIX $TRAVIS_COMMIT; fi
deploy:
provider: bintray
file: "travis-scripts/bintray_descriptor.json"
user: "fontforge-ci-bot"
dry-run: false
key:
secure: Uf8EJV4m5uCicRQmn5eEnP/LSYzW0By9iI2vID/qS5zo3787qCtqWeovBJEUgkRk7aU6OlnIQ0w9WVBxGlElAkoaqbZs+RWYnv5JS/mX98+fFTYhtz9u0A5GTo8+IOgv1jho28Yrt9HaFRfFhBOSqNucGvDKeS3RMRywEaQmzMQ=
on:
condition: $TRAVIS_OS_NAME = osx
branch:
- master
- travis
env:
global:
# For Coverity
- secure: "MeTS1Pqa5gzx1nn/peW/9a5kq84bba3XYUljOfkCUqzuyGiERk/nmok+RW7skrgzboBlKxnNG8+ykKqHMwK9s9M83ezFxvEWXBcKEpmEQKkqXPI5hpMs6jGLTgpeuheSIzqHA3danV8iircp1GOiTLWA0pt/AOsNLZiaYBh0OiE="