From 5ee59598d3bf5e7e0bebf5838298bfc15a127074 Mon Sep 17 00:00:00 2001 From: Gres Date: Sat, 2 May 2020 18:53:11 +0300 Subject: [PATCH 1/3] 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 ' From 55c97694fd9d14c8914703edf303f22f058828ce Mon Sep 17 00:00:00 2001 From: Gres Date: Sat, 2 May 2020 19:20:45 +0300 Subject: [PATCH 2/3] Rename artifacts --- .github/workflows/build.yml | 2 +- .github/workflows/tesseract.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21a43c5..2da66cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: App build on: [push] diff --git a/.github/workflows/tesseract.yml b/.github/workflows/tesseract.yml index c2a8285..a05e807 100644 --- a/.github/workflows/tesseract.yml +++ b/.github/workflows/tesseract.yml @@ -46,7 +46,7 @@ jobs: - name: Upload uses: actions/upload-artifact@v2 with: - name: compatible + name: tesseract-compatible-${{ env.OS }} path: ./deps - name: Optimized @@ -57,5 +57,5 @@ jobs: - name: Upload uses: actions/upload-artifact@v2 with: - name: optimized + name: tesseract-optimized-${{ env.OS }} path: ./deps From 51356f262480fcae6a846b538956b2f03368e110 Mon Sep 17 00:00:00 2001 From: Gres Date: Sat, 2 May 2020 19:23:13 +0300 Subject: [PATCH 3/3] Add tesseract build dependancy --- .github/workflows/tesseract.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tesseract.yml b/.github/workflows/tesseract.yml index a05e807..65b5649 100644 --- a/.github/workflows/tesseract.yml +++ b/.github/workflows/tesseract.yml @@ -4,6 +4,7 @@ on: push: paths: - "share/ci/**" + - ".github/workflows/tesseract.yml" jobs: build: