提交 20657304 编写于 作者: kl222's avatar kl222

CI: add libfacedetection

上级 d7b95685
此差异已折叠。
......@@ -72,7 +72,7 @@ jobs:
# compute its hash and append this to the computed cache's key.
appendedCacheKey: cache-vcpkg-msvc-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv dlib' # ncnn'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv' # dlib ncnn'
- name: Cache Qt
id: cache-qt
......@@ -108,6 +108,21 @@ jobs:
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: build libfacedetection
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -f ${{env.INSTALL_DIR}}/lib/cmake/facedetection/facedetectionConfig.cmake ]; then
git clone https://github.com/ShiqiYu/libfacedetection.git
cd libfacedetection
cmake -E make_directory build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}"
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: git clone https://github.com/KangLin/RabbitCommon.git
......@@ -116,6 +131,14 @@ jobs:
working-directory: ${{github.workspace}}/build
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
SeetaFace_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaNet_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceDetector_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceLandmarker_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceRecognizer_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceTracker_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaQualityAssessor_DIR: ${{env.INSTALL_DIR}}/lib/cmake
facedetection_DIR: ${{env.INSTALL_DIR}}/lib/cmake/facedetection
run: |
cmake ${{github.workspace}} \
-DCMARK_SHARED=OFF \
......
......@@ -106,6 +106,24 @@ jobs:
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
)
- name: build libfacedetection
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\facedetection\facedetectionConfig.cmake (
git clone https://github.com/ShiqiYu/libfacedetection.git
cd libfacedetection
cmake -E make_directory build
cd build
cmake .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake"
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
)
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
......@@ -148,7 +166,8 @@ jobs:
-DSeetaFaceLandmarker_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DSeetaFaceRecognizer_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DSeetaFaceTracker_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DSeetaQualityAssessor_DIR=${{env.INSTALL_DIR}}/lib/cmake
-DSeetaQualityAssessor_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-Dfacedetection_DIR=${{env.INSTALL_DIR}}/lib/cmake/facedetection
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
......
......@@ -88,6 +88,21 @@ jobs:
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: build libfacedetection
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -f ${{env.INSTALL_DIR}}/lib/cmake/facedetection/facedetectionConfig.cmake ]; then
git clone https://github.com/ShiqiYu/libfacedetection.git
cd libfacedetection
cmake -E make_directory build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}"
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: build_debpackage.sh
working-directory: ${{github.workspace}}
env:
......@@ -99,6 +114,7 @@ jobs:
SeetaFaceRecognizer_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceTracker_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaQualityAssessor_DIR: ${{env.INSTALL_DIR}}/lib/cmake
facedetection_DIR: ${{env.INSTALL_DIR}}/lib/cmake/facedetection
run: |
./build_debpackage.sh /usr/lib/`uname -m`-linux-gnu/qt5
cp ../*.deb FaceRecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb
......
......@@ -20,7 +20,6 @@
+ [CMake](http://www.cmake.org/)
+ 依赖库
- [必选] 玉兔公共库: https://github.com/KangLin/RabbitCommon
- [可选] log4cplus: https://github.com/log4cplus/log4cplus
- [可选] SeetaFace
+ [可选] SeetaFace2: https://github.com/kanglin/SeetaFace2
+ [可选] SeetaFace6: https://github.com/SeetaFace6Open/index
......@@ -28,7 +27,7 @@
- [可选] ffmpeg: https://ffmpeg.org/
- [可选] opencv: https://opencv.org/ opencv_contrib: https://opencv.org/opencv_contrib
- [可选] dlib: https://github.com/davisking/dlib
- [可选] ncnn:https://github.com/Tencent/ncnn
- [可选] ncnn: https://github.com/Tencent/ncnn
- [可选] libfacedetection: https://github.com/ShiqiYu/libfacedetection
### CMake 配置参数
- [必选] Qt5_DIR: qt 安装位置(指向Qt5Config.cmake的目录,默认为 安装目录/lib/cmake/Qt5)。
......@@ -36,7 +35,7 @@
- [必选] RabbitCommon_DIR: RabbitCommon 源码位置
- [可选] CMAKE_BUILD_TYPE: 编译类型
- [可选] BUILD_PERFORMANCE: 比较测试框架,默认 OFF
- [可选] ENABLE_DOWNLOAD: 自动下载模型,默认 OFF
- [可选] ENABLE_DOWNLOAD_MODUEL: 自动下载模型,默认 OFF
- [可选] BUILD_APP: 编译应用程序,默认 ON
- [可选] CMAKE_INSTALL_PREFIX: 安装前缀
- [可选] USE_OPENCV: 使用 OpenCV
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册