ci(workflows): 添加本地act验证作业以检查Git路径和子模块
Some checks failed
Build Android APK / 编译 libcore.aar (push) Failing after 7s
Build Windows / ACT Windows Checkout Verification (push) Failing after 7h0m6s
Build Android APK / 编译 Android APK (release) (push) Has been skipped
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Failing after 7s
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Successful in 19m38s
Build Windows / build (push) Failing after 7h0m11s
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled

This commit is contained in:
shanshanzhong 2025-11-06 05:03:54 -08:00
parent a6527d822b
commit 4cc3f98b0f

View File

@ -190,4 +190,62 @@ jobs:
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: windows-release-build name: windows-release-build
path: build/windows/runner/Release/ path: build/windows/runner/Release/
# 本地act验证作业只验证 Git PATH 与 checkout/submodules
build-act-windows:
name: ACT Windows Checkout Verification
if: ${{ env.ACT == 'true' }}
runs-on: windows-latest
steps:
- name: Add Git to PATH (Windows)
shell: powershell
run: |
$paths = @(
'C:\Program Files\Git\cmd',
'C:\Program Files\Git\bin',
'C:\Program Files (x86)\Git\cmd',
'C:\Program Files (x86)\Git\bin'
)
foreach ($p in $paths) {
if (Test-Path $p) {
Add-Content -Path $env:GITHUB_PATH -Value $p
$env:PATH = "$p;$env:PATH"
Write-Host ("Added to PATH: {0}" -f $p)
}
}
$candidates = @(
'C:\Program Files\Git\cmd\git.exe',
'C:\Program Files\Git\bin\git.exe',
'C:\Program Files (x86)\Git\cmd\git.exe',
'C:\Program Files (x86)\Git\bin\git.exe'
)
$found = $false
foreach ($g in $candidates) {
if (Test-Path $g) {
& $g --version
$found = $true
break
}
}
if (-not $found) {
Write-Host "Git executable not found in common locations; continuing."
}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Verify submodules
shell: powershell
run: |
git --version
git submodule status
Write-Host "Submodules verified (status printed above)."
- name: Summary
shell: powershell
run: |
Write-Host "ACT Windows verification completed successfully."