forked from tesseract-ocr/tesseract
-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub action for Tesseract installer for Windows
Signed-off-by: Stefan Weil <sw@weilnetz.de>
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |