Skip to content

Commit

Permalink
Add GitHub action for Tesseract installer for Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jul 8, 2022
1 parent 71579de commit 897b77d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/installer-for-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# GitHub actions - Create Tesseract installer for Windows

name: Cross build for Windows

on: push

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1

- name: Install cygwin key
run: curl -s https://qemu.weilnetz.de/debian/gpg.key | sudo apt-key add -
- name: Add cygwin sources
run: echo deb https://qemu.weilnetz.de/debian/ testing contrib | sudo tee /etc/apt/sources.list.d/cygwin.list
- name: Install packages
run: sudo apt-get update && sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-tools nsis mingw64-x86-64-liblept5 mingw64-x86-64-curl mingw64-x86-64-libarchive mingw64-x86-64-giflib mingw64-x86-64-libpng mingw64-x86-64-libwebp mingw64-x86-64-openjpeg2 mingw64-x86-64-tiff mingw64-x86-64-pango1.0 mingw64-x86-64-icu asciidoc xsltproc
- name: Run autogen
run: ./autogen.sh
- name: Run configure
run: ./configure --disable-openmp --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 CXX=x86_64-w64-mingw32-g++-posix CXXFLAGS="-fno-math-errno -Wall -Wextra -Wpedantic -g -O2"
- name: Make install-jars
run: make install-jars prefix=$PWD/usr/x86_64-w64-mingw32
- name: Make install
run: make install prefix=$PWD/usr/x86_64-w64-mingw32
- name: Make training-install
run: make training-install prefix=$PWD/usr/x86_64-w64-mingw32
- name: Make winsetup
run: make html winsetup prefix=$PWD/usr/x86_64-w64-mingw32
- name: Copy result for upload
run: mkdir -p dist && cp nsis/tesseract-ocr-w64-setup-*.exe dist/

- uses: actions/upload-artifact@v1
with:
name: Tesseract Installer for Windows
path: dist

0 comments on commit 897b77d

Please sign in to comment.