1- name : build_msvc
1+ # Author: Kang Lin <kl222@126.com>
2+
3+ name : msvc
24
35on :
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