-
Notifications
You must be signed in to change notification settings - Fork 9.5k
75 lines (67 loc) · 2.41 KB
/
msys2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: msys2
# msys2 build for tesseract -head from main branch.
on:
#push:
schedule:
- cron: 0 17 * * *
jobs:
windows:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- msystem: MINGW64
mingw_package_prefix: mingw-w64-x86_64
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
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: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--disable-openmp' '--disable-doc' 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=-g -O2'
- name: Build and install Tesseract
run: |
make
make install
- name: Make and install training tools
run: |
make training
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