1+ name : linux
2+ on : push
3+
4+ jobs :
5+ build :
6+ name : Build ${{ matrix.binary }}
7+ runs-on : ubuntu-20.04
8+ strategy :
9+ fail-fast : false
10+ matrix :
11+ include :
12+ - binary : libtesseract64.so
13+ steps :
14+ 15+ - name : Install Dependencies
16+ run : |
17+ sudo apt-get update
18+ sudo apt-get install -y g++-10 autoconf ninja-build
19+
20+ - name : Build Leptonica
21+ run : |
22+ echo "Building leptonica..."
23+ git clone --depth 1 https://github.com/DanBloomberg/leptonica.git
24+ cd leptonica
25+ ./autogen.sh
26+ ./configure '--with-pic' '--disable-shared' '--without-libpng' '--without-zlib' '--without-jpeg' '--without-libtiff' '--without-giflib' '--without-libwebp' '--without-libwebpmux' '--without-libopenjpeg' '--disable-programs' 'CXX=g++-10' 'CFLAGS=-D DEFAULT_SEVERITY=L_SEVERITY_ERROR -g0 -O3'
27+ make
28+ sudo make install
29+
30+ - name : Build Tesseract
31+ run : |
32+ echo "Building Tesseract..."
33+ git clone --depth 1 --branch 5.2.0 https://github.com/tesseract-ocr/tesseract.git
34+ cd tesseract
35+ ./autogen.sh
36+ ./configure '--with-pic' '--disable-shared' '--disable-legacy' '--disable-graphics' '--disable-openmp' '--without-curl' '--without-archive' '--disable-doc' 'CXX=g++-10' 'CXXFLAGS=-DTESS_EXPORTS -g0 -O3 -ffast-math'
37+ make
38+ sudo make install install
39+
40+ - name : Build Library
41+ run : |
42+ mkdir -p build
43+ cmake -S . -B build -G Ninja
44+ cmake --build build --config Release
45+
46+ - name : Print Library Dependencies
47+ run : |
48+ ldd build/${{ matrix.binary }}
49+
50+ 51+ with :
52+ name : ${{ matrix.binary }}
53+ path : build/${{ matrix.binary }}
54+ retention-days : 5
55+
56+ test :
57+ name : Test ${{ matrix.binary }}
58+ runs-on : ubuntu-20.04
59+ needs : build
60+ strategy :
61+ fail-fast : false
62+ matrix :
63+ include :
64+ - binary : libtesseract64.so
65+ laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/lazarus-project_2.2.4-0_amd64.deb
66+ fpc-url : |
67+ https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/fpc-laz_3.2.2-210709_amd64.deb
68+ https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/fpc-src_3.2.2-210709_amd64.deb
69+
70+ steps :
71+ 72+ - uses : actions/download-artifact@v3
73+ with :
74+ name : ${{ matrix.binary }}
75+
76+ - name : Install Lazarus
77+ 78+ with :
79+ laz-url : ${{ matrix.laz-url }}
80+ fpc-url : ${{ matrix.fpc-url }}
81+
82+ - name : Test
83+ run : |
84+ lazbuild test/test.lpi
85+ test/test ${{ matrix.binary }} 5.2.0
0 commit comments