From 462ca5790780e57c9ab279b772441065034a774f Mon Sep 17 00:00:00 2001 From: Syngnat Date: Tue, 3 Mar 2026 15:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(ci):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?Windows=20AMD64=20=E4=B8=8B=20DuckDB=20=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=B7=A5=E5=85=B7=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 DuckDB 编译链从 MINGW64 切换为 MSYS2 UCRT64 - 修正 Windows AMD64 的 gcc 和 g++ 探测路径 - 增加 DuckDB 编译器版本校验步骤 --- .github/workflows/release.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee661a0..a4e6a37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,10 +137,10 @@ jobs: continue-on-error: true uses: msys2/setup-msys2@v2 with: - msystem: MINGW64 + msystem: UCRT64 update: true install: >- - mingw-w64-x86_64-gcc + mingw-w64-ucrt-x86_64-gcc - name: Configure DuckDB CGO Toolchain (Windows AMD64) if: ${{ matrix.build_optional_agents && matrix.platform == 'windows/amd64' }} @@ -164,28 +164,26 @@ jobs: $msys2Location = "${{ steps.msys2_duckdb.outputs['msys2-location'] }}" $candidateBins = @() if (-not [string]::IsNullOrWhiteSpace($msys2Location)) { - $candidateBins += Join-Path $msys2Location 'mingw64\bin' + $candidateBins += Join-Path $msys2Location 'ucrt64\bin' } $candidateBins += @( - 'C:\msys64\mingw64\bin', - 'C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin' + 'C:\msys64\ucrt64\bin', + 'D:\a\_temp\msys64\ucrt64\bin' ) $candidateBins = @($candidateBins | Select-Object -Unique) $mingwBin = Find-MingwBin $candidateBins if (-not $mingwBin) { if ($msys2Outcome -ne 'success') { - Write-Warning "⚠️ MSYS2 安装步骤结果为 $msys2Outcome,回退到本机探测/Chocolatey 安装 MinGW" + Write-Warning "⚠️ MSYS2 安装步骤结果为 $msys2Outcome,回退到 UCRT64 本机路径探测" } else { - Write-Warning "⚠️ MSYS2 已执行,但未找到 gcc/g++,回退到本机探测/Chocolatey 安装 MinGW" + Write-Warning "⚠️ MSYS2 已执行,但未找到 UCRT64 gcc/g++,回退到本机路径探测" } - - choco install mingw --yes --no-progress $mingwBin = Find-MingwBin $candidateBins } if (-not $mingwBin) { - Write-Error "❌ 未找到可用的 DuckDB 编译器。已检查:$($candidateBins -join ', ')" + Write-Error "❌ 未找到可用的 DuckDB UCRT64 编译器。已检查:$($candidateBins -join ', ')" exit 1 }