Skip to content

Commit 7d436c2

Browse files
committed
CI: modify ci
1 parent cae0c74 commit 7d436c2

File tree

7 files changed

+92
-76
lines changed

7 files changed

+92
-76
lines changed

.github/workflows/android.yml

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
BUILD_TYPE: [Release]
1818
qt_arch: [android_arm64_v8a, android_x86_64]
19-
qt_version: [6.6.3]
19+
qt_version: [6.9.0]
2020
include:
2121
- qt_arch: android_arm64_v8a
2222
VCPKG_TARGET_TRIPLET: arm64-android
@@ -34,17 +34,19 @@ jobs:
3434

3535
env:
3636
artifact_name: build_android
37+
BUILD_DIR: ${{github.workspace}}/build
3738
SOURCE_DIR: ${{github.workspace}}/.cache/source
3839
TOOSL_DIR: ${{github.workspace}}/.cache/tools
3940
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
40-
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
41+
VCPKGGITCOMMITID: d8ad13c401b30c2836d00b8923c9127f05f591c7
4142
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
4243
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
4344
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
44-
ANDROID_PLATFORM: android-23
45-
ANDROID_NATIVE_API_LEVEL: 23
45+
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/26.3.11579264
46+
ANDROID_PLATFORM: android-34
47+
ANDROID_NATIVE_API_LEVEL: 34
4648
ANDROID_ABI: ${{matrix.ANDROID_ABI}}
47-
qt_modules: 'qtimageformats qtmultimedia qtscxml qt5compat qtwebchannel qtpositioning'
49+
qt_modules: 'qtimageformats qtmultimedia qtscxml qt5compat'
4850
FaceRecognizer_VERSION: v0.0.4
4951
ENABLE_DOWNLOAD_MODULE: ${{matrix.ENABLE_DOWNLOAD_MODULE}}
5052

@@ -61,42 +63,54 @@ jobs:
6163
- name: make directory
6264
run: |
6365
cmake -E make_directory ${{env.SOURCE_DIR}}
64-
cmake -E make_directory ${{env.TOOSL_DIR}}
66+
cmake -E make_directory ${{env.TOOLS_DIR}}
6567
cmake -E make_directory ${{env.INSTALL_DIR}}
66-
cmake -E make_directory ${{github.workspace}}/build
67-
echo "ANDROID_NDK_ROOT:${ANDROID_NDK_ROOT}"
68-
echo "ANDROID_NDK_HOME:${ANDROID_NDK_HOME}"
69-
echo "ANDROID_NDK_LATEST_HOME:${ANDROID_NDK_LATEST_HOME}"
70-
echo "ANDROID_HOME:${ANDROID_HOME}"
71-
echo "ANDROID_NDK:${ANDROID_NDK}"
68+
cmake -E make_directory ${{env.BUILD_DIR}}
69+
70+
- name: Install apt packages
71+
run: |
72+
#sudo apt-get update -y
73+
#sudo apt-get upgrade -y
74+
sudo apt install -y -q ninja-build nasm
7275
7376
- name: Cache installed
74-
uses: actions/cache@v2
77+
uses: actions/cache@v4
7578
id: cache-installed
7679
with:
7780
path: |
7881
${{env.INSTALL_DIR}}
7982
key: install_android_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
8083

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-
8784
- name: run-vcpkg
8885
uses: lukka/run-vcpkg@v11
8986
with:
90-
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port.
91-
#setupOnly: # optional
92-
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
9387
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
94-
vcpkgDirectory: '${{env.SOURCE_DIR}}/vcpkg'
88+
vcpkgDirectory: ${{env.SOURCE_DIR}}/vcpkg
89+
90+
- name: run vcpkg
91+
if: false
92+
working-directory: ${{github.workspace}}
93+
run: |
94+
vcpkg install --triplet ${{matrix.VCPKG_TARGET_TRIPLET}} --x-feature=vnc
95+
96+
- name: Install Qt of linux_gcc_64
97+
uses: jurplel/install-qt-action@v4
98+
if: ${{ matrix.qt_version == '6.9.0' }}
99+
with:
100+
dir: '${{env.TOOLS_DIR}}/qt' # optional
101+
version: '${{matrix.qt_version}}'
102+
#host: 'linux'
103+
target: 'desktop'
104+
arch: 'linux_gcc_64'
105+
set-env: false
106+
cache: true
107+
cache-key-prefix: cached_qt
95108

96109
- name: Install Qt of gcc_64
97-
uses: jurplel/install-qt-action@v3
110+
uses: jurplel/install-qt-action@v4
111+
if: ${{ matrix.qt_version == '6.6.3' }}
98112
with:
99-
dir: '${{env.TOOSL_DIR}}/qt' # optional
113+
dir: '${{env.TOOLS_DIR}}/qt' # optional
100114
version: '${{matrix.qt_version}}'
101115
#host: 'linux'
102116
target: 'desktop'
@@ -109,7 +123,7 @@ jobs:
109123
uses: jurplel/install-qt-action@v3
110124
with:
111125
# Directory to install Qt
112-
dir: '${{env.TOOSL_DIR}}/qt' # optional
126+
dir: '${{env.TOOLS_DIR}}/qt' # optional
113127
# Version of Qt to install
114128
version: '${{matrix.qt_version}}'
115129
# Host platform
@@ -126,7 +140,7 @@ jobs:
126140
- name: chmod qt-cmake
127141
run: |
128142
sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake
129-
143+
130144
- name: build SeetaFace2
131145
working-directory: ${{env.SOURCE_DIR}}
132146
run: |

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
with:
1919
check_filenames: true
2020
path: ${{github.workspace}}
21-
skip: "*.lua,codespell.yml,*.ts,qt-installer.sh"
21+
skip: "*.lua,codespell.yml,*.ts,qt-installer.sh,flags.patch,vcpkg/,vcpkg/*.*,vcpkg/*"
2222
ignore_words_list: "nD,rabits"

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
cmake -E make_directory ${{github.workspace}}/build
4343
4444
- name: Cache installed
45-
uses: actions/cache@v2
45+
uses: actions/cache@v4
4646
id: cache-installed
4747
with:
4848
path: |

.github/workflows/macos.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: build_macos
1+
# Author: Kang Lin <kl222@126.com>
2+
3+
name: macos
24

35
on:
46
workflow_call:
@@ -16,12 +18,12 @@ jobs:
1618
matrix:
1719
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1820
BUILD_TYPE: [Release, Debug]
19-
qt_version: [6.7.1, 5.15.2, 5.12.12]
21+
qt_version: [6.9.0, 5.15.2, 5.12.12]
2022
qt_arch: [clang_64]
2123
VCPKG_TARGET_TRIPLET: [x64-osx]
2224
include:
23-
- qt_version: 6.7.1
24-
qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtpositioning qtmultimedia
25+
- qt_version: 6.9.0
26+
qt_modules: qtscxml qt5compat qtmultimedia
2527
ENABLE_DOWNLOAD_MODULE: ON
2628

2729
- qt_version: 5.15.2
@@ -36,11 +38,12 @@ jobs:
3638

3739
env:
3840
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
41+
BUILD_DIR: ${{github.workspace}}/build
3942
SOURCE_DIR: ${{github.workspace}}/.cache/source
4043
TOOSL_DIR: ${{github.workspace}}/.cache/tools
41-
INSTALL_DIR: ${{github.workspace}}/.cache/install_2024_03_13
44+
INSTALL_DIR: ${{github.workspace}}/.cache/install
4245
qt_modules: qtwebengine ${{matrix.qt_modules}}
43-
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
46+
VCPKGGITCOMMITID: d8ad13c401b30c2836d00b8923c9127f05f591c7
4447
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
4548
artifact_name: build_macos
4649
FaceRecognizer_VERSION: v0.0.4
@@ -61,10 +64,10 @@ jobs:
6164
cmake -E make_directory ${{env.SOURCE_DIR}}
6265
cmake -E make_directory ${{env.TOOSL_DIR}}
6366
cmake -E make_directory ${{env.INSTALL_DIR}}
64-
cmake -E make_directory ${{github.workspace}}/build
67+
cmake -E make_directory ${{env.BUILD_DIR}}
6568
6669
- name: Cache installed
67-
uses: actions/cache@v3
70+
uses: actions/cache@v4
6871
id: cache-installed
6972
with:
7073
path: |
@@ -81,19 +84,15 @@ jobs:
8184
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
8285
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
8386

84-
- name: run vcpkg
85-
run: |
86-
brew install nasm
87-
8887
- name: Install Qt
8988
uses: jurplel/install-qt-action@v3
9089
with:
91-
dir: '${{env.TOOSL_DIR}}/qt' # optional
90+
dir: '${{env.TOOLS_DIR}}/qt' # optional
9291
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
9392
arch: '${{matrix.qt_arch}}' # optional
94-
modules: '${{env.qt_modules}}' # optional
93+
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
9594
cache: true
96-
cache-key-prefix: cached_qt
95+
cache-key-prefix: cached_qt_${{matrix.qt_version}}_macos
9796

9897
- name: build SeetaFace2
9998
working-directory: ${{env.SOURCE_DIR}}
@@ -170,7 +169,7 @@ jobs:
170169
7z a FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos_qt${{matrix.qt_version}}.zip ./install/*
171170
172171
- name: Update artifact
173-
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
172+
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
174173
uses: actions/upload-artifact@v4
175174
with:
176175
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}

.github/workflows/mingw.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: build_mingw
1+
# Author: Kang Lin <kl222@126.com>
2+
3+
name: mingw
24

35
on:
46
workflow_call:
@@ -18,7 +20,10 @@ jobs:
1820
defaults:
1921
run:
2022
shell: cmd
21-
23+
24+
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
25+
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
26+
# See: https://github.com/actions/runner-images/
2227
runs-on: windows-latest
2328

2429
env:
@@ -50,7 +55,6 @@ jobs:
5055
mingw-w64-x86_64-nsis ^
5156
mingw-w64-x86_64-gcc ^
5257
mingw-w64-x86_64-qt5 ^
53-
mingw-w64-x86_64-qtwebkit ^
5458
mingw-w64-x86_64-zlib ^
5559
mingw-w64-x86_64-openssl ^
5660
mingw-w64-x86_64-cyrus-sasl ^
@@ -70,15 +74,15 @@ jobs:
7074
cmake -E make_directory ${{env.SOURCE_DIR}}
7175
cmake -E make_directory ${{env.TOOSL_DIR}}
7276
cmake -E make_directory ${{env.INSTALL_DIR}}
73-
cmake -E make_directory ${{github.workspace}}\build
77+
cmake -E make_directory ${{env.BUILD_DIR}}
7478
7579
- name: Cache installed
76-
uses: actions/cache@v3
80+
uses: actions/cache@v4
7781
id: cache-installed
7882
with:
7983
path: |
8084
${{env.INSTALL_DIR}}
81-
key: cache-installed-mingw
85+
key: install_mingw_${{matrix.BUILD_TYPE}}
8286

8387
- name: build SeetaFace2
8488
working-directory: ${{env.SOURCE_DIR}}

.github/workflows/msvc.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: build_msvc
1+
# Author: Kang Lin <kl222@126.com>
2+
3+
name: msvc
24

35
on:
46
workflow_call:
@@ -13,11 +15,11 @@ jobs:
1315
strategy:
1416
matrix:
1517
BUILD_TYPE: [Release, Debug]
16-
qt_version: [6.7.1, 5.15.2, 5.12.12]
18+
qt_version: [6.9.0, 5.15.2, 5.12.12]
1719
include:
18-
- qt_version: 6.7.1
19-
qt_arch: win64_msvc2019_64
20-
qt_modules: qtscxml qtpositioning qtwebchannel qtwebsockets qtwebview qtmultimedia qt5compat
20+
- qt_version: 6.9.0
21+
qt_arch: win64_msvc2022_64
22+
qt_modules: qtscxml qtmultimedia qt5compat
2123
VCPKG_TARGET_TRIPLET: x64-windows
2224
VCPKG_PLATFORM_TOOLSET: v143
2325
CMAKE_GENERATOR_PLATFORM: x64
@@ -29,25 +31,29 @@ jobs:
2931
VCPKG_PLATFORM_TOOLSET: v143
3032
CMAKE_GENERATOR_PLATFORM: x64
3133
ENABLE_DOWNLOAD_MODULE: OFF
34+
VCPKG_OVERLAY_PORTS: "vcpkg/ports"
3235

3336
- qt_version: 5.12.12
3437
qt_arch: win32_msvc2017
3538
VCPKG_TARGET_TRIPLET: x86-windows
3639
VCPKG_PLATFORM_TOOLSET: v143
3740
CMAKE_GENERATOR_PLATFORM: Win32
3841
ENABLE_DOWNLOAD_MODULE: OFF
42+
VCPKG_OVERLAY_PORTS: "vcpkg/ports"
3943

4044
runs-on: windows-latest
4145

4246
env:
47+
BUILD_DIR: ${{github.workspace}}\build
4348
SOURCE_DIR: ${{github.workspace}}\.cache\source
4449
TOOSL_DIR: ${{github.workspace}}\.cache\tools
45-
INSTALL_DIR: ${{github.workspace}}\.cache\install_msvc_${{matrix.CMAKE_GENERATOR_PLATFORM}}_${{matrix.BUILD_TYPE}}
50+
INSTALL_DIR: ${{github.workspace}}\.cache\install
4651
CMAKE_GENERATOR: "Visual Studio 17 2022"
4752
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
48-
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
53+
VCPKGGITCOMMITID: d8ad13c401b30c2836d00b8923c9127f05f591c7
4954
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
5055
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
56+
VCPKG_OVERLAY_PORTS: "${{github.workspace}}/${{matrix.VCPKG_OVERLAY_PORTS}}"
5157
qt_modules: qtwebengine ${{matrix.qt_modules}}
5258
artifact_name: build_msvc
5359
FaceRecognizer_VERSION: v0.0.4
@@ -69,13 +75,13 @@ jobs:
6975

7076
- name: Make directories
7177
run: |
72-
cmake -E make_directory ${{github.workspace}}/build
78+
cmake -E make_directory ${{env.BUILD_DIR}}
7379
cmake -E make_directory ${{env.SOURCE_DIR}}
7480
cmake -E make_directory ${{env.TOOSL_DIR}}
7581
cmake -E make_directory ${{env.INSTALL_DIR}}
7682
7783
- name: Cache installed
78-
uses: actions/cache@v3
84+
uses: actions/cache@v4
7985
id: cache-installed
8086
with:
8187
path: |
@@ -136,21 +142,15 @@ jobs:
136142
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
137143
)
138144
139-
- name: Cache Qt
140-
id: cache-qt
141-
uses: actions/cache@v1 # not v2!
142-
with:
143-
path: ${{env.TOOSL_DIR}}/qt
144-
key: qt_${{matrix.qt_version}}_${{matrix.qt_arch}}
145-
146145
- name: Install Qt
147-
uses: jurplel/install-qt-action@v3
146+
uses: jurplel/install-qt-action@v4
148147
with:
149-
dir: '${{env.TOOSL_DIR}}/qt' # optional
148+
dir: '${{env.TOOLS_DIR}}/qt' # optional
150149
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
151150
arch: '${{matrix.qt_arch}}' # optional
152-
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
153-
cached: '${{steps.cache-qt.outputs.cache-hit}}' # optional, default is false
151+
modules: '${{env.qt_modules}}' # optional. see: https://ddalcino.github.io/aqt-list-server/
152+
cache: true
153+
cache-key-prefix: cached-qt_${{matrix.qt_version}}_${{matrix.qt_arch}}
154154

155155
- name: git clone RabbitCommon
156156
working-directory: ${{env.SOURCE_DIR}}
@@ -203,7 +203,7 @@ jobs:
203203
copy /Y FaceRecognizer_${{env.FaceRecognizer_VERSION}}_Setup.exe FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
204204
205205
- name: Update configure file
206-
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
206+
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
207207
working-directory: ${{github.workspace}}\build
208208
run: |
209209
${{github.workspace}}\build\install\bin\FaceRecognizerApp.exe ^
@@ -215,7 +215,7 @@ jobs:
215215
-m "${{env.FaceRecognizer_VERSION}}"
216216
217217
- name: Update artifact
218-
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
218+
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
219219
uses: actions/upload-artifact@v4
220220
with:
221221
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}

0 commit comments

Comments
 (0)