Skip to content

Commit

Permalink
CI: fix VCPKG_TARGET_TRIPLET in android.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Mar 1, 2024
1 parent 13423a3 commit 3f1bb86
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 24 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@ jobs:
qt_arch: [android_arm64_v8a, android_armv7, android_x86_64]
qt_version: [6.6.2]
include:
- BUILD_TYPE: Release
qt_arch: android_arm64_v8a
VCPKG_TARGET_TRIPLET: arm-android
- qt_arch: android_arm64_v8a
VCPKG_TARGET_TRIPLET: arm64-android
ANDROID_ABI: arm64-v8a
ENABLE_DOWNLOAD: ON

- BUILD_TYPE: Release
qt_arch: android_armv7
- qt_arch: android_armv7
VCPKG_TARGET_TRIPLET: arm-android
ANDROID_ABI: armeabi-v7a
ENABLE_DOWNLOAD_MODULE: OFF

- BUILD_TYPE: Release
qt_arch: android_x86_64
- qt_arch: android_x86_64
VCPKG_TARGET_TRIPLET: x64-android
ANDROID_ABI: x86_64
ENABLE_DOWNLOAD: ON
Expand All @@ -41,8 +38,9 @@ jobs:
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
VCPKGGITCOMMITID: eb33d2f7583405fca184bcdf7fdd5828ec88ac05
VCPKGGITCOMMITID: 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
ANDROID_PLATFORM: android-23
ANDROID_NATIVE_API_LEVEL: 23
Expand Down Expand Up @@ -88,7 +86,7 @@ jobs:
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgDirectory: '${{env.SOURCE_DIR}}/vcpkg'

- name: Install Qt of gcc_64
uses: jurplel/install-qt-action@v3
Expand Down Expand Up @@ -125,7 +123,6 @@ jobs:
sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake
- name: build SeetaFace2
if: false
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -f ${{env.INSTALL_DIR}}/lib/cmake/SeetaFaceDetectorConfig.cmake ]; then
Expand All @@ -137,18 +134,19 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_AUTOGEN_VERBOSE=ON \
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DVCPKG_TRACE_FIND_PACKAGE=ON \
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/SeetaFace2/vcpkg_installed \
-DBUILD_EXAMPLE=OFF
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}}
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: build libfacedetection
if: false
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -f ${{env.INSTALL_DIR}}/lib/cmake/facedetection/facedetectionConfig.cmake ]; then
Expand All @@ -160,11 +158,13 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_AUTOGEN_VERBOSE=ON \
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}}
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DVCPKG_TRACE_FIND_PACKAGE=ON \
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libfacedetection/vcpkg_installed
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}}
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target install
fi
Expand All @@ -188,6 +188,7 @@ jobs:
-DCMARK_TESTS=OFF \
-DCMARK_STATIC=ON \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_AUTOGEN_VERBOSE=ON \
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install
qt_modules: qtwebengine ${{matrix.qt_modules}}
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
VCPKGGITCOMMITID: 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
artifact_name: build_macos
FaceRecognizer_VERSION: v0.0.4
Expand Down Expand Up @@ -112,6 +112,10 @@ jobs:
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/SeetaFace2/vcpkg_installed \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DVCPKG_VERBOSE=ON \
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} \
-DBUILD_EXAMPLE=OFF
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
Expand All @@ -129,6 +133,10 @@ jobs:
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libfacedetection/vcpkg_installed \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DVCPKG_VERBOSE=ON \
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} \
-DBUILD_SHARED_LIBS=ON
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
Expand All @@ -153,6 +161,7 @@ jobs:
-DVCPKG_VERBOSE=ON \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DVCPKG_APPLOCAL_DEPS=ON \
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} \
-DINSTALL_QT=ON \
-DSeetaFace_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaNet_DIR=${{env.INSTALL_DIR}}/lib/cmake \
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
INSTALL_DIR: ${{github.workspace}}\.cache\install_msvc_${{matrix.CMAKE_GENERATOR_PLATFORM}}_${{matrix.BUILD_TYPE}}
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
VCPKGGITCOMMITID: eb33d2f7583405fca184bcdf7fdd5828ec88ac05
VCPKGGITCOMMITID: 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
qt_modules: qtwebengine ${{matrix.qt_modules}}
Expand Down Expand Up @@ -88,12 +88,6 @@ jobs:
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{runner.workspace}}/vcpkg/

- 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}}
run: |
Expand All @@ -108,6 +102,11 @@ jobs:
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/SeetaFace2/vcpkg_installed ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DBUILD_EXAMPLE=OFF
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
Expand All @@ -127,6 +126,11 @@ jobs:
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libfacedetection/vcpkg_installed ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DBUILD_SHARED_LIBS=ON
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
Expand Down Expand Up @@ -170,6 +174,8 @@ jobs:
-DVCPKG_VERBOSE=ON ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_APPLOCAL_DEPS=ON ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DINSTALL_QT=ON ^
-DSeetaFace_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DSeetaNet_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
Expand All @@ -190,7 +196,7 @@ jobs:
move /Y install\plugins\*ssl*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
copy /Y ${{env.RUNVCPKG_VCPKG_ROOT}}\installed\${{env.RUNVCPKG_VCPKG_TRIPLET_OUT}}\bin\*.dll install\bin
copy /Y vcpkg_installed\${{matrix.VCPKG_TARGET_TRIPLET}}\bin\*.dll install\bin
makensis Install.nsi
copy /Y FaceRecognizer_${{env.FaceRecognizer_VERSION}}_Setup.exe FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ install:
{
git clone -q "https://github.com/microsoft/vcpkg.git"
cd ${env:VCPKG_DIR}
git checkout -q -b a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6 a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
git checkout -q -b 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f
bootstrap-vcpkg.bat
}
Expand Down

0 comments on commit 3f1bb86

Please sign in to comment.