mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Actions CI: Add MINGW64 builds using msys2
This commit is contained in:
parent
4446b570f6
commit
0970175555
32
.github/workflows/msys2-4.1.1.yml
vendored
Normal file
32
.github/workflows/msys2-4.1.1.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: msys2-4.1.1
|
||||
on:
|
||||
#push:
|
||||
schedule:
|
||||
- cron: 0 18 1 * *
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
msystem: MINGW32
|
||||
mingw_package_prefix: mingw-w64-i686
|
||||
- os: windows-2019
|
||||
msystem: MINGW64
|
||||
mingw_package_prefix: mingw-w64-x86_64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
- run: pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-tesseract-ocr
|
||||
- name: Display version
|
||||
run: |
|
||||
tesseract -v
|
||||
text2image -v
|
||||
lstmtraining -v
|
||||
|
68
.github/workflows/msys2.yml
vendored
Normal file
68
.github/workflows/msys2.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
name: msys2
|
||||
# msys2 build for tesseract -head from master branch.
|
||||
on:
|
||||
#push:
|
||||
schedule:
|
||||
- cron: 0 17 * * *
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2019
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- msystem: MINGW32
|
||||
mingw_package_prefix: mingw-w64-i686
|
||||
- msystem: MINGW64
|
||||
mingw_package_prefix: mingw-w64-x86_64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
install: autoconf automake automake-wrapper git libtool make
|
||||
- run: pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-gcc
|
||||
- run: gcc --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-cairo
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-curl
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-gcc-libs
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-icu
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-leptonica
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-libarchive
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-pango
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-pkg-config
|
||||
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-zlib
|
||||
|
||||
- name: Build and install tesseract and training tools
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
make training
|
||||
make install
|
||||
make training-install
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
tesseract -v
|
||||
text2image -v
|
||||
lstmtraining -v
|
||||
|
||||
- name: Download fonts, tessdata and langdata required for tests
|
||||
run: |
|
||||
git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
||||
cp tessdata_unittest/fonts/* test/testing/
|
||||
mv tessdata_unittest/* ../
|
||||
|
||||
- name: Run Tesseract on phototest.tif and devatest.png
|
||||
run: |
|
||||
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
|
||||
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
|
Loading…
Reference in New Issue
Block a user