-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
307 additions
and
214 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,21 @@ jobs: | |
matrix: | ||
BUILD_TYPE: [Release] | ||
qt_arch: [android_arm64_v8a, android_armv7, android_x86_64] | ||
qt_version: [6.6.1] | ||
qt_version: [6.6.2] | ||
include: | ||
- BUILD_TYPE: Release | ||
qt_arch: android_arm64_v8a | ||
VCPKG_TARGET_TRIPLET: arm-android | ||
ENABLE_DOWNLOAD: ON | ||
|
||
- BUILD_TYPE: Release | ||
qt_arch: android_armv7 | ||
VCPKG_TARGET_TRIPLET: arm-android | ||
|
||
- BUILD_TYPE: Release | ||
qt_arch: android_x86_64 | ||
qt_arch: android_x86_64 | ||
VCPKG_TARGET_TRIPLET: x64-android | ||
ENABLE_DOWNLOAD: ON | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
@@ -39,7 +41,7 @@ jobs: | |
VCPKGGITCOMMITID: eb33d2f7583405fca184bcdf7fdd5828ec88ac05 | ||
ANDROID_PLATFORM: android-23 | ||
ANDROID_NATIVE_API_LEVEL: 23 | ||
qt_modules: 'qtimageformats qtmultimedia qtscxml' | ||
qt_modules: 'qtwebchannel qtwebsockets qtwebview qtimageformats qtmultimedia qtscxml qt5compat' | ||
|
||
# Map the job outputs to step outputs | ||
outputs: | ||
|
@@ -59,21 +61,61 @@ jobs: | |
cmake -E make_directory ${{github.workspace}}/build | ||
- name: Cache installed | ||
#if: false | ||
uses: actions/cache@v2 | ||
id: cache-installed | ||
with: | ||
path: | | ||
${{env.INSTALL_DIR}} | ||
key: cache-installed-android-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}} | ||
key: install_android_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} | ||
|
||
- name: Cache Qt | ||
#if: false | ||
id: cache-qt | ||
uses: actions/cache@v1 # not v2! | ||
- name: run-vcpkg | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
path: ${{env.TOOSL_DIR}}/qt | ||
key: qt${{matrix.qt_version}}_${{matrix.qt_arch}} | ||
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. | ||
#setupOnly: # optional | ||
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git | ||
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} | ||
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ | ||
|
||
- name: build SeetaFace2 | ||
working-directory: ${{env.SOURCE_DIR}} | ||
run: | | ||
if [ ! -f ${{env.INSTALL_DIR}}/lib/cmake/SeetaFaceDetectorConfig.cmake ]; then | ||
git clone https://github.com/KangLin/SeetaFace2.git | ||
cd SeetaFace2 | ||
cmake -E make_directory build | ||
cd build | ||
cmake .. \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \ | ||
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \ | ||
-DVCPKG_CHAINLbuildOAD_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ | ||
-DANDROID_ABI=${{matrix.ANDROID_ABI}} \ | ||
-DANDROID_PLATFORM=${{matrix.ANDROID_PLATFORM}} \ | ||
-DBUILD_EXAMPLE=OFF | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} | ||
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 }} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \ | ||
-DVCPKG_CHAINLbuildOAD_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ | ||
-DANDROID_ABI=${{matrix.ANDROID_ABI}} \ | ||
-DANDROID_PLATFORM=${{matrix.ANDROID_PLATFORM}} \ | ||
-DBUILD_SHARED_LIBS=ON | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install | ||
fi | ||
- name: Install Qt of gcc_64 | ||
uses: jurplel/install-qt-action@v3 | ||
|
@@ -84,7 +126,8 @@ jobs: | |
target: 'desktop' | ||
arch: 'gcc_64' | ||
set-env: false | ||
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false | ||
cache: true | ||
cache-key-prefix: cached_qt | ||
|
||
- name: Install Qt of android | ||
uses: jurplel/install-qt-action@v3 | ||
|
@@ -101,33 +144,8 @@ jobs: | |
arch: '${{matrix.qt_arch}}' # optional | ||
# Additional Qt modules to install | ||
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ | ||
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false | ||
|
||
# - name: run-vcpkg | ||
# uses: lukka/[email protected] | ||
# with: | ||
# # Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. | ||
# #setupOnly: # optional | ||
# #vcpkgGitURL: https://github.com/KangLin/vcpkg.git | ||
# 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: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}} | ||
# additionalCachedPaths: $VCPKG_ROOT/installed | ||
# vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}' | ||
# vcpkgArguments: 'openssl ffmpeg opencv opencv[contrib] dlib ncnn' | ||
|
||
- name: run vcpkg | ||
working-directory: ${{env.SOURCE_DIR}} | ||
run: | | ||
if [ ! -d vcpkg ]; then | ||
git clone https://github.com/microsoft/vcpkg.git | ||
cd vcpkg | ||
git checkout -b ${{env.VCPKGGITCOMMITID}} ${{env.VCPKGGITCOMMITID}} | ||
./bootstrap-vcpkg.sh | ||
./vcpkg install --triplet=${{matrix.VCPKG_TARGET_TRIPLET}} openssl libyuv ffmpeg opencv[contrib] | ||
fi | ||
cache: true | ||
cache-key-prefix: cached_qt | ||
|
||
- name: git clone RabbitCommon | ||
working-directory: ${{env.SOURCE_DIR}} | ||
|
@@ -144,7 +162,7 @@ jobs: | |
QT_ANDROID_KEYSTORE_STORE_PASS: ${{secrets.STOREPASS}} | ||
run: | | ||
sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake | ||
${Qt6_DIR}/bin/qt-cmake .. \ | ||
cmake .. \ | ||
-DCMARK_SHARED=OFF \ | ||
-DCMARK_TESTS=OFF \ | ||
-DCMARK_STATIC=ON \ | ||
|
@@ -157,10 +175,14 @@ jobs: | |
-DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \ | ||
-DVCPKG_VERBOSE=ON \ | ||
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ | ||
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" \ | ||
-DCMAKE_INSTALL_PREFIX=`pwd`/install | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target all | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install | ||
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" \ | ||
-DVCPKG_CHAINLbuildOAD_TOOLCHAIN_FILE=${Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=`pwd`/install \ | ||
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ | ||
-DVCPKG_APPLOCAL_DEPS=ON \ | ||
-DINSTALL_QT=ON | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target all | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install | ||
APK_FILE=`find . -name "android-*.apk"` | ||
cp $APK_FILE FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk | ||
7z a FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.zip install/* | ||
|
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
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
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
Oops, something went wrong.