[ci] Cache FreeType build on Travis

This commit is contained in:
Khaled Hosny 2019-03-14 21:41:25 +02:00
parent 7de9f92ee9
commit b1dfb8c850
2 changed files with 29 additions and 6 deletions

17
.ci/build-freetype.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
set -o errexit -o nounset
# 22.0.16 is the libtool version of 2.9.0
if pkg-config --atleast-version 22.0.16 freetype2; then exit; fi
pushd $HOME
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2
tar xf freetype-2.9.tar.bz2
pushd freetype-2.9
./autogen.sh
./configure --prefix=$HOME/.local
make -j4 install
popd
popd

View File

@ -16,9 +16,10 @@ matrix:
- os: linux - os: linux
compiler: gcc compiler: gcc
script: script:
# Remove these two lines when Travis updated its distro # Remove the following three lines when Travis updates its distro
- wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure && make -j4 && cd .. - export PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig"
- export LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" - export LD_LIBRARY_PATH="$HOME/.local/lib"
- bash .ci/build-freetype.sh
- ./autogen.sh - ./autogen.sh
- ./configure $CONFIGURE_OPTS --enable-gtk-doc --enable-code-coverage - ./configure $CONFIGURE_OPTS --enable-gtk-doc --enable-code-coverage
@ -34,9 +35,10 @@ matrix:
- os: linux - os: linux
compiler: clang compiler: clang
script: script:
# Remove these two lines when Travis updated its distro # Remove the following three lines when Travis updates its distro
- wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure && make -j4 && cd .. - export PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig"
- export LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" - export LD_LIBRARY_PATH="$HOME/.local/lib"
- bash .ci/build-freetype.sh
- ./autogen.sh - ./autogen.sh
- ./configure $CONFIGURE_OPTS - ./configure $CONFIGURE_OPTS
@ -57,6 +59,10 @@ notifications:
irc: "irc.freenode.org#harfbuzz" irc: "irc.freenode.org#harfbuzz"
email: harfbuzz-bots-chatter@googlegroups.com email: harfbuzz-bots-chatter@googlegroups.com
cache:
directories:
- /home/travis/.local
addons: addons:
apt: apt:
packages: packages: