mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 15:39:04 +08:00
ac52eb3227
travis: osx_image: xcode12.2 prefix travis: move export under script, use brew --prefix travis: change leptonica version to 1.80 travis: setup matrix for osx and linux travis: remove brew update travis: try to fix tiff linkage on osx travis: add macos cache
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
# Travis CI configuration for Tesseract
|
|
|
|
language: cpp
|
|
|
|
notifications:
|
|
email: false
|
|
|
|
sudo: false
|
|
|
|
matrix:
|
|
include:
|
|
- os: osx
|
|
osx_image: xcode12.2
|
|
before_cache:
|
|
- brew cleanup
|
|
cache:
|
|
ccache: true
|
|
directories:
|
|
- $HOME/Library/Caches/Homebrew
|
|
before_install:
|
|
- brew install ccache
|
|
install:
|
|
- brew install ninja libtiff leptonica libarchive pango cairo icu4c
|
|
script:
|
|
- |
|
|
export PKG_CONFIG_PATH=$(brew --prefix)/opt/icu4c/lib/pkgconfig:$(brew --prefix)/opt/libarchive/lib/pkgconfig:/$(brew --prefix)/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
mkdir build
|
|
mkdir inst
|
|
cmake \
|
|
-S . \
|
|
-B build \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=inst
|
|
cmake --build build --config Release --target install
|
|
|
|
- os: linux
|
|
dist: bionic
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libarchive-dev
|
|
- libpango1.0-dev
|
|
- libicu-dev
|
|
env:
|
|
- LEPT_VER=1.80.0
|
|
cache:
|
|
directories:
|
|
- leptonica-$LEPT_VER
|
|
install:
|
|
- if test ! -d leptonica-$LEPT_VER/src; then curl -Ls https://github.com/DanBloomberg/leptonica/archive/$LEPT_VER.tar.gz | tar -xz; fi
|
|
- 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
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- cmake .. -DLeptonica_DIR=leptonica-$LEPT_VER/build -DSW_BUILD=OFF
|
|
- make
|
|
- sudo make install
|
|
|