Add tesseract alternative builds

This commit is contained in:
Gres 2020-05-02 19:35:13 +03:00
commit f71e886ccc
3 changed files with 65 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Build
name: App build
on: [push]
@ -73,6 +73,8 @@ jobs:
run: python ./share/ci/get_leptonica.py
- name: Get tesseract
env:
MARCH: sandy-bridge
run: python ./share/ci/get_tesseract.py
- name: Get hunspell

62
.github/workflows/tesseract.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Tesseract alternative builds
on:
push:
paths:
- "share/ci/**"
- ".github/workflows/tesseract.yml"
jobs:
build:
name: Build ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
OS: ${{ matrix.config.name }}
MSVC_VERSION: 2019/Enterprise
strategy:
matrix:
config:
- { name: "win64", os: windows-latest }
- { name: "win32", os: windows-latest }
- { name: "linux", os: ubuntu-16.04 }
# - { name: "macos", os: macos-latest }
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: deps
key: ${{ env.OS }}-tess
- name: Leptonica
run: python ./share/ci/get_leptonica.py
- name: Compatible
env:
MARCH: nehalem
run: python ./share/ci/get_tesseract.py
- name: Upload
uses: actions/upload-artifact@v2
with:
name: tesseract-compatible-${{ env.OS }}
path: ./deps
- name: Optimized
env:
MARCH: kaby-lake
run: python ./share/ci/get_tesseract.py
- name: Upload
uses: actions/upload-artifact@v2
with:
name: tesseract-optimized-${{ env.OS }}
path: ./deps

View File

@ -12,10 +12,6 @@ required_version = '4.1.1'
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
# compatibility flags
os.environ.setdefault('NO_AVX2', '1')
os.environ.setdefault('NO_AVX512', '1')
os.environ.setdefault('MARCH', 'sandy-bridge')
compat_flags = ''
if os.environ.get('NO_AVX2', '0') == '1':
compat_flags += ' -D USE_AVX2=OFF '