tesseract/.github/workflows/unittest-disablelegacy.yml

77 lines
2.0 KiB
YAML
Raw Normal View History

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-01-29 13:07:43 +08:00
- cron: 0 0 1 * *
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++ ]
os: [ ubuntu-18.04, ubuntu-20.04 ]
2021-01-24 19:56:15 +08:00
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
2021-01-24 19:56:15 +08:00
- name: Install dependencies
run: |
sudo apt-get install autoconf-archive libleptonica-dev libpango1.0-dev -y
sudo apt-get install cabextract -y
- 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-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-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-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
cp tessdata_unittest/fonts/* test/testing/
2021-01-24 19:56:15 +08:00
mv tessdata_unittest/* ../
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-01-24 19:56:15 +08:00
- name: Display Unit Tests Report
run: |
git log -3
${{ matrix.compiler }} --version
cat test-suite.log
2021-01-24 19:56:15 +08:00
if: always()