mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 02:59:07 +08:00
Improve dailyunittest workflow
This commit is contained in:
parent
2c894e5b62
commit
45a1e1d521
201
.github/workflows/dailyunittest.yml
vendored
201
.github/workflows/dailyunittest.yml
vendored
@ -1,6 +1,7 @@
|
||||
name: dailyunittest
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
# every day
|
||||
- cron: 0 0 * * *
|
||||
@ -11,8 +12,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
legacy: [ enable-legacy, disable-legacy ]
|
||||
os: [ ubuntu-18.04, ubuntu-20.04 ]
|
||||
compiler: [ g++, clang++ ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -20,37 +21,131 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: mkdir -p m4 && sudo apt-get install autoconf-archive libleptonica-dev libpango1.0-dev cabextract -y
|
||||
run: |
|
||||
sudo apt-get install autoconf-archive libleptonica-dev libpango1.0-dev -y
|
||||
sudo apt-get install cabextract -y
|
||||
|
||||
- name: Autogen
|
||||
run: ./autogen.sh
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p m4
|
||||
./autogen.sh
|
||||
|
||||
- name: Configure
|
||||
run: ./configure --enable-openmp --disable-shared --disable-debug --disable-opencl --disable-graphics --${{ matrix.legacy }} --with-tensorflow=no 'CXXFLAGS=-g -O2 -fsanitize=address,undefined'
|
||||
run: ./configure '--disable-shared' 'CXX=${{ matrix.compiler }}' 'CXXFLAGS=-g -O2'
|
||||
|
||||
- name: Make Tesseract and Training Tools
|
||||
run: make training -j 8
|
||||
- name: Make and Install Tesseract and Training Tools
|
||||
run: |
|
||||
make training -j 8
|
||||
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
|
||||
run: |
|
||||
git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
||||
cp tessdata_unittest/fonts/* test/testing/
|
||||
mv tessdata_unittest/* ../
|
||||
|
||||
- name: Copy fonts and move tessdata
|
||||
run: cp tessdata_unittest/fonts/* test/testing/ && mv tessdata_unittest/* ../ && ls ../
|
||||
- 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 check
|
||||
run: make check -j 4
|
||||
- name: Make and run Unit Tests
|
||||
run: |
|
||||
make check -j 4
|
||||
continue-on-error: true
|
||||
|
||||
- name: Display Test-Suite report
|
||||
run: git log -1 && cat unittest/test-suite.log
|
||||
- name: Display Unit Tests Report
|
||||
run: |
|
||||
git log -1
|
||||
ls /Users/runner/work/testactions/testactions/test/testdata/
|
||||
cat unittest/test-suite.log
|
||||
if: always()
|
||||
|
||||
test-homebrew:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ macos-10.15, macos-11.0 ]
|
||||
compiler: [ g++, clang++ ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
brew install cabextract abseil
|
||||
brew install automake autoconf-archive
|
||||
brew install libarchive
|
||||
brew install leptonica
|
||||
brew install cairo pango
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p m4
|
||||
./autogen.sh
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure '--disable-shared' '--with-pic' 'CXX=${{ matrix.compiler }}' 'CXXFLAGS=-g -O2' 'PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libarchive/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig'
|
||||
|
||||
- name: Make Tesseract and Training Tools
|
||||
run: |
|
||||
make training
|
||||
|
||||
- name: Install Tesseract and Training Tools
|
||||
run: |
|
||||
sudo make install
|
||||
sudo make training-install
|
||||
|
||||
- name: Display Version
|
||||
run: |
|
||||
${{ matrix.compiler }} --version
|
||||
tesseract -v
|
||||
lstmtraining -v
|
||||
text2image -v
|
||||
if: success() || failure()
|
||||
|
||||
- name: Get fonts, tessdata and langdata required for unit 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
|
||||
continue-on-error: true
|
||||
|
||||
- name: Display Unit Tests Report
|
||||
run: |
|
||||
git log -1
|
||||
ls /Users/runner/work/testactions/testactions/test/testdata/
|
||||
cat unittest/test-suite.log
|
||||
if: always()
|
||||
|
||||
test-macports:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ macos-latest ]
|
||||
compiler: [ gcc, clang ]
|
||||
os: [ macos-10.15 ]
|
||||
compiler: [ g++, clang++ ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -75,13 +170,11 @@ jobs:
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p m4
|
||||
export CC=${{ matrix.compiler }}
|
||||
export CXX=${{ matrix.compiler }}
|
||||
./autogen.sh
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure
|
||||
./configure '--disable-shared' '--with-pic' 'CXX=${{ matrix.compiler }}' 'CXXFLAGS=-g -O2'
|
||||
|
||||
- name: Make
|
||||
run: |
|
||||
@ -92,66 +185,34 @@ jobs:
|
||||
make training
|
||||
sudo make install training-install
|
||||
|
||||
- name: Get fonts, tessdata and langdata required for unit tests
|
||||
- name: Display Version
|
||||
run: |
|
||||
git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
||||
cp tessdata_unittest/fonts/* test/testing/
|
||||
mv tessdata_unittest/* ../
|
||||
|
||||
- name: Make and run Unit Tests
|
||||
run: make check
|
||||
|
||||
- name: Display Unit Tests Report
|
||||
run: git log -1 && cat unittest/test-suite.log
|
||||
${{ matrix.compiler }} --version
|
||||
tesseract -v
|
||||
lstmtraining -v
|
||||
text2image -v
|
||||
if: success() || failure()
|
||||
|
||||
test-homebrew:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ macos-10.15, macos-11.0]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
brew install cabextract abseil
|
||||
brew install automake autoconf-archive
|
||||
brew install libarchive
|
||||
brew install leptonica
|
||||
brew install cairo pango
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p m4
|
||||
./autogen.sh
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure '--disable-shared' '--with-pic' 'CXX=clang++' 'CXXFLAGS=-g -O2' 'PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libarchive/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig'
|
||||
|
||||
- name: Make Tesseract and Training Tools
|
||||
run: |
|
||||
make training
|
||||
|
||||
- name: Install Tesseract and Training Tools
|
||||
run: |
|
||||
sudo make install training-install
|
||||
|
||||
- name: Get fonts, tessdata and langdata required for unit 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
|
||||
run: |
|
||||
make check
|
||||
continue-on-error: true
|
||||
|
||||
- name: Display Unit Tests Report
|
||||
run: git log -1 && cat unittest/test-suite.log
|
||||
if: success() || failure()
|
||||
run: |
|
||||
git log -1
|
||||
ls /Users/runner/work/testactions/testactions/test/testdata/
|
||||
cat unittest/test-suite.log
|
||||
if: always()
|
||||
|
Loading…
Reference in New Issue
Block a user