Skip to content

Commit 414a57d

Browse files
saurabhshricfsmp3
authored andcommitted
[FIX] Travis build for macOS. Also add cmake build test. (#1063)
* Fix macOS travis build and remove linux builds. * Add Apple logo for macOS build badge. * Link the apple logo to travis build. * Correct redundant compiler type.
1 parent 6d7c60f commit 414a57d

File tree

2 files changed

+98
-22
lines changed

2 files changed

+98
-22
lines changed

.travis.yml

Lines changed: 97 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,101 @@
11
language: c
2-
os:
3-
- osx
4-
- linux
5-
6-
sudo:
7-
- true
82

9-
compiler:
10-
- gcc
11-
- clang
3+
matrix:
4+
include:
5+
- os: osx
6+
osx_image: xcode10.1
7+
compiler: gcc
8+
addons:
9+
homebrew:
10+
packages:
11+
autoconf
12+
libtool
13+
tesseract
14+
leptonica
15+
script:
16+
- cd mac
17+
- ./build.command
18+
- ./ccextractor --version
1219

13-
before_install:
14-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew upgrade automake; brew install pkg-config autoconf automake libtool tesseract leptonica; fi
15-
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install -y libcurl4-gnutls-dev tesseract-ocr tesseract-ocr-dev libleptonica-dev autoconf-archive; fi
16-
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install python-distutils-extra tesseract-ocr tesseract-ocr-eng libopencv-dev libtesseract-dev libleptonica-dev python-all-dev swig libcv-dev python-opencv python-numpy python-setuptools build-essential subversion; fi
17-
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then wget https://github.com/DanBloomberg/leptonica/releases/download/1.74.4/leptonica-1.74.4.tar.gz && tar xvf leptonica-1.74.4.tar.gz; cd leptonica-1.74.4; ./configure && make && sudo make install; cd ..; fi
18-
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then git clone https://github.com/tesseract-ocr/tesseract.git; cd tesseract; ./autogen.sh; ./configure --enable-debug; LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make; sudo make install; sudo ldconfig; cd ..; fi
20+
- os: osx
21+
osx_image: xcode10.1
22+
compiler: clang
23+
addons:
24+
homebrew:
25+
packages:
26+
autoconf
27+
libtool
28+
tesseract
29+
leptonica
30+
script:
31+
- cd mac
32+
- ./build.command
33+
- ./ccextractor --version
1934

20-
script:
21-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd mac; ./build.command; cd ..; fi
22-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd mac; ./autogen.sh; ./configure; make; cd ..; fi
23-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd linux; ./build; cd ..; fi
24-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir build; cd build; cmake ../src/; make; cd ..; fi
25-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd linux; ./autogen.sh; ./configure; make; cd ..; fi
35+
- os: osx
36+
osx_image: xcode10.1
37+
compiler: gcc
38+
addons:
39+
homebrew:
40+
packages:
41+
autoconf
42+
libtool
43+
tesseract
44+
leptonica
45+
script:
46+
- cd mac
47+
- ./autogen.sh
48+
- ./configure
49+
- make
50+
- ./ccextractor --version
51+
52+
- os: osx
53+
osx_image: xcode10.1
54+
compiler: clang
55+
addons:
56+
homebrew:
57+
packages:
58+
autoconf
59+
libtool
60+
tesseract
61+
leptonica
62+
script:
63+
- cd mac
64+
- ./autogen.sh
65+
- ./configure
66+
- make
67+
- ./ccextractor --version
68+
69+
- os: osx
70+
osx_image: xcode10.1
71+
compiler: gcc
72+
addons:
73+
homebrew:
74+
packages:
75+
autoconf
76+
libtool
77+
tesseract
78+
leptonica
79+
script:
80+
- mkdir build
81+
- cd build
82+
- cmake ../src/
83+
- make
84+
- ./ccextractor --version
85+
86+
- os: osx
87+
osx_image: xcode10.1
88+
compiler: clang
89+
addons:
90+
homebrew:
91+
packages:
92+
autoconf
93+
libtool
94+
tesseract
95+
leptonica
96+
script:
97+
- mkdir build
98+
- cd build
99+
- cmake ../src/
100+
- make
101+
- ./ccextractor --version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# CCExtractor
44

5-
[![Build Status](https://travis-ci.org/CCExtractor/ccextractor.svg?branch=master)](https://travis-ci.org/CCExtractor/ccextractor)
5+
<a href="https://travis-ci.org/CCExtractor/ccextractor"><img src="https://raw.githubusercontent.com/CCExtractor/ccextractor-org-media/master/static/macOS-build-badge-logo.png" width="20"></a> [![Build Status](https://travis-ci.org/CCExtractor/ccextractor.svg?branch=master)](https://travis-ci.org/CCExtractor/ccextractor)
66
[![Sample-Platform Build Status Windows](https://sampleplatform.ccextractor.org/static/img/status/build-windows.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/windows)
77
[![Sample-Platform Build Status Linux](https://sampleplatform.ccextractor.org/static/img/status/build-linux.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/linux)
88
[![SourceForge](https://img.shields.io/badge/SourceForge%20downloads-213k%2Ftotal-brightgreen.svg)](https://sourceforge.net/projects/ccextractor/)

0 commit comments

Comments
 (0)