mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Add vcpkg build
This commit is contained in:
parent
10d91370d7
commit
52dba02954
7
.github/workflows/cmake.yml
vendored
7
.github/workflows/cmake.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: cmake
|
||||
# cmake build of tesseract and training tools with gcc on ubuntu.
|
||||
# cmake build of tesseract and training tools macos homebrew using Ninja.
|
||||
# cmake build of tesseract and training tools with gcc and clang on ubuntu.
|
||||
# cmake build of tesseract and training tools with gcc and clang on macOS homebrew using Ninja.
|
||||
# test command line version of tesseract.
|
||||
on:
|
||||
#push:
|
||||
@ -70,7 +70,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libarchive/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
export PKG_CONFIG_PATH=$(brew --prefix)/opt/icu4c/lib/pkgconfig:$(brew --prefix)/opt/libarchive/lib/pkgconfig:/$(brew --prefix)/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
mkdir build
|
||||
mkdir inst
|
||||
cmake \
|
||||
@ -113,4 +113,3 @@ jobs:
|
||||
${{ matrix.config.cxx }} --version
|
||||
git log -3 --pretty=format:'%h %ad %s | %an'
|
||||
if: always()
|
||||
|
45
.github/workflows/vcpkg.yml
vendored
Normal file
45
.github/workflows/vcpkg.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: vcpkg
|
||||
# cmake build of tesseract and training tools using vcpkg.
|
||||
# Building training tools without sw is not supported on windows with cmake.
|
||||
# Fails to build currently.
|
||||
# Requested port update https://github.com/microsoft/vcpkg/issues/16019.
|
||||
on:
|
||||
#push:
|
||||
schedule:
|
||||
- cron: 0 0 2 3 *
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- run: |
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cp vcpkg/ports/tesseract vcpkg/ports/tesseract5 -r
|
||||
sed -i -e "s/REF 4.1.1/HEAD_REF master/" vcpkg/ports/tesseract5/portfile.cmake
|
||||
sed -i -e '/SHA512/d' vcpkg/ports/tesseract5/portfile.cmake
|
||||
sed -i -e '/fixup/d' vcpkg/ports/tesseract5/portfile.cmake
|
||||
sed -i -e 's/Source: tesseract/Source: tesseract5/' vcpkg/ports/tesseract5/CONTROL
|
||||
sed -i -e 's/4.1.1/5.0.0-alpha/' vcpkg/ports/tesseract5/CONTROL
|
||||
sed -i -e 's/: 6/: 1/' vcpkg/ports/tesseract5/CONTROL
|
||||
cat vcpkg/ports/tesseract5/portfile.cmake
|
||||
|
||||
- name: Build (Linux)
|
||||
run: |
|
||||
vcpkg/bootstrap-vcpkg.sh
|
||||
vcpkg/vcpkg integrate install
|
||||
vcpkg/vcpkg list tess
|
||||
vcpkg/vcpkg install tesseract5:x64-linux --head
|
||||
if: runner.os == 'Linux'
|
||||
|
||||
- name: Build (Windows)
|
||||
run: |
|
||||
vcpkg/bootstrap-vcpkg.bat
|
||||
vcpkg/vcpkg integrate install
|
||||
vcpkg/vcpkg list tess
|
||||
vcpkg/vcpkg install tesseract5:x64-windows --head
|
||||
if: runner.os == 'Windows'
|
||||
|
Loading…
Reference in New Issue
Block a user