2021-01-27 01:02:54 +08:00
|
|
|
name: unittest-disablelegacy
|
|
|
|
# autotools build on ubuntu, unittests with disabled legacy engine.
|
2021-01-29 13:07:43 +08:00
|
|
|
# currently some unittests are failing with disabled legacy engine.
|
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
on:
|
|
|
|
#push:
|
|
|
|
schedule:
|
2021-11-19 17:05:20 +08:00
|
|
|
- cron: 0 10 * * *
|
2021-01-24 19:56:15 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-27 01:02:54 +08:00
|
|
|
compiler: [ g++, clang++ ]
|
2021-12-03 21:11:10 +08:00
|
|
|
#os: [ ubuntu-18.04, ubuntu-20.04 ]
|
|
|
|
os: [ ubuntu-20.04 ]
|
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-04-13 14:32:48 +08:00
|
|
|
sudo apt-get update
|
2021-05-16 13:45:12 +08:00
|
|
|
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
|
2021-01-24 19:56:15 +08:00
|
|
|
sudo apt-get install cabextract -y
|
2021-12-06 03:02:48 +08:00
|
|
|
#sudo apt-get install libc++-7-dev libc++abi-7-dev -y
|
2021-11-23 03:28:29 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Setup
|
|
|
|
run: |
|
|
|
|
mkdir -p m4
|
|
|
|
./autogen.sh
|
|
|
|
|
|
|
|
- name: Configure
|
2021-01-27 01:02:54 +08:00
|
|
|
run: |
|
|
|
|
./configure '--disable-shared' '--disable-legacy' 'CXX=${{ matrix.compiler }}'
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Make and Install Tesseract
|
|
|
|
run: |
|
|
|
|
make -j 8
|
|
|
|
sudo make install install
|
|
|
|
|
|
|
|
- name: Make and Install Training Tools
|
|
|
|
run: |
|
|
|
|
make training -j 8
|
|
|
|
sudo make install training-install
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Display Version
|
|
|
|
run: |
|
2021-01-27 01:02:54 +08:00
|
|
|
${{ matrix.compiler }} --version
|
2021-01-24 19:56:15 +08:00
|
|
|
tesseract -v
|
|
|
|
lstmtraining -v
|
|
|
|
text2image -v
|
|
|
|
if: success() || failure()
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Download fonts, tessdata and langdata required for tests
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
2021-02-26 17:56:42 +08:00
|
|
|
cp tessdata_unittest/fonts/* test/testing/
|
2021-01-24 19:56:15 +08:00
|
|
|
mv tessdata_unittest/* ../
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Run Tesseract on phototest.tif and devatest.png
|
|
|
|
run: |
|
|
|
|
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
|
|
|
|
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
|
|
|
|
|
|
|
|
- name: Make and run Unit Tests
|
|
|
|
run: |
|
|
|
|
make check -j 4
|
2021-02-26 17:56:42 +08:00
|
|
|
|
2021-01-24 19:56:15 +08:00
|
|
|
- name: Display Unit Tests Report
|
|
|
|
run: |
|
|
|
|
git log -3
|
2021-02-26 17:56:42 +08:00
|
|
|
${{ matrix.compiler }} --version
|
2021-01-27 16:06:38 +08:00
|
|
|
cat test-suite.log
|
2021-01-24 19:56:15 +08:00
|
|
|
if: always()
|