comparison mupdf-source/thirdparty/tesseract/.github/workflows/unittest-macos.yml @ 3:2c135c81b16c

MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:44:09 +0200
parents b50eed0cc0ef
children
comparison
equal deleted inserted replaced
0:6015a75abc2d 3:2c135c81b16c
1 name: unittest-macos
2 # autotools build on homebrew. unittests with address sanitizers. with openmp.
3 on:
4 #push:
5 schedule:
6 - cron: 0 0 * * *
7
8 jobs:
9 sanitizers:
10 name: ${{ matrix.config.name }}
11 runs-on: ${{ matrix.config.os }}
12 strategy:
13 fail-fast: false
14 matrix:
15 config:
16 - { name: macos-arm-14-clang-unittest, os: macos-14, cxx: clang++ } # Apple silicon
17 - { name: macos-latest-clang-unittest, os: macos-latest, cxx: clang++ }
18 - { name: macos-latest-gcc-unittest, os: macos-latest, cxx: g++ }
19
20 steps:
21 - uses: actions/checkout@v4
22 with:
23 submodules: recursive
24
25 - name: Install dependencies (macOS Homebrew)
26 run: |
27 brew install autoconf automake cabextract libtool
28 brew install curl icu4c leptonica libarchive pango
29 - name: Setup
30 run: |
31 ./autogen.sh
32
33 - name: Configure (macOS Homebrew)
34 run: |
35 ./configure '--disable-shared' '--with-pic' \
36 'CXX=${{ matrix.config.cxx }}' \
37 'CXXFLAGS=-g -O2 -fsanitize=address,undefined'
38
39 - name: Make and Install Tesseract
40 run: |
41 make
42 sudo make install
43
44 - name: Make and Install Training Tools
45 run: |
46 make training
47 sudo make training-install
48
49 - name: Display Tesseract and Training Tools Version
50 run: |
51 tesseract -v
52 lstmtraining -v
53 text2image -v
54 if: success() || failure()
55
56 - name: Download fonts, tessdata and langdata required for tests
57 run: |
58 git clone https://github.com/egorpugin/tessdata tessdata_unittest
59 cp tessdata_unittest/fonts/* test/testing/
60 mv tessdata_unittest/* ../
61
62 - name: Run Tesseract on phototest.tif and devatest.png
63 run: |
64 tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
65 tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
66
67 - name: Make and run Unit Tests
68 run: |
69 make check
70
71 - name: Display Unit Tests Report and compiler version
72 run: |
73 cat test-suite.log
74 ${{ matrix.config.cxx }} --version
75 git log -3 --pretty=format:'%h %ad %s | %an'
76 if: always()