ci: 将jq安装步骤移至copy_libcore.bat脚本中
Some checks failed
Build Windows / ACT Windows Checkout Verification (push) Successful in 7h0m16s
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Successful in 19m14s
Build Windows / build (push) Failing after 7h0m26s

将jq的安装从docker.yml工作流文件移至copy_libcore.bat脚本中,以简化CI配置并集中管理依赖安装
This commit is contained in:
shanshanzhong 2025-11-07 03:44:11 -08:00
parent 8b8d29dd00
commit 9873f670fa
2 changed files with 21 additions and 13 deletions

View File

@ -131,18 +131,6 @@ jobs:
shell: cmd
run: call copy_libcore.bat
- name: Install jq
shell: powershell
run: |
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
choco install jq -y
$env:Path = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')
jq --version
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:

View File

@ -22,10 +22,30 @@ for /r %%f in (libcore.dll) do (
if exist "%%f" (
echo ✅ 找到 libcore.dll: %%f
copy "%%f" libcore\bin\libcore.dll
goto :verify
goto :install_jq
)
)
echo ⚠️ 未找到 libcore.dll
:install_jq
echo 📦 安装 jq...
powershell -Command "
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
choco install jq -y
$env:Path = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')
jq --version
"
if %ERRORLEVEL% neq 0 (
echo ❌ jq 安装失败
exit /b 1
)
echo ✅ jq 安装成功
goto :verify
:verify
echo.