Create release archives with compatible tesseract version

This commit is contained in:
Gres 2020-05-03 11:50:37 +03:00
parent d5480e6f0a
commit 283624a564
6 changed files with 17 additions and 74 deletions

View File

@ -31,8 +31,7 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. windows 10, ubuntu 18.04]
- Desktop environment (linux only): [e.g. KDE, Gnome]
- App version: [e.g. 3.0.0]
- App bitness version (windows only): [e.g. win32, win64]
- App version (release archive name): [e.g. 3.0.0-win32, 3.0.0-compatible-win64]
**Additional context**
Add any other context about the problem here.

View File

@ -29,17 +29,22 @@ jobs:
name: release_upload_url
build:
name: Build ${{ matrix.config.name }}
name: Build ${{ matrix.config.name }}${{ matrix.config.tag }}
runs-on: ${{ matrix.config.os }}
env:
OS: ${{ matrix.config.name }}
MARCH: ${{ matrix.config.march }}
TAG: ${{ matrix.config.tag }}
MSVC_VERSION: 2019/Enterprise
strategy:
matrix:
config:
- { name: "win64", os: windows-latest }
- { name: "win32", os: windows-latest }
- { name: "linux", os: ubuntu-16.04 }
- { name: "win64", os: windows-latest, tag: "", march: "sandy-bridge" }
- { name: "win32", os: windows-latest, tag: "", march: "sandy-bridge" }
- { name: "linux", os: ubuntu-16.04, tag: "", march: "sandy-bridge" }
- { name: "win64", os: windows-latest, tag: "-compatible", march: "nehalem" }
- { name: "win32", os: windows-latest, tag: "-compatible", march: "nehalem" }
- { name: "linux", os: ubuntu-16.04, tag: "-compatible", march: "nehalem" }
# - { name: "macos", os: macos-latest }
steps:
- uses: actions/checkout@v2
@ -61,7 +66,7 @@ jobs:
uses: actions/cache@v1
with:
path: deps
key: ${{ env.OS }}-deps
key: ${{ env.OS }}-${{ env.TAG }}-deps
- name: Get Qt
run: python ./share/ci/get_qt.py
@ -73,8 +78,6 @@ 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

View File

@ -1,62 +0,0 @@
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

@ -10,7 +10,8 @@ if len(sys.argv) > 1 and sys.argv[1] == 'glibc_version': # subcommand
sub.run('ldd --version | head -n 1 | grep -Po "\\d\\.\\d\\d"', shell=True)
exit(0)
artifact_name = '{}-{}.AppImage'.format(app_name, app_version)
tag = os.environ.get('TAG', '')
artifact_name = '{}-{}{}.AppImage'.format(app_name, app_version, tag)
if len(sys.argv) > 1 and sys.argv[1] == 'artifact_name': # subcommand
c.print(artifact_name)
exit(0)

View File

@ -3,7 +3,8 @@ from config import *
import os
import sys
artifact_name = '{}-{}.dmg'.format(app_name, app_version)
tag = os.environ.get('TAG', '')
artifact_name = '{}-{}{}.dmg'.format(app_name, app_version, tag)
if len(sys.argv) > 1 and sys.argv[1] == 'artifact_name': # subcommand
c.print(artifact_name)
exit(0)

View File

@ -5,7 +5,8 @@ import sys
import shutil
from glob import glob
artifact_name = '{}-{}-{}.zip'.format(app_name, app_version, os_name)
tag = os.environ.get('TAG', '')
artifact_name = '{}-{}{}-{}.zip'.format(app_name, app_version, tag, os_name)
if len(sys.argv) > 1 and sys.argv[1] == 'artifact_name': # subcommand
c.print(artifact_name)
exit(0)