Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/tesseract/.github/workflows/unittest.yml @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 name: unittest | |
| 2 # autotools build on ubuntu. unittests with address sanitizers. with openmp. | |
| 3 # ubuntu-20.04-gcc-unittest - CI runs out of diskspace. | |
| 4 on: | |
| 5 #push: | |
| 6 schedule: | |
| 7 - cron: 0 0 * * * | |
| 8 workflow_dispatch: | |
| 9 | |
| 10 jobs: | |
| 11 sanitizers: | |
| 12 name: ${{ matrix.config.name }} | |
| 13 runs-on: ${{ matrix.config.os }} | |
| 14 strategy: | |
| 15 fail-fast: false | |
| 16 matrix: | |
| 17 config: | |
| 18 - { name: ubuntu-20.04-gcc-unittest, os: ubuntu-20.04, cxx: g++, cxxflags: '-g -O2 -fsanitize=address,undefined' } | |
| 19 - { name: ubuntu-22.04-clang-unittest, os: ubuntu-22.04, cxx: clang++, cxxflags: '-g -O2 -fsanitize=address,undefined -stdlib=libc++' } | |
| 20 steps: | |
| 21 - uses: actions/checkout@v4 | |
| 22 with: | |
| 23 submodules: recursive | |
| 24 | |
| 25 - name: Remove Homebrew, Android and .NET to provide more disk space | |
| 26 run: | | |
| 27 # https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150 | |
| 28 sudo rm -rf /home/linuxbrew # will release Homebrew | |
| 29 sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
| 30 sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
| 31 | |
| 32 - name: Install dependencies (Linux) | |
| 33 run: | | |
| 34 sudo apt-get update | |
| 35 sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y | |
| 36 sudo apt-get install cabextract -y | |
| 37 | |
| 38 - name: Setup | |
| 39 run: | | |
| 40 ./autogen.sh | |
| 41 | |
| 42 - name: Configure (Linux) | |
| 43 run: | | |
| 44 ./configure '--disable-shared' 'CXX=${{ matrix.config.cxx }}' \ | |
| 45 'CXXFLAGS=${{ matrix.config.cxxflags }}' | |
| 46 | |
| 47 - name: Make and Install Tesseract | |
| 48 run: | | |
| 49 ${{ matrix.config.cxx }} --version | |
| 50 make | |
| 51 sudo make install | |
| 52 | |
| 53 - name: Make and Install Training Tools | |
| 54 run: | | |
| 55 make training | |
| 56 sudo make training-install | |
| 57 | |
| 58 - name: Display Tesseract and Training Tools Version | |
| 59 run: | | |
| 60 tesseract -v | |
| 61 lstmtraining -v | |
| 62 text2image -v | |
| 63 if: success() || failure() | |
| 64 | |
| 65 - name: Download fonts, tessdata and langdata required for tests | |
| 66 run: | | |
| 67 git clone https://github.com/egorpugin/tessdata tessdata_unittest | |
| 68 cp tessdata_unittest/fonts/* test/testing/ | |
| 69 mv tessdata_unittest/* ../ | |
| 70 | |
| 71 - name: Run Tesseract on phototest.tif and devatest.png | |
| 72 run: | | |
| 73 tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata | |
| 74 tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata | |
| 75 | |
| 76 - name: Make and run Unit Tests | |
| 77 run: | | |
| 78 make check | |
| 79 | |
| 80 - name: Display Unit Tests Report and Compiler Version | |
| 81 run: | | |
| 82 cat test-suite.log | |
| 83 ${{ matrix.config.cxx }} --version | |
| 84 git log -3 --pretty=format:'%h %ad %s | %an' | |
| 85 if: always() |
