Skip to content

Commit 7bf2160

Browse files
committed
1 parent 81feb53 commit 7bf2160

7 files changed

Lines changed: 51 additions & 36 deletions

File tree

.github/workflows/android.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Author: Kang Lin <kl222@126.com>
2+
13
name: android
24

35
on:
@@ -14,7 +16,7 @@ jobs:
1416
matrix:
1517
BUILD_TYPE: [Release]
1618
qt_arch: [android_arm64_v8a, android_x86_64]
17-
qt_version: [6.7.1]
19+
qt_version: [6.6.3]
1820
include:
1921
- qt_arch: android_arm64_v8a
2022
VCPKG_TARGET_TRIPLET: arm64-android
@@ -26,21 +28,23 @@ jobs:
2628
ANDROID_ABI: x86_64
2729
ENABLE_DOWNLOAD_MODULE: ON
2830

31+
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
32+
# See: https://github.com/actions/runner-images/
2933
runs-on: ubuntu-latest
3034

3135
env:
3236
artifact_name: build_android
3337
SOURCE_DIR: ${{github.workspace}}/.cache/source
3438
TOOSL_DIR: ${{github.workspace}}/.cache/tools
3539
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
36-
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
40+
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
3741
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
3842
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
3943
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
4044
ANDROID_PLATFORM: android-23
4145
ANDROID_NATIVE_API_LEVEL: 23
4246
ANDROID_ABI: ${{matrix.ANDROID_ABI}}
43-
qt_modules: 'qtwebchannel qtwebsockets qtwebview qtimageformats qtmultimedia qtscxml qt5compat'
47+
qt_modules: 'qtimageformats qtmultimedia qtscxml qt5compat qtwebchannel qtpositioning'
4448
FaceRecognizer_VERSION: v0.0.4
4549
ENABLE_DOWNLOAD_MODULE: ${{matrix.ENABLE_DOWNLOAD_MODULE}}
4650

@@ -74,6 +78,12 @@ jobs:
7478
${{env.INSTALL_DIR}}
7579
key: install_android_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
7680

81+
- name: Install apt packages
82+
run: |
83+
sudo apt-get update -y
84+
sudo apt-get upgrade -y
85+
sudo apt install -y -q ninja-build nasm
86+
7787
- name: run-vcpkg
7888
uses: lukka/run-vcpkg@v11
7989
with:
@@ -129,10 +139,7 @@ jobs:
129139
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
130140
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
131141
-DCMAKE_VERBOSE_MAKEFILE=ON \
132-
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
133-
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
134142
-DBUILD_SHARED_LIBS=OFF \
135-
-DCMAKE_VERBOSE_MAKEFILE=ON \
136143
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
137144
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
138145
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
@@ -159,6 +166,7 @@ jobs:
159166
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
160167
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
161168
-DCMAKE_VERBOSE_MAKEFILE=ON \
169+
-DBUILD_SHARED_LIBS=OFF \
162170
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
163171
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
164172
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
@@ -201,11 +209,13 @@ jobs:
201209
-DVCPKG_TRACE_FIND_PACKAGE=ON \
202210
-DVCPKG_VERBOSE=ON \
203211
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libvncserver/vcpkg_installed \
204-
-DANDROID_ABI=${{env.ANDROID_ABI}} \
205-
-DINSTALL_QT=ON \
212+
-DRABBIT_ENABLE_INSTALL_DEPENDENT=ON \
213+
-DRABBIT_ENABLE_INSTALL_QT=ON \
214+
-DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=ON \
206215
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
207216
-DQT_ANDROID_SIGN_APK=ON \
208217
-DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \
218+
-DANDROID_ABI=${{env.ANDROID_ABI}} \
209219
-DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \
210220
-DCMAKE_INSTALL_PREFIX=`pwd`/install
211221
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target all
@@ -231,9 +241,9 @@ jobs:
231241
232242
- name: Update artifact
233243
if: ${{ matrix.BUILD_TYPE == 'Release' }}
234-
uses: actions/upload-artifact@v3
244+
uses: actions/upload-artifact@v4
235245
with:
236-
name: ${{ env.artifact_name }}
246+
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
237247
path: |
238248
${{github.workspace}}/build/FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk
239249
${{github.workspace}}/build/update_android.xml

.github/workflows/build.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,56 @@ jobs:
3434
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
3535

3636
deploy:
37-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
37+
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
3838
runs-on: ubuntu-latest
39-
needs: [ubuntu, msvc, macos, mingw, doxygen, android]
39+
needs: [ubuntu, msvc, macos, doxygen, android]
4040
steps:
4141
- name: Checkout Repository
4242
uses: actions/checkout@v3
4343
with:
4444
submodules: false
4545

4646
- name: Download ubuntu
47-
uses: actions/download-artifact@v4.1.7
47+
uses: actions/download-artifact@v4
4848
with:
4949
name: ${{ needs.ubuntu.outputs.name }}
5050
path: ${{ env.artifact_path }}
51+
merge-multiple: true
5152

5253
- name: Download msvc
53-
uses: actions/download-artifact@v4.1.7
54+
uses: actions/download-artifact@v4
5455
with:
55-
name: ${{ needs.msvc.outputs.name }}
56+
pattern: ${{ needs.msvc.outputs.name }}*
5657
path: ${{ env.artifact_path }}
58+
merge-multiple: true
5759

5860
- name: Download mingw
59-
uses: actions/download-artifact@v4.1.7
61+
uses: actions/download-artifact@v4
6062
with:
6163
name: ${{ needs.mingw.outputs.name }}
6264
path: ${{ env.artifact_path }}
65+
merge-multiple: true
6366

6467
- name: Download macos
65-
uses: actions/download-artifact@v4.1.7
68+
uses: actions/download-artifact@v4
69+
with:
70+
pattern: ${{ needs.macos.outputs.name }}*
71+
path: ${{ env.artifact_path }}
72+
merge-multiple: true
73+
74+
- name: Download android
75+
uses: actions/download-artifact@v4
6676
with:
67-
name: ${{ needs.macos.outputs.name }}
77+
pattern: ${{ needs.android.outputs.name }}_*
6878
path: ${{ env.artifact_path }}
79+
merge-multiple: true
6980

7081
- name: Download doxygen
71-
uses: actions/download-artifact@v4.1.7
82+
uses: actions/download-artifact@v4
7283
with:
7384
name: ${{ needs.doxygen.outputs.name }}
7485
path: ${{ env.artifact_path }}
86+
merge-multiple: true
7587

7688
- name: Make Note.md file
7789
run: |

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
9494
- name: Update artifact
9595
if: ${{ env.BUILD_TYPE == 'Release' }}
96-
uses: actions/upload-artifact@v3
96+
uses: actions/upload-artifact@v4
9797
with:
9898
name: ${{ env.artifact_name }}
9999
path: |

.github/workflows/macos.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
VCPKG_TARGET_TRIPLET: [x64-osx]
2222
include:
2323
- qt_version: 6.7.1
24-
qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtwebsockets qtmultimedia
24+
qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtpositioning qtmultimedia
2525
ENABLE_DOWNLOAD_MODULE: ON
2626

2727
- qt_version: 5.15.2
@@ -40,7 +40,7 @@ jobs:
4040
TOOSL_DIR: ${{github.workspace}}/.cache/tools
4141
INSTALL_DIR: ${{github.workspace}}/.cache/install_2024_03_13
4242
qt_modules: qtwebengine ${{matrix.qt_modules}}
43-
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
43+
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
4444
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
4545
artifact_name: build_macos
4646
FaceRecognizer_VERSION: v0.0.4
@@ -85,13 +85,6 @@ jobs:
8585
run: |
8686
brew install nasm
8787
88-
- name: Cache Qt
89-
id: cache-qt
90-
uses: actions/cache@v1 # not v2!
91-
with:
92-
path: ${{env.TOOSL_DIR}}/qt
93-
key: qt${{matrix.qt_version}}-${{matrix.qt_arch}}
94-
9588
- name: Install Qt
9689
uses: jurplel/install-qt-action@v3
9790
with:
@@ -178,8 +171,8 @@ jobs:
178171
179172
- name: Update artifact
180173
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
181-
uses: actions/upload-artifact@v3
174+
uses: actions/upload-artifact@v4
182175
with:
183-
name: ${{ env.artifact_name }}
176+
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
184177
path: |
185178
${{github.workspace}}/build/FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos_qt${{matrix.qt_version}}.zip

.github/workflows/mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
135135
- name: Update artifact
136136
if: ${{ matrix.BUILD_TYPE == 'Release' }}
137-
uses: actions/upload-artifact@v3
137+
uses: actions/upload-artifact@v4
138138
with:
139139
name: ${{ env.artifact_name }}
140140
path: |

.github/workflows/msvc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
INSTALL_DIR: ${{github.workspace}}\.cache\install_msvc_${{matrix.CMAKE_GENERATOR_PLATFORM}}_${{matrix.BUILD_TYPE}}
4646
CMAKE_GENERATOR: "Visual Studio 17 2022"
4747
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
48-
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
48+
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
4949
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
5050
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
5151
qt_modules: qtwebengine ${{matrix.qt_modules}}
@@ -216,9 +216,9 @@ jobs:
216216
217217
- name: Update artifact
218218
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
219-
uses: actions/upload-artifact@v3
219+
uses: actions/upload-artifact@v4
220220
with:
221-
name: ${{ env.artifact_name }}
221+
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
222222
path: |
223223
${{github.workspace}}\build\FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
224224
${{github.workspace}}\build\update_windows.json

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
158158
- name: Update artifact
159159
if: ${{ matrix.BUILD_TYPE == 'Release' }}
160-
uses: actions/upload-artifact@v3
160+
uses: actions/upload-artifact@v4
161161
with:
162162
name: ${{ env.artifact_name }}
163163
path: |

0 commit comments

Comments
 (0)