Skip to content

Commit

Permalink
CI: vcpkg update to 2023.06.20
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Jun 23, 2023
1 parent c671c70 commit fd151e1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install
FaceRecognizer_VERSION: v0.0.4
VCPKGGITCOMMITID: 6adca01a3fadca0cc0b80f03ec57c7c3a0be5c02
VCPKGGITCOMMITID: 1286cac8751e13bb289061b7e3b89eb4c3f613a2
qt_modules: '${{matrix.qt_modules}}'

steps:
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
qt_modules: ${{matrix.qt_modules}}
FaceRecognizer_VERSION: v0.0.4
artifact_name: build_macos
VCPKGGITCOMMITID: 1286cac8751e13bb289061b7e3b89eb4c3f613a2

# Map the job outputs to step outputs
outputs:
Expand All @@ -62,6 +63,17 @@ jobs:
${{env.INSTALL_DIR}}
key: Cache-macos-installed-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}

- name: run-vcpkg
uses: lukka/[email protected]
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 libpng pixman libjpeg-turbo libyuv ffmpeg opencv dlib' # ncnn'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
Expand Down Expand Up @@ -90,13 +102,20 @@ jobs:
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}"
-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
fi
- name: Compile
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: git clone https://github.com/KangLin/RabbitCommon.git

- name: Compile FaceRecognizer
working-directory: ${{github.workspace}}/build
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
run: |
cmake ${{github.workspace}} \
-DCMARK_SHARED=OFF \
Expand All @@ -105,16 +124,16 @@ jobs:
-Dcmark-gfm_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target package
7z a RabbitCommon_${{env.FaceRecognizer_VERSION}}_macos.zip ./install/*
7z a FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos.zip ./install/*
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: |
${{github.workspace}}/build/RabbitCommon-*.tar.gz
${{github.workspace}}/build/RabbitCommon_${{env.FaceRecognizer_VERSION}}_macos.zip
${{github.workspace}}/build/FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos.zip
2 changes: 1 addition & 1 deletion .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
FaceRecognizer_VERSION: v0.0.4
VCPKGGITCOMMITID: b3e0a1e625a0cc00073efb763e39088e5b75939e
VCPKGGITCOMMITID: 1286cac8751e13bb289061b7e3b89eb4c3f613a2
qt_modules: qtwebengine ${{matrix.qt_modules}}
artifact_name: build_msvc

Expand Down

0 comments on commit fd151e1

Please sign in to comment.