fix: 修复发布流水线 Windows arm64 CGO 工具链和 macOS 磁盘空间问题
- Windows arm64: 在 workflow matrix 中设置 CC=clang/CXX=clang++ 并注入构建环境 - macOS: 在 Makefile 关键节点清理中间产物和临时目录释放磁盘空间 - 预检步骤改用 $CC/$CXX 替代硬编码编译器名称,与 matrix 声明保持一致 - 同步新增 release-pipeline spec 需求: Windows arm64 CGO 编译器指定
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -156,12 +156,16 @@ jobs:
|
||||
- arch: amd64
|
||||
runner: windows-latest
|
||||
msystem: MINGW64
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
packages: >-
|
||||
make
|
||||
mingw-w64-x86_64-gcc
|
||||
- arch: arm64
|
||||
runner: windows-11-arm
|
||||
msystem: CLANGARM64
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
packages: >-
|
||||
make
|
||||
mingw-w64-clang-aarch64-clang
|
||||
@@ -195,6 +199,9 @@ jobs:
|
||||
|
||||
- name: Preflight Windows release toolchain
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
command -v go
|
||||
@@ -203,9 +210,11 @@ jobs:
|
||||
bun --version
|
||||
command -v make
|
||||
make --version
|
||||
command -v "$CC"
|
||||
"$CC" --version
|
||||
command -v "$CXX"
|
||||
"$CXX" --version
|
||||
if [ "${{ matrix.arch }}" = "arm64" ]; then
|
||||
command -v clang
|
||||
clang --version
|
||||
if command -v llvm-windres >/dev/null 2>&1; then
|
||||
llvm-windres --version
|
||||
else
|
||||
@@ -213,8 +222,6 @@ jobs:
|
||||
windres --version
|
||||
fi
|
||||
else
|
||||
command -v gcc
|
||||
gcc --version
|
||||
command -v windres
|
||||
windres --version
|
||||
fi
|
||||
@@ -228,6 +235,9 @@ jobs:
|
||||
|
||||
- name: Build Windows release assets
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
run: make release-assets-windows
|
||||
|
||||
- name: Upload Windows release assets
|
||||
|
||||
Reference in New Issue
Block a user