summaryrefslogtreecommitdiff
blob: e272433602367f824c9082384c0561ca9a8163bd (plain)
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
# Travis CI configuration for Tesseract

language: cpp

dist: bionic
#osx_image: xcode12.2

env:
  - LEPT_VER=1.78.0

notifications:
  email: false

sudo: false

os:
  - linux
  - osx

addons:
  apt:
    sources:
    #- ubuntu-toolchain-r-test
    packages:
      - libarchive-dev
      - libpango1.0-dev
    #- g++-6

#matrix:
  #include:
    #- os: osx
      #install:
      #script: brew install tesseract --HEAD
      #cache:
        #directories:
          #- $HOME/Library/Caches/Homebrew
  #allow_failures:
    #- script: brew install tesseract --HEAD

cache:
  directories:
  - leptonica-$LEPT_VER

before_install:
  - if [[ $TRAVIS_OS_NAME == linux   ]]; then LINUX=true; fi
  - if [[ $TRAVIS_OS_NAME == osx     ]]; then OSX=true; fi

install:
  #- 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
  - 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