Skip to content

Commit

Permalink
ci: install tesserocr from wheel in Windows (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Dec 30, 2023
1 parent 2596265 commit 7369fa3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 55 deletions.
92 changes: 38 additions & 54 deletions .github/workflows/windows-build.yml
Expand Up @@ -2,63 +2,47 @@ name: Windows Build

on:
push:
branches:
- master
branches: master

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11.5'

- name: Install Tesseract
run: |
choco install tesseract
echo "C:\Program Files\Tesseract-OCR" >> $GITHUB_PATH
- name: Refresh Environment
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
Update-SessionEnvironment
- name: Check PATH
run: |
echo "PATH: $env:PATH"
- name: List Tesseract Directory
run: |
ls "C:\Program Files\Tesseract-OCR"
- name: Test Tesseract Command
run: |
& "C:\Program Files\Tesseract-OCR\tesseract.exe" --version
- name: Install dependencies
run: |
$env:Path += ";C:\Program Files\Tesseract-OCR"
pip install -r requirements.txt
- name: Run PyInstaller
run: |
cd poker
pyinstaller main.spec
# Add other necessary steps here
- name: Install NSIS
run: |
choco install nsis
- name: Run NSIS
run: makensis -V3 DeepMindPokerbot.nsi

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: compiled-app
path: path/to/your/compiled/app
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: false

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip

- name: Install Tesseract
run: |
iwr https://github.com/simonflueckiger/tesserocr-windows_build/releases/download/tesserocr-v2.6.0-tesseract-5.3.1/tesserocr-2.6.0-cp311-cp311-win_amd64.whl -Out tesserocr-2.6.0-cp311-cp311-win_amd64.whl
pip install tesserocr-2.6.0-cp311-cp311-win_amd64.whl
- name: Install dependencies
run: pip install -r requirements.txt

- name: Run PyInstaller
run: |
cd poker
pyinstaller main.spec
# Add other necessary steps here
- name: Install NSIS
run: |
choco install nsis
- name: Run NSIS
run: makensis -V3 DeepMindPokerbot.nsi

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: compiled-app
path: path/to/your/compiled/app
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -28,4 +28,4 @@ PyJWT==1.7.0
flask_jwt_extended
fastapi_auth
uvicorn
tesserocr
tesserocr

0 comments on commit 7369fa3

Please sign in to comment.