Skip to content

Commit

Permalink
Improve GitHub actions
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 897b77d commit a9f85ae
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/installer-for-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name: Cross build for Windows

on: push
on: [push]

jobs:
build:
Expand All @@ -13,28 +13,37 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Install cygwin key and add cygwin sources
run: |
curl -s https://qemu.weilnetz.de/debian/gpg.key | sudo apt-key add -
echo deb https://qemu.weilnetz.de/debian/ testing contrib | \
sudo tee /etc/apt/sources.list.d/cygwin.list
- 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/

- name: Build Tesseract installer (64 bit)
run: |
# Run configure.
./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"
# Make install-jars.
make install-jars prefix=$PWD/usr/x86_64-w64-mingw32
# Make install.
make install prefix=$PWD/usr/x86_64-w64-mingw32
# Make training-install.
make training-install prefix=$PWD/usr/x86_64-w64-mingw32
# Make winsetup.
make html winsetup prefix=$PWD/usr/x86_64-w64-mingw32
# Copy result for upload.
mkdir -p dist && cp nsis/tesseract-ocr-w64-setup-*.exe dist/
- uses: actions/upload-artifact@v1
with:
Expand Down

0 comments on commit a9f85ae

Please sign in to comment.