From 7d6209282f89f6ea8d9006c78ab18e6698fc1108 Mon Sep 17 00:00:00 2001 From: Kang Lin Date: Wed, 21 Feb 2024 11:58:28 +0800 Subject: [PATCH] CI: modify ci --- .github/workflows/macos.yml | 3 +- .github/workflows/mingw.yml | 3 +- .github/workflows/msvc.yml | 31 +++++++---------- .github/workflows/ubuntu.yml | 30 +++++++++++----- ChangeLog.md | 6 ++-- ChangeLog_zh_CN.md | 5 +-- README.md | 2 +- appveyor.yml | 67 ------------------------------------ ci/build.sh | 6 ++-- debian/changelog | 2 +- vcpkg.json | 46 +++++++++++++++++++++++++ 11 files changed, 96 insertions(+), 105 deletions(-) create mode 100644 vcpkg.json diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9fdb315..e3b5152 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -108,7 +108,8 @@ jobs: cmake .. \ -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \ - -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" + -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" \ + -DBUILD_EXAMPLE=OFF cmake --build . --config ${{matrix.BUILD_TYPE}} cmake --build . --config ${{matrix.BUILD_TYPE}} --target install fi diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index c0f5aa2..2d30d20 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -93,7 +93,8 @@ jobs: cd build cmake .. -G"MinGW Makefiles" ^ -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^ - -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" + -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^ + -DBUILD_EXAMPLE=OFF cmake --build . --config ${{matrix.BUILD_TYPE}} cmake --build . --config ${{matrix.BUILD_TYPE}} --target install ) diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index 31524f7..5918f5e 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -13,16 +13,9 @@ jobs: strategy: matrix: BUILD_TYPE: [Release, Debug] - qt_version: [6.6.1, 6.5.2, 5.15.2, 5.12.12] + qt_version: [6.6.2, 5.15.2, 5.12.12] include: - - qt_version: 6.6.1 - triplet: x64-windows - VCPKG_PLATFORM_TOOLSET: v142 - qt_arch: win64_msvc2019_64 - CMAKE_GENERATOR_PLATFORM: x64 - qt_modules: qtscxml qtpositioning qtwebchannel qtwebsockets qtwebview qtmultimedia qt5compat - - - qt_version: 6.5.2 + - qt_version: 6.6.2 triplet: x64-windows VCPKG_PLATFORM_TOOLSET: v142 qt_arch: win64_msvc2019_64 @@ -82,18 +75,19 @@ jobs: with: path: | ${{env.INSTALL_DIR}} - key: FaceRecognizer_msvc_cache-installed-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}_2033_03_02 + key: install_msvc_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} - name: run-vcpkg - uses: lukka/run-vcpkg@v7.4 + uses: lukka/run-vcpkg@v11 with: vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} vcpkgDirectory: ${{runner.workspace}}/vcpkg/ - # Since the cache must be invalidated when content of the vcpkg.json file changes, let's - # 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 libyuv ffmpeg opencv opencv[contrib] dlib ncnn' + + - name: run vcpkg + if: false + run: | + vcpkg install --VCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^ + --x-feature=SeetaFace - name: build SeetaFace2 working-directory: ${{env.SOURCE_DIR}} @@ -108,7 +102,8 @@ jobs: -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" + -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" ^ + -DBUILD_EXAMPLE=OFF cmake --build . --config ${{matrix.BUILD_TYPE}} cmake --build . --config ${{matrix.BUILD_TYPE}} --target install ) @@ -193,7 +188,7 @@ jobs: copy /Y FaceRecognizer_${{env.FaceRecognizer_VERSION}}_Setup.exe FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe - name: Update xml - if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.6.1' }} + if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.6.2' }} working-directory: ${{github.workspace}}\build run: | ${{github.workspace}}\build\install\bin\FaceRecognizerApp.exe ^ diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 39f7fce..016be5f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -16,13 +16,13 @@ jobs: matrix: BUILD_TYPE: [Release, Debug] - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: BUILD_TYPE: ${{matrix.BUILD_TYPE}} SOURCE_DIR: ${{github.workspace}}/.cache/source TOOSL_DIR: ${{github.workspace}}/.cache/tools - INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}} + INSTALL_DIR: ${{github.workspace}}/.cache/install FaceRecognizer_VERSION: 0.0.4 artifact_name: build_ubuntu @@ -49,9 +49,9 @@ jobs: - name: Install apt packages run: | - sudo apt-get update -y \ - && sudo apt-get upgrade -y \ - && sudo apt-get install -y xvfb xpra \ + sudo apt-get update -y -q + sudo apt-get upgrade -y -q + sudo apt-get install -y -q xvfb xpra \ cmake build-essential \ debhelper fakeroot graphviz \ libglu1-mesa-dev libpulse-mainloop-glib0 \ @@ -75,7 +75,7 @@ jobs: with: path: | ${{env.INSTALL_DIR}} - key: cache-installed-ubuntu + key: install_ubuntu_${{matrix.BUILD_TYPE}} - name: build SeetaFace2 working-directory: ${{env.SOURCE_DIR}} @@ -87,7 +87,8 @@ jobs: cd build cmake .. \ -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ - -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" + -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \ + -DBUILD_EXAMPLE=OFF cmake --build . --config ${{matrix.BUILD_TYPE}} cmake --build . --config ${{matrix.BUILD_TYPE}} --target install fi @@ -125,7 +126,7 @@ jobs: ./build_debpackage.sh cp ../facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb - - name: Update xml file + - name: Update configure file working-directory: ${{github.workspace}} run: | sudo Xvfb :99 -ac & @@ -134,13 +135,24 @@ jobs: MD5=`md5sum facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb|awk '{print $1}'` echo "MD5:${MD5}" /bin/bash /opt/FaceRecognizer/bin/FaceRecognizer.sh \ - -f "${{github.workspace}}/update_linux.json" \ + -f "${{github.workspace}}/update_ubuntu.json" \ --foc 1 \ --md5 ${MD5} \ -m "${{env.FaceRecognizer_VERSION}}" \ -n "facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb" \ -u "https://github.com/KangLin/FaceRecognizer/releases/download/v${{env.FaceRecognizer_VERSION}}/facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb;https://sourceforge.net/projects/FaceRecognizer/files/v${{env.FaceRecognizer_VERSION}}/facerecognizer_${{env.FaceRecognizer_VERSION}}_amd64.deb" + - name: Update version configure file + if: ${{ matrix.BUILD_TYPE == 'Release'}} + working-directory: ${{github.workspace}} + run: | + sudo Xvfb :99 -ac & + export DISPLAY=:99.0 + /bin/bash /opt/FaceRecognizer/bin/FaceRecognizer.sh \ + -f "${{github.workspace}}/version.json" \ + --foc 0 \ + --pv ${{env.FaceRecognizer_VERSION}} + - name: Update artifact if: ${{ matrix.BUILD_TYPE == 'Release' }} uses: actions/upload-artifact@v3 diff --git a/ChangeLog.md b/ChangeLog.md index f80c95a..5fe99bd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,8 +9,10 @@ See RabbitCommon: 7ed300a206d8a36c30003b6c19ad181682d0ff5f + FFmpeg: update API avpicture_* to av_image_* + Support Qt6 - + Replace RabbitCommon::CDir::GetOpenDirectory with QFileDialog::getExistingDirectory etc - + + Use RabbitCommon v2.0.1 + + Replace RabbitCommon::CDir::GetOpenDirectory with QFileDialog::getExistingDirectory etc + + Use json format update + - v0.0.4 + Add opencv face - Add opencv dnn face detect diff --git a/ChangeLog_zh_CN.md b/ChangeLog_zh_CN.md index 8af0023..b30b629 100644 --- a/ChangeLog_zh_CN.md +++ b/ChangeLog_zh_CN.md @@ -9,8 +9,9 @@ 详见:RabbitCommon: 7ed300a206d8a36c30003b6c19ad181682d0ff5f + FFmpeg: 兼容 API avpicture_* to av_image_* + 支持 Qt6 - + 使用 RabbitCommon v2 - + 用 QFileDialog::getExistingDirectory 替换 RabbitCommon::CDir::GetOpenDirectory + + 使用 RabbitCommon v2.0.1 + - 使用 json 格式更新 + - 用 QFileDialog::getExistingDirectory 替换 RabbitCommon::CDir::GetOpenDirectory - v0.0.4 + 增加 opencv 实现人脸接口 diff --git a/README.md b/README.md index 883414e..8f16be6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## [人脸识别](https://github.com/KangLin/FaceRecognizer) -作者:康林(kl222@126.com) +作者:康林 [![Windows build status](https://ci.appveyor.com/api/projects/status/n50nxc7d8mm9bdpb/branch/master?svg=true)](https://ci.appveyor.com/project/KangLin/facerecognizer/branch/master) [![build](https://github.com/KangLin/FaceRecognizer/actions/workflows/build.yml/badge.svg)](https://github.com/KangLin/FaceRecognizer/actions/workflows/build.yml) diff --git a/appveyor.yml b/appveyor.yml index d7b74f4..0ca63ad 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,59 +15,6 @@ environment: secure: ejAYGgB+3sBispRxUSr0xw== matrix: - ##### android ######## - - BUILD_TARGERT: android - GENERATORS: "MSYS Makefiles" - BUILD_ARCH: "armeabi-v7a" - ANDROID_ARM_NEON: ON - DOWNLOAD_QT: TRUE - QT_VERSION_DIR: 5.12 - QT_VERSION: 5.12.6 - ANDROID_PLATFORM: android-24 - TOOLCHAIN_VERSION: 4.9 - DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/android4.9_arm_v0.2.9_in_windows.zip - - - BUILD_TARGERT: android - GENERATORS: "MSYS Makefiles" - BUILD_ARCH: "arm64-v8a" - ANDROID_ARM_NEON: ON - DOWNLOAD_QT: TRUE - QT_VERSION_DIR: 5.12 - QT_VERSION: 5.12.6 - ANDROID_PLATFORM: android-24 - TOOLCHAIN_VERSION: 4.9 - DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/android4.9_arm64_v0.2.9_in_windows.zip - - ##### msvc 2013 ######## - #- BUILD_TARGERT: windows_msvc - # GENERATORS: "Visual Studio 12 2013" - # TOOLCHAIN_VERSION: 12 - # QT_ROOT: C:\Qt\5.6\msvc2013 - # BUILD_ARCH: x86 - - #- BUILD_TARGERT: windows_msvc - # GENERATORS: "Visual Studio 12 2013 Win64" - # TOOLCHAIN_VERSION: 12 - # QT_ROOT: C:\Qt\5.6\msvc2013_64 - # BUILD_ARCH: x64 - - ##### msvc 2017 ######## - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - GENERATORS: "Visual Studio 15 2017" - BUILD_TARGERT: windows_msvc - TOOLCHAIN_VERSION: 15 - QT_ROOT: C:\Qt\5.12\msvc2017 - BUILD_ARCH: x86 - DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/windows_msvc15_x86_v0.2.9.zip - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - GENERATORS: "Visual Studio 15 2017 Win64" - BUILD_TARGERT: windows_msvc - TOOLCHAIN_VERSION: 15 - QT_ROOT: C:\Qt\5.12\msvc2017_64 - BUILD_ARCH: x64 - DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/windows_msvc15_x64_v0.2.9.zip - ##### msvc 2015 ######## - BUILD_TARGERT: windows_msvc GENERATORS: "Visual Studio 14 2015" @@ -83,20 +30,6 @@ environment: BUILD_ARCH: x64 DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/windows_msvc14_x64_v0.2.9.zip - ##### mingw ######## - - BUILD_TARGERT: windows_mingw - GENERATORS: "MSYS Makefiles" - TOOLCHAIN_VERSION: 492_32 - QT_ROOT: C:\Qt\5.6\mingw49_32 - BUILD_ARCH: x86 - - - BUILD_TARGERT: windows_mingw - GENERATORS: "MSYS Makefiles" - TOOLCHAIN_VERSION: 530_32 - QT_ROOT: C:\Qt\5.10\mingw53_32 - BUILD_ARCH: x86 - DOWNLOAD_THIRDLIBS_URL: https://github.com/KangLin/RabbitThirdLibrary/releases/download/v0.2.9/windows_mingw530_32_x86_v0.2.9.zip - matrix: fast_finish: false diff --git a/ci/build.sh b/ci/build.sh index f5720ed..96718b0 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -348,8 +348,8 @@ if [ "${BUILD_TARGERT}" = "windows_msvc" ]; then if [ -z "${STATIC}" ]; then "/C/Program Files (x86)/NSIS/makensis.exe" "Install.nsi" MD5=`md5sum FaceRecognizer_${VERSION}_Setup.exe|awk '{print $1}'` - echo "MD5:${MD5}" - install/bin/FaceRecognizerApp.exe -f "`pwd`/update_windows.xml" --md5 ${MD5} \ - -u https://github.com/KangLin/FaceRecognizer/releases/download/${VERSION}/FaceRecognizer_${VERSION}_Setup.exe;https://sourceforge.net/projects/FaceRecognizer/files/${VERSION}/FaceRecognizer_${VERSION}_Setup.exe + #echo "MD5:${MD5}" + #install/bin/FaceRecognizerApp.exe -f "`pwd`/update_windows.json" --md5 ${MD5} \ + # -u https://github.com/KangLin/FaceRecognizer/releases/download/${VERSION}/FaceRecognizer_${VERSION}_Setup.exe;https://sourceforge.net/projects/FaceRecognizer/files/${VERSION}/FaceRecognizer_${VERSION}_Setup.exe fi fi diff --git a/debian/changelog b/debian/changelog index 4532a6e..ec34123 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -facerecognizer (0.0.4) stable; urgency=medium +facerecognizer (0.0.4) unstable; urgency=medium * Initial Release. diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..a26fcbc --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "facerecognizer", + "version-string":"0.0.4", + + "dependencies": [ + "openssl" + ], + + "features": { + "SeetaFace": { + "description": "SeetaFace", + "dependencies": [ + { + "name": "opencv", + "features": [ + "ffmpeg" + ] + } + ] + }, + "opencv": { + "description": "opencv", + "dependencies": [ + { + "name": "opencv", + "default-features": true, + "features": [ + "contrib", + "ffmpeg" + ] + } + ] + }, + "dlib": { + "description": "dlib", + "dependencies": [ + "dlib" + ] + } + }, + + "builtin-baseline":"9259a0719d94c402aae2ab7975bc096afdec15df", + "overrides": [ + { "name": "openssl", "version-string": "1.1.1n" } + ] +}