2021-01-14 17:25:21 +08:00
|
|
|
name: dailyunittest
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2021-01-15 01:30:17 +08:00
|
|
|
# every day at 1:15 AM UTC
|
|
|
|
- cron: 15 1 * * *
|
2021-01-14 17:25:21 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-16 18:27:22 +08:00
|
|
|
os: [ ubuntu-20.04 ]
|
|
|
|
legacy: [ enable, disable ]
|
2021-01-14 17:25:21 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: install dependencies
|
|
|
|
run: mkdir -p m4 && sudo apt-get install autoconf-archive libleptonica-dev libpango1.0-dev cabextract -y
|
|
|
|
|
|
|
|
- name: download fonts, tessdata and langdata required for tests
|
|
|
|
run: git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
|
|
|
|
|
|
|
- name: copy fonts and move tessdata
|
|
|
|
run: cp tessdata_unittest/fonts/* test/testing/ && mv tessdata_unittest/* ../ && ls ../
|
|
|
|
|
|
|
|
- name: autoconf
|
|
|
|
run: ./autogen.sh
|
|
|
|
|
|
|
|
- name: configure
|
2021-01-16 18:27:22 +08:00
|
|
|
run: ./configure --enable-openmp --disable-shared --disable-debug --disable-opencl --disable-graphics --${{ matrix.legacy }}-legacy --with-tensorflow=no 'CXXFLAGS=-g -O2 -Wall -Wextra -Wpedantic -fsanitize=address,undefined -fstack-protector-strong -ftrapv'
|
2021-01-14 17:25:21 +08:00
|
|
|
|
|
|
|
- name: make
|
|
|
|
run: make training -j 8
|
|
|
|
|
|
|
|
- name: make check
|
|
|
|
run: make check -j 4
|
|
|
|
|
|
|
|
- name: display test report
|
2021-01-16 18:27:22 +08:00
|
|
|
run: git log -1 && tesseract -v && cat unittest/test-suite.log
|
2021-01-14 17:25:21 +08:00
|
|
|
if: success() || failure()
|
|
|
|
|