Add vcpkg build

This commit is contained in:
Shree Devi Kumar 2021-02-03 10:32:52 +00:00
parent 10d91370d7
commit 52dba02954
2 changed files with 48 additions and 4 deletions

View File

@ -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
View 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'