mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-24 07:27:49 +08:00
364431dbb9
Signed-off-by: Stefan Weil <sw@weilnetz.de>
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
name: unittest
|
|
# autotools build on ubuntu. unittests with address sanitizers. with openmp.
|
|
# [ FAILED ] LSTMTrainerTest.DeterminismTest - clang version 9.0.0-2~ubuntu18.04.2
|
|
# ubuntu-20.04-gcc-unittest - CI runs out of diskspace.
|
|
on:
|
|
#push:
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
|
|
jobs:
|
|
sanitizers:
|
|
name: ${{ matrix.config.name }}
|
|
runs-on: ${{ matrix.config.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
- { name: ubuntu-18.04-gcc-unittest, os: ubuntu-18.04, cxx: g++ }
|
|
- { name: ubuntu-20.04-clang-unittest, os: ubuntu-20.04, cxx: clang++ }
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies (Linux)
|
|
run: |
|
|
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
|
|
sudo apt-get install cabextract -y
|
|
|
|
- name: Setup
|
|
run: |
|
|
mkdir -p m4
|
|
./autogen.sh
|
|
|
|
- name: Configure (Linux)
|
|
run: |
|
|
./configure '--disable-shared' 'CXX=${{ matrix.config.cxx }}' \
|
|
'CXXFLAGS=-g -O2 -fsanitize=address,undefined'
|
|
|
|
- name: Make and Install Tesseract
|
|
run: |
|
|
${{ matrix.config.cxx }} --version
|
|
make
|
|
sudo make install
|
|
|
|
- name: Make and Install Training Tools
|
|
run: |
|
|
make training
|
|
sudo make training-install
|
|
|
|
- name: Display Tesseract and Training Tools Version
|
|
run: |
|
|
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 and Compiler Version
|
|
run: |
|
|
cat test-suite.log
|
|
${{ matrix.config.cxx }} --version
|
|
git log -3 --pretty=format:'%h %ad %s | %an'
|
|
if: always()
|