2017-05-06 04:30:08 +08:00
# Travis CI configuration for Tesseract
2015-09-07 01:54:05 +08:00
language : cpp
2019-07-12 16:49:59 +08:00
dist : xenial
2017-05-06 04:30:08 +08:00
env :
2019-01-16 00:36:05 +08:00
- LEPT_VER=1.77.0
2017-05-06 04:30:08 +08:00
2015-09-07 01:54:05 +08:00
notifications :
email : false
2017-04-22 23:51:39 +08:00
2017-05-06 04:30:08 +08:00
sudo : false
2015-09-07 01:54:05 +08:00
os :
- linux
2019-02-15 23:40:09 +08:00
- osx
2015-09-07 01:54:05 +08:00
2015-09-07 01:59:04 +08:00
addons :
apt :
sources :
2017-05-06 04:30:08 +08:00
#- ubuntu-toolchain-r-test
2015-09-07 01:59:04 +08:00
packages :
2019-03-05 22:52:15 +08:00
- libarchive-dev
2019-06-23 02:38:04 +08:00
- libpango1.0-dev
2017-05-06 04:30:08 +08:00
#- g++-6
2017-09-10 02:13:14 +08:00
#matrix:
#include:
#- os: osx
#install:
#script: brew install tesseract --HEAD
#cache:
#directories:
#- $HOME/Library/Caches/Homebrew
#allow_failures:
#- script: brew install tesseract --HEAD
2017-05-13 05:02:39 +08:00
2017-05-06 04:30:08 +08:00
cache :
directories :
- leptonica-$LEPT_VER
2015-09-07 01:59:04 +08:00
2015-09-07 02:15:04 +08:00
before_install :
2015-09-07 02:58:49 +08:00
- if [[ $TRAVIS_OS_NAME == linux ]]; then LINUX=true; fi
- if [[ $TRAVIS_OS_NAME == osx ]]; then OSX=true; fi
2017-04-22 23:51:39 +08:00
2015-09-07 01:54:05 +08:00
install :
2017-05-06 04:30:08 +08:00
#- if [[ $LINUX && "$CXX" = "g++" ]]; then export CXX="g++-6" CC="gcc-6"; fi
- if test ! -d leptonica-$LEPT_VER/src; then curl -Ls https://github.com/DanBloomberg/leptonica/archive/$LEPT_VER.tar.gz | tar -xz; fi
2017-06-05 19:30:49 +08:00
- if test ! -d leptonica-$LEPT_VER/usr; then cmake -Hleptonica-$LEPT_VER -Bleptonica-$LEPT_VER/build -DCMAKE_INSTALL_PREFIX=leptonica-$LEPT_VER/usr; fi
- if test ! -e leptonica-$LEPT_VER/usr/lib/libleptonica.so; then make -C leptonica-$LEPT_VER/build install; fi
2015-09-07 01:54:05 +08:00
script :
- mkdir build
- cd build
2019-01-16 18:16:51 +08:00
- cmake .. -DLeptonica_DIR=leptonica-$LEPT_VER/build -DCPPAN_BUILD=OFF
2015-09-07 01:54:05 +08:00
- make