Skip to content

Commit

Permalink
CI: modify ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Feb 21, 2024
1 parent 412da1e commit c5c030d
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 105 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand All @@ -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
)
Expand Down Expand Up @@ -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 ^
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 \
Expand All @@ -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}}
Expand All @@ -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
Expand Down Expand Up @@ -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 &
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions ChangeLog_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 实现人脸接口
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [<img src="App/Resource/image/FaceRecognizer.ico" title="人脸识别" width="32" height="32"/>人脸识别](https://github.com/KangLin/FaceRecognizer)
作者:康林kl222@126.com)
作者:康林 <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)
Expand Down
67 changes: 0 additions & 67 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
facerecognizer (0.0.4) stable; urgency=medium
facerecognizer (0.0.4) unstable; urgency=medium

* Initial Release.

Expand Down
46 changes: 46 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -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" }
]
}

0 comments on commit c5c030d

Please sign in to comment.