Repository navigation
150 lines (124 loc) · 4.01 KB
/
Copy pathquality.yml
File metadata and controls
150 lines (124 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Quality
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: quality-${{ github.ref }}
cancel-in-progress: true
jobs:
repository-checks:
name: 仓库与工具检查
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: 检出代码
uses: actions/checkout@v7
- name: 准备 Python
uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
cache-dependency-path: sim/requirements.txt
- name: 准备 Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: 安装系统检查工具
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ffmpeg \
protobuf-compiler
- name: 安装模拟器协议运行时
run: python -m pip install 'protobuf>=6.33.2,<7'
- name: 运行发布预检工具单元测试
run: python -m unittest discover -s tools/release/tests -p 'test_*.py' -v
- name: 检查源码发行技术契约
run: |
python tools/release/check_packaging_readiness.py
python tools/release/check_runtime_resources.py
python tools/release/check_version_contract.py
- name: 检查公开示例配置
run: python tools/release/check_example_config.py
- name: 检查公开媒体元数据
run: python tools/release/check_media_metadata.py
- name: 检查模拟器 Protobuf 兼容性
run: python tools/release/check_sim_protobuf_runtime.py
- name: 运行模拟器独立测试
run: |
python -m unittest discover -s sim/tests -t sim -p 'test_*.py' -v
node --test sim/tests/test_map_geometry.js
- name: 检查文档引用
run: python tools/release/check_docs.py
- name: 检查公开发布快照
run: python tools/release/check_public_readiness.py
native-build:
name: Ubuntu 原生构建
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software
LIBGL_ALWAYS_SOFTWARE: "1"
RM_DISABLE_AUDIO: "1"
RM_DEVTOOLS: "0"
steps:
- name: 检出代码
uses: actions/checkout@v7
- name: 安装构建依赖
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ccache \
cmake \
fontconfig \
fonts-noto-cjk \
libabsl-dev \
libasound2t64 \
libgl1-mesa-dev \
libpulse0 \
libxcb-cursor0 \
libxkbcommon-x11-0 \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libpaho-mqtt-dev \
libprotobuf-dev \
libswscale-dev \
ninja-build \
pkg-config \
protobuf-compiler
- name: 安装 Qt 6.8.3
uses: jurplel/install-qt-action@b344308e4483fc892e0d27b3cd1b173ebdd95f06 # v4.5.0
with:
version: "6.8.3"
modules: "qtmultimedia qtserialport"
cache: true
- name: 恢复编译缓存
uses: actions/cache@v6
with:
path: ~/.cache/ccache
key: spr-client-27-ccache-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
restore-keys: |
spr-client-27-ccache-${{ runner.os }}-${{ runner.arch }}-
- name: 准备编译缓存
run: |
ccache --max-size=1G
ccache --zero-stats
- name: 配置
run: cmake --preset ci
- name: 检查 QML lint 基线
run: python3 tools/release/check_qml_lint.py
- name: 编译客户端与测试目标
run: cmake --build --preset ci
- name: 运行 C++ / Qt 测试
run: ctest --preset ci --no-tests=error --timeout 120
- name: 输出编译缓存统计
if: always()
run: ccache --show-stats