Skip to content

Commit 4e21b99

Browse files
committed
统一工作流文件中的中文描述为英文,提升可读性和一致性
1 parent abe8b74 commit 4e21b99

File tree

6 files changed

+142
-135
lines changed

6 files changed

+142
-135
lines changed

.github/workflows/build-demos.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 构建 Demo 资产
1+
name: Build Demo Assets
22

33
'on':
44
push:
@@ -24,83 +24,81 @@ name: 构建 Demo 资产
2424
workflow_dispatch:
2525
inputs:
2626
package_version:
27-
description: "可选版本号:用于生成 demo 资产文件名"
27+
description: Optional package version used in demo asset filenames
2828
required: false
2929
default: ""
3030
workflow_call:
31-
# inputs: 供上层协调工作流传入 demo 资产版本号,用于统一产物命名。
3231
inputs:
3332
package_version:
34-
description: "可选版本号:用于生成 demo 资产文件名"
33+
description: Optional package version used in demo asset filenames
3534
required: false
3635
type: string
37-
# outputs: 当前工作流仅产出 artifact,不向调用方返回结构化 outputs。
3836

3937
env:
4038
DEMO_PACKAGE_VERSION: ${{ inputs.package_version || github.ref_name || 'dev' }}
4139

4240
jobs:
4341
build-linux-demos:
44-
name: 生成 Demo 资产(linux-x64
42+
name: Build demo asset (linux-x64)
4543
runs-on: ubuntu-24.04
4644
permissions:
4745
contents: read
4846

4947
steps:
50-
- name: 检出代码
48+
- name: Checkout
5149
uses: actions/checkout@v4
5250
with:
5351
submodules: recursive
5452

55-
- name: 安装 .NET SDK
53+
- name: Setup .NET SDK
5654
uses: actions/setup-dotnet@v4
5755
with:
5856
dotnet-version: 10.0.x
5957

60-
- name: 安装 Linux 构建依赖
58+
- name: Install Linux build dependencies
6159
run: |
6260
sudo apt-get update -qq
6361
sudo apt-get install -y cmake ninja-build
6462
65-
- name: 构建并发布 Linux demos
63+
- name: Build and publish Linux demos
6664
run: bash ./build-linux-demos.sh --clean --rid linux-x64
6765

68-
- name: 归档 Linux demos
66+
- name: Archive Linux demos
6967
shell: bash
7068
run: |
7169
mkdir -p release_assets
7270
tar -C dist -czf "release_assets/LVGLSharp-demos-linux-x64-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz" linux-x64
7371
ls -lh release_assets
7472
75-
- name: 上传 Linux demo 制品
73+
- name: Upload Linux demo artifact
7674
uses: actions/upload-artifact@v4
7775
with:
7876
name: demo-release-linux-x64
7977
path: release_assets/LVGLSharp-demos-linux-x64-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz
8078
if-no-files-found: error
8179

8280
build-windows-demos:
83-
name: 生成 Demo 资产(win-x64
81+
name: Build demo asset (win-x64)
8482
runs-on: windows-latest
8583
permissions:
8684
contents: read
8785

8886
steps:
89-
- name: 检出代码
87+
- name: Checkout
9088
uses: actions/checkout@v4
9189
with:
9290
submodules: recursive
9391

94-
- name: 安装 .NET SDK
92+
- name: Setup .NET SDK
9593
uses: actions/setup-dotnet@v4
9694
with:
9795
dotnet-version: 10.0.x
9896

99-
- name: 构建并发布 Windows demos
97+
- name: Build and publish Windows demos
10098
shell: pwsh
10199
run: ./build-windows-demos.ps1 -Clean -Rid win-x64
102100

103-
- name: 归档 Windows demos
101+
- name: Archive Windows demos
104102
shell: pwsh
105103
run: |
106104
New-Item -ItemType Directory -Path release_assets -Force | Out-Null
@@ -112,9 +110,9 @@ jobs:
112110
Compress-Archive -Path "dist/win-x64" -DestinationPath $archivePath -CompressionLevel Optimal
113111
Get-ChildItem release_assets | Format-Table Name, Length -AutoSize
114112
115-
- name: 上传 Windows demo 制品
113+
- name: Upload Windows demo artifact
116114
uses: actions/upload-artifact@v4
117115
with:
118116
name: demo-release-win-x64
119117
path: release_assets/LVGLSharp-demos-win-x64-${{ env.DEMO_PACKAGE_VERSION }}.zip
120-
if-no-files-found: error
118+
if-no-files-found: error

.github/workflows/build-native.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: 鏋勫缓鍘熺敓搴撹祫浜?
1+
name: Build Native Assets
2+
23
'on':
34
push:
45
branches: [main, develop, master]
@@ -21,21 +22,21 @@ name: 鏋勫缓鍘熺敓搴撹祫浜?
2122
workflow_dispatch:
2223
inputs:
2324
note:
24-
description: "鍙€夊娉細鐢ㄤ簬璇存槑鏈鎵嬪姩瑙﹀彂鐨勭洰鐨?
25+
description: Optional note for this manual run
2526
required: false
2627
default: ""
2728
workflow_call:
28-
# inputs: 褰撳墠宸ヤ綔娴佹棤闇€璋冪敤鏂归澶栦紶鍙傦紝鎸夌煩闃电洿鎺ユ瀯寤哄骞冲彴鍘熺敓搴撱€? # outputs: 褰撳墠宸ヤ綔娴佷粎浜у嚭 artifact锛屼笉鍚戣皟鐢ㄦ柟杩斿洖缁撴瀯鍖?outputs銆?
29+
2930
jobs:
3031
build:
31-
name: 鏋勫缓鍘熺敓搴擄紙${{ matrix.rid }}锛? runs-on: ${{ matrix.os }}
32+
name: Build native (${{ matrix.rid }})
33+
runs-on: ${{ matrix.os }}
3234
permissions:
3335
contents: read
3436
strategy:
3537
fail-fast: false
3638
matrix:
3739
include:
38-
# Windows 鐩爣锛氶€氳繃 MSVC -A 鍙傛暟鏋勫缓澶氭灦鏋勫師鐢熷簱
3940
- rid: win-x64
4041
os: windows-latest
4142
cmake_generator: "Visual Studio 17 2022"
@@ -48,42 +49,39 @@ jobs:
4849
os: windows-latest
4950
cmake_generator: "Visual Studio 17 2022"
5051
cmake_arch: ARM64
51-
52-
# Linux 鐩爣锛氬師鐢?x64锛堜笌 LVGL 瀹樻柟 CI 涓€鑷达紝浣跨敤 ubuntu-24.04锛? - rid: linux-x64
52+
- rid: linux-x64
5353
os: ubuntu-24.04
54+
apt_packages: ""
5455
cmake_extra: ""
55-
56-
# Linux 鐩爣锛欰RM 浜ゅ弶缂栬瘧锛堢‖娴偣锛? - rid: linux-arm
56+
- rid: linux-arm
5757
os: ubuntu-24.04
5858
apt_packages: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
5959
cmake_extra: >-
6060
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/libs/cmake/toolchains/arm-linux-gnueabihf.cmake
61-
62-
# Linux 鐩爣锛欰RM64 浜ゅ弶缂栬瘧
6361
- rid: linux-arm64
6462
os: ubuntu-24.04
6563
apt_packages: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
6664
cmake_extra: >-
6765
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/libs/cmake/toolchains/aarch64-linux-gnu.cmake
6866
6967
steps:
70-
- name: 妫€鍑轰唬鐮? uses: actions/checkout@v4
68+
- name: Checkout
69+
uses: actions/checkout@v4
7170
with:
7271
submodules: recursive
7372

74-
# 1. 鍑嗗 LVGL 鏋勫缓杈撳叆
75-
- name: 澶嶅埗 lv_conf.h 鍒?lvgl 婧愮爜鐩綍
73+
- name: Copy lv_conf.h into the LVGL tree
7674
shell: bash
7775
run: cp libs/lv_conf.h libs/lvgl/lv_conf.h
7876

79-
# 2. 瀹夎 Linux 鏋勫缓渚濊禆
80-
- name: 瀹夎 Linux 鏋勫缓渚濊禆
77+
- name: Install Linux build dependencies
8178
if: runner.os == 'Linux'
8279
run: |
8380
sudo apt-get update -qq
8481
sudo apt-get install -y cmake ninja-build ${{ matrix.apt_packages }}
8582
86-
# 3. 閰嶇疆骞剁紪璇?Windows 鍘熺敓搴? - name: CMake 閰嶇疆锛圵indows锛? if: runner.os == 'Windows'
83+
- name: Configure with CMake on Windows
84+
if: runner.os == 'Windows'
8785
shell: bash
8886
run: |
8987
cmake -S libs/lvgl -B libs/lvgl/build_shared \
@@ -95,11 +93,14 @@ jobs:
9593
-DBUILD_SHARED_LIBS=ON \
9694
-DCONFIG_LV_USE_PRIVATE_API=ON
9795
98-
- name: 缂栬瘧锛圵indows锛? if: runner.os == 'Windows'
96+
- name: Build on Windows
97+
if: runner.os == 'Windows'
9998
shell: bash
10099
run: cmake --build libs/lvgl/build_shared --config Release
101100

102-
# 4. 閰嶇疆骞剁紪璇?Linux 鍘熺敓搴? - name: CMake 閰嶇疆锛圠inux锛? if: runner.os == 'Linux'
101+
- name: Configure with CMake on Linux
102+
if: runner.os == 'Linux'
103+
shell: bash
103104
run: |
104105
cmake -S libs/lvgl -B libs/lvgl/build_shared \
105106
-G Ninja \
@@ -111,11 +112,13 @@ jobs:
111112
-DBUILD_SHARED_LIBS=ON \
112113
-DCONFIG_LV_USE_PRIVATE_API=ON
113114
114-
- name: 缂栬瘧锛圠inux锛? if: runner.os == 'Linux'
115+
- name: Build on Linux
116+
if: runner.os == 'Linux'
117+
shell: bash
115118
run: cmake --build libs/lvgl/build_shared
116119

117-
# 5. 鏀堕泦骞舵牎楠屽師鐢熷簱浜х墿
118-
- name: 鏀堕泦鍘熺敓搴撴枃浠? shell: bash
120+
- name: Collect native binaries
121+
shell: bash
119122
run: |
120123
mkdir -p native_output
121124
find libs/lvgl/build_shared -name "lvgl.dll" | head -1 | xargs -I{} cp {} native_output/ 2>/dev/null || true
@@ -125,12 +128,13 @@ jobs:
125128
fi
126129
ls -la native_output/
127130
128-
- name: 鏍¢獙瀵煎嚭绗﹀彿锛圠inux锛? if: runner.os == 'Linux'
131+
- name: Validate exported symbols on Linux
132+
if: runner.os == 'Linux'
129133
shell: bash
130134
run: |
131135
lib="native_output/liblvgl.so"
132136
if [ ! -f "$lib" ]; then
133-
echo "閿欒锛氭湭鎵惧埌 $lib"
137+
echo "Error: missing $lib"
134138
exit 1
135139
fi
136140
@@ -150,20 +154,21 @@ jobs:
150154
done
151155
152156
if [ ${#missing[@]} -ne 0 ]; then
153-
echo "閿欒锛?lib 缂哄皯浠ヤ笅瀵煎嚭绗﹀彿锛?{missing[*]}"
157+
echo "Error: missing exports: ${missing[*]}"
154158
echo "===== nm -D $lib ====="
155159
nm -D "$lib" || true
156160
exit 1
157161
fi
158162
159-
echo "瀵煎嚭绗﹀彿鏍¢獙閫氳繃锛?{expected_symbols[*]}"
163+
echo "Validated exports: ${expected_symbols[*]}"
160164
161-
- name: 鏍¢獙瀵煎嚭绗﹀彿锛圵indows锛? if: runner.os == 'Windows'
165+
- name: Validate exported symbols on Windows
166+
if: runner.os == 'Windows'
162167
shell: pwsh
163168
run: |
164169
$lib = Join-Path $PWD 'native_output\lvgl.dll'
165170
if (-not (Test-Path $lib)) {
166-
throw "鏈壘鍒?$lib"
171+
throw "Missing $lib"
167172
}
168173
169174
$dumpbin = (Get-Command dumpbin.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source -First 1)
@@ -181,7 +186,7 @@ jobs:
181186
}
182187
183188
if (-not $dumpbin) {
184-
throw '鏈壘鍒?dumpbin.exe锛屾棤娉曟牎楠?Windows 瀵煎嚭绗﹀彿銆?
189+
throw 'Missing dumpbin.exe; cannot validate Windows exports.'
185190
}
186191
187192
$exports = & $dumpbin /exports $lib 2>&1
@@ -200,35 +205,36 @@ jobs:
200205
}
201206
202207
if ($missing.Count -gt 0) {
203-
Write-Host "閿欒锛?lib 缂哄皯浠ヤ笅瀵煎嚭绗﹀彿锛?($missing -join ', ')"
208+
Write-Host "Error: missing exports: $($missing -join ', ')"
204209
Write-Host "===== dumpbin /exports $lib ====="
205210
$exports | ForEach-Object { Write-Host $_ }
206-
throw 'Windows 瀵煎嚭绗﹀彿鏍¢獙澶辫触銆?
211+
throw 'Windows export validation failed.'
207212
}
208213
209-
Write-Host "瀵煎嚭绗﹀彿鏍¢獙閫氳繃锛?($expectedSymbols -join ', ')"
214+
Write-Host "Validated exports: $($expectedSymbols -join ', ')"
210215
211-
- name: 鐢熸垚 sha256
216+
- name: Generate sha256 files
212217
shell: pwsh
213218
run: |
214219
$files = Get-ChildItem -Path native_output -File | Where-Object { $_.Extension -in '.dll', '.so' }
215220
if (-not $files) {
216-
throw 'native_output 涓病鏈夊彲鐢熸垚鏍¢獙鍊肩殑鍘熺敓搴撴枃浠躲€?
221+
throw 'No native binaries were found in native_output.'
217222
}
218223
219224
foreach ($file in $files) {
220225
$hash = (Get-FileHash -Path $file.FullName -Algorithm SHA256).Hash.ToLowerInvariant()
221226
$shaFile = "$($file.FullName).sha256"
222227
Set-Content -Path $shaFile -Value "$hash $($file.Name)" -NoNewline
223-
Write-Host "宸茬敓鎴?$shaFile"
228+
Write-Host "Generated $shaFile"
224229
}
225230
226231
Get-ChildItem -Path native_output -Filter '*.sha256' | ForEach-Object {
227232
Write-Host "===== $($_.Name) ====="
228233
Get-Content $_.FullName | ForEach-Object { Write-Host $_ }
229234
}
230235
231-
- name: 涓婁紶鍘熺敓搴撳埗鍝? uses: actions/upload-artifact@v4
236+
- name: Upload native artifact
237+
uses: actions/upload-artifact@v4
232238
with:
233239
name: native-${{ matrix.rid }}
234240
path: native_output/

0 commit comments

Comments
 (0)