Add tesseract alternative builds
This commit is contained in:
		
						commit
						f71e886ccc
					
				
							
								
								
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -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
									
								
							
							
						
						
									
										62
									
								
								.github/workflows/tesseract.yml
									
									
									
									
										vendored
									
									
										Normal 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
 | 
			
		||||
@ -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 '
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user