Build App #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build App | |
on: [workflow_dispatch] | |
env: | |
BUILD_TYPE: Release | |
OPENCV_VERSION: 4.2.0 | |
LEPTONICA_VERSION: 1.74.3 | |
TESSERACT_VERSION: 3.05.02 | |
TESSERACT_LANGUAGE: eng | |
REPO_NAME: ${{ github.event.repository.name }} | |
LEPTONICA_BUILD: ${{github.workspace}}/leptonica/build | |
TESSERACT_BUILD: ${{github.workspace}}/tesseract/build | |
OPENCV_BUILD: ${{github.workspace}}/opencv/build | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: DanBloomberg/leptonica | |
ref: ${{env.LEPTONICA_VERSION}} | |
path: leptonica | |
- uses: actions/checkout@v3 | |
with: | |
repository: tesseract-ocr/tesseract | |
ref: ${{env.TESSERACT_VERSION}} | |
path: tesseract | |
- uses: actions/checkout@v3 | |
with: | |
repository: opencv/opencv | |
ref: ${{env.OPENCV_VERSION}} | |
path: opencv | |
- uses: actions/checkout@v3 | |
with: | |
path: ${{env.REPO_NAME}} | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Build Leptonica ${{env.LEPTONICA_VERSION}} | |
run: | | |
cd ${{github.workspace}}/leptonica | |
cmake -B ${{env.LEPTONICA_BUILD}} -G "NMake Makefiles" ` | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
-DCMAKE_INSTALL_PREFIX=${{env.LEPTONICA_BUILD}} ` | |
-DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON ` | |
-DBUILD_PROG=OFF ` | |
-DBUILD_UTILS=OFF ` | |
-DSW_BUILD=OFF ` | |
-DBUILD_SHARED_LIBS=OFF ` | |
-DPNG=OFF ` | |
-DJPEG=OFF ` | |
-DTIFF=OFF ` | |
-DZLIB=OFF ` | |
-DWEBP=OFF ` | |
-DGIF=OFF ` | |
-DCMAKE_CXX_FLAGS=/DNO_CONSOLE_IO=1 ` | |
-DCMAKE_CXX_FLAGS_RELEASE=/DMT ` | |
-DCMAKE_CXX_FLAGS_DEBUG=/DMTd ` | |
-DSTATIC=1 | |
cmake --build ${{env.LEPTONICA_BUILD}} --config ${{env.BUILD_TYPE}} --target install | |
- name: Build Tesseract-OCR ${{env.TESSERACT_VERSION}} | |
run: | | |
cd ${{github.workspace}}/tesseract | |
cmake -B ${{env.TESSERACT_BUILD}} -G "NMake Makefiles" ` | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
-DCMAKE_PREFIX_PATH=${{env.LEPTONICA_BUILD}} ` | |
-DCMAKE_INSTALL_PREFIX=${{env.TESSERACT_BUILD}} ` | |
-DBUILD_TRAINING_TOOLS=OFF ` | |
-DBUILD_TESTS=OFF ` | |
-DBUILD_PROTOS=OFF ` | |
-DBUILD_CONFIGS=OFF ` | |
-DBUILD_DOCS=OFF ` | |
-DBUILD_SHARED_LIBS=OFF ` | |
-DDISABLE_CURL=ON ` | |
-DCMAKE_CXX_FLAGS_RELEASE=/DMT ` | |
-DCMAKE_CXX_FLAGS_DEBUG=/DMTd ` | |
-DSTATIC=1 | |
cmake --build ${{env.TESSERACT_BUILD}} --config ${{env.BUILD_TYPE}} --target install | |
- name: Build OpenCV ${{env.OPENCV_VERSION}} | |
run: | | |
cd ${{github.workspace}}/opencv | |
cmake -B ${{env.OPENCV_BUILD}} -G "NMake Makefiles" ` | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
-DCMAKE_INSTALL_PREFIX=${{env.OPENCV_BUILD}} ` | |
-DBUILD_LIST="core,imgproc" ` | |
-DBUILD_opencv_apps=OFF ` | |
-DBUILD_opencv_calib3d=OFF ` | |
-DBUILD_opencv_dnn=OFF ` | |
-DBUILD_opencv_features2d=OFF ` | |
-DBUILD_opencv_flann=OFF ` | |
-DBUILD_opencv_gapi=OFF ` | |
-DBUILD_opencv_highgui=OFF ` | |
-DBUILD_opencv_imgcodecs=OFF ` | |
-DBUILD_opencv_ml=OFF ` | |
-DBUILD_opencv_objdetect=OFF ` | |
-DBUILD_opencv_photo=OFF ` | |
-DBUILD_opencv_stitching=OFF ` | |
-DBUILD_opencv_video=OFF ` | |
-DBUILD_opencv_videoio=OFF ` | |
-DBUILD_opencv_world=OFF ` | |
-DWITH_FFMPEG=OFF ` | |
-DWITH_GSTREAMER=OFF ` | |
-DWITH_QT=OFF ` | |
-DWITH_OPENEXR=OFF ` | |
-DWITH_IPP=OFF ` | |
-DWITH_TBB=OFF ` | |
-DWITH_EIGEN=OFF ` | |
-DWITH_PROTOBUF=OFF ` | |
-DWITH_LAPACK=OFF ` | |
-DWITH_1394=OFF ` | |
-DWITH_VTK=OFF ` | |
-DWITH_CUDA=OFF ` | |
-DWITH_CUFFT=OFF ` | |
-DWITH_NVCUVID=OFF ` | |
-DWITH_OPENGL=OFF ` | |
-DWITH_VULKAN=OFF ` | |
-DWITH_DSHOW=OFF ` | |
-DBUILD_SHARED_LIBS=OFF ` | |
-DSTATIC=1 | |
cmake --build ${{env.OPENCV_BUILD}} --config ${{env.BUILD_TYPE}} --target install | |
- name: Build ${{env.REPO_NAME}} | |
run: | | |
cd ${{github.workspace}}/${{env.REPO_NAME}} | |
cmake -B ${{github.workspace}}/${{env.REPO_NAME}}/build -G "NMake Makefiles" ` | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
-DCMAKE_PREFIX_PATH="${{env.LEPTONICA_BUILD}};${{env.TESSERACT_BUILD}};${{env.OPENCV_BUILD}}" ` | |
-DTESSERACT_LANGUAGE=${{env.TESSERACT_LANGUAGE}} | |
cmake --build ${{github.workspace}}/${{env.REPO_NAME}}/build --config ${{env.BUILD_TYPE}} | |
- uses: actions/upload-artifact@master | |
if: always() | |
with: | |
name: ${{env.REPO_NAME}}-${{github.ref_name}}-build | |
path: ${{github.workspace}}/${{env.REPO_NAME}}/build/bin |