Add alternative tesseract builds

This commit is contained in:
Gres 2020-05-02 18:53:11 +03:00
parent 65d17394c5
commit 5ee59598d3
3 changed files with 63 additions and 4 deletions

View File

@ -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

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

@ -0,0 +1,61 @@
name: Tesseract alternative builds
on:
push:
paths:
- "share/ci/**"
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: compatible
path: ./deps
- name: Optimized
env:
MARCH: kaby-lake
run: python ./share/ci/get_tesseract.py
- name: Upload
uses: actions/upload-artifact@v2
with:
name: optimized
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 '