Skip to content

Commit a5b7c6f

Browse files
committed
[升级Qt版本并全面优化CI/CD工作流配置]: 将项目基础工具链升级到Qt 6.10.1版本,同时更新所有GitHub Actions工作流配置,提升构建系统的稳定性和一致性
- **Qt版本升级**: 将项目从Qt 6.10.0升级到Qt 6.10.1,更新了GitHub Actions依赖安装配置、CMake配置文件和Windows平台的qsb编译脚本,确保使用最新的Qt框架功能 - **CI/CD工具链更新**: 将所有GitHub Actions工作流中的关键actions升级到最新版本,包括checkout从v5升级到v6、cache从v4升级到v5,提升工作流执行效率和稳定性 - **构建工具完善**: 在Linux构建环境中增加autoconf、autoconf-archive、automake和libtool等构建工具链,确保复杂的跨平台编译任务能够顺利完成 - **vcpkg基线更新**: 更新vcpkg的builtin-baseline到最新版本b8927a1,同步最新的第三方库依赖和安全修复 - **代码格式规范化**: 统一所有工作流文件的字符串引用格式,从混合单双引号统一为双引号,提升配置文件的格式一致性 - **工作流配置优化**: 改进delete_workflow.yml工作流的输入参数逻辑,修复条件表达式格式,增加默认值配置,提升用户体验
1 parent a3beaf9 commit a5b7c6f

12 files changed

Lines changed: 126 additions & 128 deletions

File tree

.github/actions/install-dependencies/action.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
name: 'Install Build Dependencies'
2-
description: 'Install vcpkg libraries and Qt environment for cross-platform builds'
1+
name: "Install Build Dependencies"
2+
description: "Install vcpkg libraries and Qt environment for cross-platform builds"
33

44
inputs:
55
vcpkg_libs:
6-
description: 'vcpkg libraries to install'
6+
description: "vcpkg libraries to install"
77
required: false
8-
default: 'breakpad crashpad freeimage giflib opencv[contrib,thread] tl-expected'
8+
default: "breakpad crashpad freeimage giflib opencv[contrib,thread] tl-expected"
99
type: string
1010
qt_modules:
11-
description: 'Qt modules to install'
11+
description: "Qt modules to install"
1212
required: false
13-
default: 'qt5compat qtnetworkauth qtimageformats'
13+
default: "qt5compat qtnetworkauth qtimageformats"
1414
type: string
1515
qt_ver:
16-
description: 'Qt version to install'
16+
description: "Qt version to install"
1717
required: false
18-
default: '6.10.0'
18+
default: "6.10.1"
1919
type: string
2020

2121
runs:
22-
using: 'composite'
22+
using: "composite"
2323

2424
steps:
2525
- name: Install Custom VCPKG
2626
uses: RealChuan/install-vcpkg@main
27-
27+
2828
- name: Delete vcpkg.json
2929
shell: bash
3030
run: |
3131
rm vcpkg.json
3232
3333
- name: Cache windows vcpkg
3434
if: runner.os == 'Windows'
35-
uses: actions/cache@v4
36-
with:
35+
uses: actions/cache@v5
36+
with:
3737
path: C:\vcpkg\installed
3838
key: ${{ runner.os }}-vcpkg-installed-${{ github.sha }}
3939
restore-keys: |
@@ -42,8 +42,8 @@ runs:
4242
4343
- name: Cache macos or linux vcpkg
4444
if: runner.os == 'macOS' || runner.os == 'Linux'
45-
uses: actions/cache@v4
46-
with:
45+
uses: actions/cache@v5
46+
with:
4747
path: /usr/local/share/vcpkg/installed
4848
key: ${{ runner.os }}-vcpkg-installed-${{ github.sha }}
4949
restore-keys: |
@@ -60,8 +60,8 @@ runs:
6060
--clean-buildtrees-after-build --clean-packages-after-build \
6161
|| (cat C:/vcpkg/installed/vcpkg/issue_body.md && exit 1)
6262
# vcpkg install ${{ inputs.vcpkg_libs }} --triplet x64-windows-static-md \
63-
# --clean-buildtrees-after-build --clean-packages-after-build \
64-
# || (cat C:/vcpkg/installed/vcpkg/issue_body.md && exit 1)
63+
# --clean-buildtrees-after-build --clean-packages-after-build \
64+
# || (cat C:/vcpkg/installed/vcpkg/issue_body.md && exit 1)
6565
6666
- name: Install dependencies on macos
6767
if: runner.os == 'macOS'

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
version: 2
77
updates:
88
- package-ecosystem: "github-actions" # See documentation for possible values
9-
directories :
9+
directories:
1010
- "/" # Location of package manifests
1111
- "/.github/actions/**"
1212
schedule:

.github/workflows/clean_cache.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Cleanup caches by a branch
22
on:
33
# 每周一 0 点触发
44
schedule:
5-
- cron: '0 0 * * 1'
5+
- cron: "0 0 * * 1"
66
workflow_dispatch:
77

88
jobs:
@@ -15,12 +15,12 @@ jobs:
1515
contents: read
1616
steps:
1717
- name: Check out code
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: Cleanup
2121
run: |
2222
gh extension install actions/gh-actions-cache
23-
23+
2424
REPO=${{ github.repository }}
2525
BRANCH=${{ github.ref }}
2626
@@ -37,4 +37,3 @@ jobs:
3737
echo "Done"
3838
env:
3939
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-

.github/workflows/cmake.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ name: CMake Build
33
on:
44
push:
55
paths-ignore:
6-
- 'docs/**'
7-
- 'qmake/**'
8-
- 'translations/**'
9-
- '**/*.md'
10-
- '**/*.txt'
11-
- '**/.clang-*'
12-
- '**/.gitignore'
13-
- '**/*.pri'
14-
- '**/LICENSE*'
15-
- '**/*.pro'
16-
- '**/README*'
6+
- "docs/**"
7+
- "qmake/**"
8+
- "translations/**"
9+
- "**/*.md"
10+
- "**/*.txt"
11+
- "**/.clang-*"
12+
- "**/.gitignore"
13+
- "**/*.pri"
14+
- "**/LICENSE*"
15+
- "**/*.pro"
16+
- "**/README*"
1717
pull_request:
1818
paths-ignore:
19-
- 'docs/**'
20-
- 'qmake/**'
21-
- 'translations/**'
22-
- '**/*.md'
23-
- '**/*.txt'
24-
- '**/.clang-*'
25-
- '**/.gitignore'
26-
- '**/*.pri'
27-
- '**/LICENSE*'
28-
- '**/*.pro'
29-
- '**/README*'
19+
- "docs/**"
20+
- "qmake/**"
21+
- "translations/**"
22+
- "**/*.md"
23+
- "**/*.txt"
24+
- "**/.clang-*"
25+
- "**/.gitignore"
26+
- "**/*.pri"
27+
- "**/LICENSE*"
28+
- "**/*.pro"
29+
- "**/README*"
3030

3131
env:
32-
MACOSX_DEPLOYMENT_TARGET: '13.0'
32+
MACOSX_DEPLOYMENT_TARGET: "13.0"
3333
BUILD_DIR: build
3434
BUILD_TYPE: RelWithDebInfo
3535

@@ -54,10 +54,10 @@ jobs:
5454
arch: arm64
5555

5656
steps:
57-
- uses: actions/checkout@v5
58-
with:
57+
- uses: actions/checkout@v6
58+
with:
5959
fetch-depth: 1
60-
60+
6161
- uses: ./.github/actions/install-dependencies
6262

6363
- name: Configure and build windows
@@ -94,7 +94,7 @@ jobs:
9494
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}" \
9595
-G "${{ matrix.generators }}"
9696
cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
97-
97+
9898
- name: Display binary directory tree (Windows)
9999
if: runner.os == 'Windows'
100100
shell: pwsh
@@ -107,4 +107,4 @@ jobs:
107107
shell: bash
108108
run: |
109109
cd binaries/
110-
tree
110+
tree

.github/workflows/codeql.yml

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,47 @@ name: CodeQL
33
on:
44
push:
55
paths-ignore:
6-
- 'docs/**'
7-
- 'packaging/**'
8-
- 'qmake/**'
9-
- 'translations/**'
10-
- '**/*.md'
11-
- '**/*.txt'
12-
- '**/.clang-*'
13-
- '**/.gitignore'
14-
- '**/*.pri'
15-
- '**/LICENSE*'
16-
- '**/*.pro'
17-
- '**/README*'
6+
- "docs/**"
7+
- "packaging/**"
8+
- "qmake/**"
9+
- "translations/**"
10+
- "**/*.md"
11+
- "**/*.txt"
12+
- "**/.clang-*"
13+
- "**/.gitignore"
14+
- "**/*.pri"
15+
- "**/LICENSE*"
16+
- "**/*.pro"
17+
- "**/README*"
1818
branches-ignore:
19-
- 'dependabot/**'
19+
- "dependabot/**"
2020
pull_request:
2121
paths-ignore:
22-
- 'docs/**'
23-
- 'packaging/**'
24-
- 'qmake/**'
25-
- 'translations/**'
26-
- '**/*.md'
27-
- '**/*.txt'
28-
- '**/.clang-*'
29-
- '**/.gitignore'
30-
- '**/*.pri'
31-
- '**/LICENSE*'
32-
- '**/*.pro'
33-
- '**/README*'
22+
- "docs/**"
23+
- "packaging/**"
24+
- "qmake/**"
25+
- "translations/**"
26+
- "**/*.md"
27+
- "**/*.txt"
28+
- "**/.clang-*"
29+
- "**/.gitignore"
30+
- "**/*.pri"
31+
- "**/LICENSE*"
32+
- "**/*.pro"
33+
- "**/README*"
3434
branches-ignore:
35-
- 'dependabot/**'
36-
35+
- "dependabot/**"
36+
3737
schedule:
38-
- cron: '0 0 1 * *'
38+
- cron: "0 0 1 * *"
3939
workflow_dispatch:
40-
40+
4141
jobs:
4242
CodeQL:
4343
runs-on: ubuntu-latest
44-
45-
steps:
46-
- uses: actions/checkout@v5
44+
45+
steps:
46+
- uses: actions/checkout@v6
4747
with:
4848
fetch-depth: 1
4949

@@ -52,11 +52,10 @@ jobs:
5252
- name: Initialize CodeQL
5353
uses: github/codeql-action/init@v4
5454
with:
55-
languages: cpp
55+
languages: cpp
5656

5757
- name: Autobuild
5858
uses: github/codeql-action/autobuild@v4
5959

6060
- name: Perform CodeQL Analysis
6161
uses: github/codeql-action/analyze@v4
62-

.github/workflows/delete_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ jobs:
6767
'action_required,cancelled,failure,skipped' ||
6868
github.event.inputs.delete_run_by_conclusion_pattern
6969
}}
70-
dry_run: ${{ github.event.inputs.dry_run }}
70+
dry_run: ${{ github.event.inputs.dry_run }}

.github/workflows/qmake.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
name: QMake Build
22

3-
on:
3+
on:
44
push:
55
paths-ignore:
6-
- 'cmake/**'
7-
- 'docs/**'
8-
- 'packaging/**'
9-
- 'translations/**'
10-
- '**/CMakeLists.txt'
11-
- '**/*.md'
12-
- '**/*.txt'
13-
- '**/.clang-*'
14-
- '**/.gitignore'
15-
- '**/LICENSE*'
16-
- '**/README*'
17-
- 'vcpkg.json'
6+
- "cmake/**"
7+
- "docs/**"
8+
- "packaging/**"
9+
- "translations/**"
10+
- "**/CMakeLists.txt"
11+
- "**/*.md"
12+
- "**/*.txt"
13+
- "**/.clang-*"
14+
- "**/.gitignore"
15+
- "**/LICENSE*"
16+
- "**/README*"
17+
- "vcpkg.json"
1818
pull_request:
1919
paths-ignore:
20-
- 'cmake/**'
21-
- 'docs/**'
22-
- 'packaging/**'
23-
- 'translations/**'
24-
- '**/CMakeLists.txt'
25-
- '**/*.md'
26-
- '**/*.txt'
27-
- '**/.clang-*'
28-
- '**/.gitignore'
29-
- '**/LICENSE*'
30-
- '**/README*'
31-
- 'vcpkg.json'
20+
- "cmake/**"
21+
- "docs/**"
22+
- "packaging/**"
23+
- "translations/**"
24+
- "**/CMakeLists.txt"
25+
- "**/*.md"
26+
- "**/*.txt"
27+
- "**/.clang-*"
28+
- "**/.gitignore"
29+
- "**/LICENSE*"
30+
- "**/README*"
31+
- "vcpkg.json"
3232

3333
env:
3434
MACOSX_DEPLOYMENT_TARGET: 13.0
@@ -51,14 +51,14 @@ jobs:
5151
arch: arm64
5252

5353
steps:
54-
- uses: actions/checkout@v5
55-
with:
54+
- uses: actions/checkout@v6
55+
with:
5656
fetch-depth: 1
57-
57+
5858
- uses: ./.github/actions/install-dependencies
5959

6060
- uses: RealChuan/install-jom@main
61-
61+
6262
- name: Create build directory
6363
shell: bash
6464
run: mkdir -p ${{ env.BUILD_DIR }}
@@ -71,7 +71,7 @@ jobs:
7171
..\packaging\windows\Enter-VsDevShell.ps1
7272
& qmake ..\.
7373
& jom
74-
74+
7575
- name: Build linux
7676
if: runner.os == 'Linux'
7777
working-directory: ${{ env.BUILD_DIR }}
@@ -100,4 +100,4 @@ jobs:
100100
shell: bash
101101
run: |
102102
cd output/
103-
tree
103+
tree

0 commit comments

Comments
 (0)