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

79 lines
2.1 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-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-20.04 ]
2021-01-24 19:56:15 +08:00
steps:
2022-10-20 16:29:05 +08:00
- uses: actions/checkout@v3
2021-01-24 19:56:15 +08:00
with:
submodules: recursive
2021-01-24 19:56:15 +08:00
- name: Install dependencies
run: |
sudo apt-get update
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-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-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()