From 5ee59598d3bf5e7e0bebf5838298bfc15a127074 Mon Sep 17 00:00:00 2001 From: Gres Date: Sat, 2 May 2020 18:53:11 +0300 Subject: [PATCH] Add alternative tesseract builds --- .github/workflows/build.yml | 2 ++ .github/workflows/tesseract.yml | 61 +++++++++++++++++++++++++++++++++ share/ci/get_tesseract.py | 4 --- 3 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/tesseract.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef96485..21a43c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/tesseract.yml b/.github/workflows/tesseract.yml new file mode 100644 index 0000000..c2a8285 --- /dev/null +++ b/.github/workflows/tesseract.yml @@ -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 diff --git a/share/ci/get_tesseract.py b/share/ci/get_tesseract.py index c31f601..5b97890 100644 --- a/share/ci/get_tesseract.py +++ b/share/ci/get_tesseract.py @@ -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 '