forked from tesseract-ocr/tesseract
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 2.09 KB
/
unittest-disablelegacy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: unittest-disablelegacy
# autotools build on ubuntu, unittests with disabled legacy engine.
# currently some unittests are failing with disabled legacy engine.
on:
#push:
schedule:
- cron: 0 10 * * *
workflow_dispatch:
jobs:
linux:
runs-on: ${{ matrix.os }}
timeout-minutes: 150
strategy:
fail-fast: false
matrix:
compiler: [ g++, clang++-15 ]
os: [ ubuntu-22.04 ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
sudo apt-get install cabextract -y
#sudo apt-get install libc++-7-dev libc++abi-7-dev -y
- name: Setup
run: |
mkdir -p m4
./autogen.sh
- name: Configure
run: |
./configure '--disable-shared' '--disable-legacy' 'CXX=${{ matrix.compiler }}'
- name: Make and Install Tesseract
run: |
make
sudo make install install
- name: Make and Install Training Tools
run: |
make training
sudo make install training-install
- name: Display Version
run: |
${{ matrix.compiler }} --version
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- 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/
mv tessdata_unittest/* ../
- 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
- name: Display Unit Tests Report
run: |
git log -3
${{ matrix.compiler }} --version
cat test-suite.log
if: always()