Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/tesseract/.github/workflows/vcpkg.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: vcpkg | |
| 2 # build and test of tesseract on windows using vcpkg and cmake. | |
| 3 # vcpkg with -head does not work. https://github.com/microsoft/vcpkg/issues/16019 | |
| 4 on: | |
| 5 #push: | |
| 6 schedule: | |
| 7 - cron: 0 23 * * * | |
| 8 | |
| 9 jobs: | |
| 10 build: | |
| 11 runs-on: ${{ matrix.os }} | |
| 12 strategy: | |
| 13 fail-fast: false | |
| 14 matrix: | |
| 15 os: [windows-2019] | |
| 16 | |
| 17 steps: | |
| 18 - name: Checkout Tesseract Source (--head from main branch) | |
| 19 uses: actions/checkout@v4 | |
| 20 with: | |
| 21 submodules: recursive | |
| 22 | |
| 23 - name: Visual Studio Setup | |
| 24 shell: cmd | |
| 25 run: | | |
| 26 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| 27 | |
| 28 - name: Install vcpkg | |
| 29 run: | | |
| 30 git clone https://github.com/microsoft/vcpkg | |
| 31 vcpkg/bootstrap-vcpkg.bat | |
| 32 vcpkg/vcpkg integrate install | |
| 33 | |
| 34 - name: Build and Install Leptonica and image libraries using vcpkg | |
| 35 run: | | |
| 36 vcpkg/vcpkg install leptonica:x64-windows | |
| 37 | |
| 38 - name: Configure and Build Tesseract (--head from main branch) with cmake | |
| 39 run: | | |
| 40 cmake . -B build -DCMAKE_BUILD_TYPE=Release -DSW_BUILD=OFF -DOPENMP_BUILD=OFF -DBUILD_TRAINING_TOOLS=OFF "-DCMAKE_TOOLCHAIN_FILE=${env:GITHUB_WORKSPACE}/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
| 41 cmake --build build --config Release --target install | |
| 42 | |
| 43 - name: Display Tesseract Version | |
| 44 run: | | |
| 45 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --version | |
| 46 | |
| 47 - name: Create CMakeLists.txt file for basicapitest | |
| 48 shell: bash | |
| 49 run: | | |
| 50 cd test | |
| 51 cat << "EOF" > CMakeLists.txt | |
| 52 cmake_minimum_required(VERSION 3.19) | |
| 53 project( basicapitest ) | |
| 54 find_package( Tesseract REQUIRED ) | |
| 55 find_package( Leptonica REQUIRED ) | |
| 56 include_directories(${Tesseract_INCLUDE_DIRS}) | |
| 57 include_directories(${Leptonica_INCLUDE_DIRS}) | |
| 58 add_executable( basicapitest testing/basicapitest.cpp ) | |
| 59 target_link_libraries(basicapitest ${Leptonica_LIBRARIES}) | |
| 60 target_link_libraries(basicapitest Tesseract::libtesseract) | |
| 61 add_library(libtesseract UNKNOWN IMPORTED) | |
| 62 set_property(TARGET libtesseract PROPERTY IMPORTED_LOCATION D:/a/tesseract/tesseract/build/Release/tesseract50.lib) | |
| 63 target_link_libraries(basicapitest Tesseract::libtesseract) | |
| 64 EOF | |
| 65 cat CMakeLists.txt | |
| 66 | |
| 67 - name: Configure basicapitest | |
| 68 run: | | |
| 69 cd test | |
| 70 cmake . "-DCMAKE_TOOLCHAIN_FILE=${env:GITHUB_WORKSPACE}/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
| 71 | |
| 72 - name: Build basicapitest | |
| 73 run: | | |
| 74 cd test | |
| 75 cmake --build . --config Release | |
| 76 | |
| 77 - name: Download tessdata and image files used for tests | |
| 78 run: | | |
| 79 git clone https://github.com/egorpugin/tessdata tessdata_unittest | |
| 80 mv tessdata_unittest/* ../ | |
| 81 | |
| 82 - name: Run basicapitest | |
| 83 run: | | |
| 84 cd test | |
| 85 D:\a\tesseract\tesseract\test\Release\basicapitest.exe | |
| 86 | |
| 87 - name: Run Tesseract CLI on test images in different languages | |
| 88 run: | | |
| 89 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\phototest.tif - --oem 1 --tessdata-dir ..\tessdata | |
| 90 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\raaj.tif - -l hin --oem 1 --tessdata-dir ..\tessdata | |
| 91 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\viet.tif - -l vie --oem 1 --tessdata-dir ..\tessdata | |
| 92 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\hebrew.png - -l heb --oem 1 --tessdata-dir ..\tessdata | |
| 93 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\eurotext.tif - -l fra --oem 1 --tessdata-dir ..\tessdata_best | |
| 94 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ..\tessdata | |
| 95 | |
| 96 - name: List languages in different test tessdata-dir | |
| 97 run: | | |
| 98 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata | |
| 99 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata_best | |
| 100 D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata_fast |
