chore: 移除 Windows arm64 构建与发布支持
Windows ARM64 使用场景极少,windows-11-arm runner 上 MSYS2 CLANGARM64 交叉编译不稳定,CGO 编译问题难以排查,维护成本 远超收益。移除 arm64 的 CI 矩阵条目、Makefile Windows 变量、 versionctl 资产白名单、README 文档和规范中的相关需求。 Linux 和 macOS arm64 不受影响。
This commit is contained in:
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@@ -161,15 +161,6 @@ jobs:
|
|||||||
packages: >-
|
packages: >-
|
||||||
make
|
make
|
||||||
mingw-w64-x86_64-gcc
|
mingw-w64-x86_64-gcc
|
||||||
- arch: arm64
|
|
||||||
runner: windows-11-arm
|
|
||||||
msystem: CLANGARM64
|
|
||||||
cc: clang
|
|
||||||
cxx: clang++
|
|
||||||
packages: >-
|
|
||||||
make
|
|
||||||
mingw-w64-clang-aarch64-clang
|
|
||||||
mingw-w64-clang-aarch64-llvm
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
@@ -214,17 +205,8 @@ jobs:
|
|||||||
"$CC" --version
|
"$CC" --version
|
||||||
command -v "$CXX"
|
command -v "$CXX"
|
||||||
"$CXX" --version
|
"$CXX" --version
|
||||||
if [ "${{ matrix.arch }}" = "arm64" ]; then
|
command -v windres
|
||||||
if command -v llvm-windres >/dev/null 2>&1; then
|
windres --version
|
||||||
llvm-windres --version
|
|
||||||
else
|
|
||||||
command -v windres
|
|
||||||
windres --version
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
command -v windres
|
|
||||||
windres --version
|
|
||||||
fi
|
|
||||||
if command -v powershell.exe >/dev/null 2>&1; then
|
if command -v powershell.exe >/dev/null 2>&1; then
|
||||||
powershell.exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'
|
powershell.exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'
|
||||||
else
|
else
|
||||||
|
|||||||
10
Makefile
10
Makefile
@@ -35,17 +35,15 @@ ifeq ($(TARGET_ARCH),arm64)
|
|||||||
APPIMAGE_ARCH := aarch64
|
APPIMAGE_ARCH := aarch64
|
||||||
DEB_ARCH := arm64
|
DEB_ARCH := arm64
|
||||||
RPM_ARCH := aarch64
|
RPM_ARCH := aarch64
|
||||||
WINDOWS_WINDRES_FORMAT_BFD := pe-aarch64
|
|
||||||
WINDOWS_WINDRES_FORMAT_LLVM := aarch64-w64-mingw32
|
|
||||||
WINDOWS_RESOURCE := rsrc_windows_arm64.syso
|
|
||||||
else
|
else
|
||||||
APPIMAGE_ARCH := x86_64
|
APPIMAGE_ARCH := x86_64
|
||||||
DEB_ARCH := amd64
|
DEB_ARCH := amd64
|
||||||
RPM_ARCH := x86_64
|
RPM_ARCH := x86_64
|
||||||
|
endif
|
||||||
|
|
||||||
WINDOWS_WINDRES_FORMAT_BFD := pe-x86-64
|
WINDOWS_WINDRES_FORMAT_BFD := pe-x86-64
|
||||||
WINDOWS_WINDRES_FORMAT_LLVM := x86_64-w64-mingw32
|
WINDOWS_WINDRES_FORMAT_LLVM := x86_64-w64-mingw32
|
||||||
WINDOWS_RESOURCE := rsrc_windows_amd64.syso
|
WINDOWS_RESOURCE := rsrc_windows_amd64.syso
|
||||||
endif
|
|
||||||
|
|
||||||
APPIMAGETOOL_PATH := build/tools/appimagetool-$(APPIMAGE_ARCH).AppImage
|
APPIMAGETOOL_PATH := build/tools/appimagetool-$(APPIMAGE_ARCH).AppImage
|
||||||
APPIMAGETOOL_URL ?= https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(APPIMAGE_ARCH).AppImage
|
APPIMAGETOOL_URL ?= https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(APPIMAGE_ARCH).AppImage
|
||||||
@@ -163,7 +161,7 @@ _desktop-test:
|
|||||||
cd backend && go test ./cmd/desktop/... -v
|
cd backend && go test ./cmd/desktop/... -v
|
||||||
|
|
||||||
_desktop-clean:
|
_desktop-clean:
|
||||||
rm -rf build/ embedfs/assets embedfs/frontend-dist backend/cmd/desktop/rsrc_windows_amd64.syso backend/cmd/desktop/rsrc_windows_arm64.syso
|
rm -rf build/ embedfs/assets embedfs/frontend-dist backend/cmd/desktop/rsrc_windows_amd64.syso
|
||||||
|
|
||||||
_desktop-prepare-frontend: _frontend-install
|
_desktop-prepare-frontend: _frontend-install
|
||||||
@printf 'Preparing frontend for desktop...\n'
|
@printf 'Preparing frontend for desktop...\n'
|
||||||
@@ -283,7 +281,7 @@ _check-linux-target-arch:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_check-windows-target-arch:
|
_check-windows-target-arch:
|
||||||
@if [ "$(TARGET_ARCH)" != "amd64" ] && [ "$(TARGET_ARCH)" != "arm64" ]; then \
|
@if [ "$(TARGET_ARCH)" != "amd64" ]; then \
|
||||||
printf 'Unsupported Windows TARGET_ARCH: %s\n' "$(TARGET_ARCH)"; \
|
printf 'Unsupported Windows TARGET_ARCH: %s\n' "$(TARGET_ARCH)"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -109,9 +109,6 @@ make desktop-build-mac
|
|||||||
# Windows
|
# Windows
|
||||||
make desktop-build-win
|
make desktop-build-win
|
||||||
|
|
||||||
# Windows arm64
|
|
||||||
make desktop-build-win TARGET_ARCH=arm64
|
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
make desktop-build-linux
|
make desktop-build-linux
|
||||||
|
|
||||||
@@ -120,7 +117,7 @@ make desktop-build-linux TARGET_ARCH=arm64
|
|||||||
```
|
```
|
||||||
|
|
||||||
**使用桌面应用**:
|
**使用桌面应用**:
|
||||||
- 双击启动应用(macOS: Nex.app,Windows: nex-win-amd64.exe / nex-win-arm64.exe,Linux: nex-linux-amd64 / nex-linux-arm64)
|
- 双击启动应用(macOS: Nex.app,Windows: nex-win-amd64.exe,Linux: nex-linux-amd64 / nex-linux-arm64)
|
||||||
- 系统托盘图标出现,浏览器自动打开管理界面
|
- 系统托盘图标出现,浏览器自动打开管理界面
|
||||||
- 点击托盘图标显示菜单,可打开管理界面或退出
|
- 点击托盘图标显示菜单,可打开管理界面或退出
|
||||||
- 关闭浏览器后服务继续运行,可通过托盘重新打开
|
- 关闭浏览器后服务继续运行,可通过托盘重新打开
|
||||||
@@ -175,7 +172,6 @@ make server-build
|
|||||||
| macOS arm64 | `nex-server_<version>_macos_arm64.tar.gz` |
|
| macOS arm64 | `nex-server_<version>_macos_arm64.tar.gz` |
|
||||||
| macOS universal | `nex-server_<version>_macos_universal.tar.gz` |
|
| macOS universal | `nex-server_<version>_macos_universal.tar.gz` |
|
||||||
| Windows amd64 | `nex-server_<version>_windows_amd64.zip` |
|
| Windows amd64 | `nex-server_<version>_windows_amd64.zip` |
|
||||||
| Windows arm64 | `nex-server_<version>_windows_arm64.zip` |
|
|
||||||
|
|
||||||
**web 产物**:
|
**web 产物**:
|
||||||
|
|
||||||
@@ -191,7 +187,6 @@ make server-build
|
|||||||
| Linux arm64 | `nex-desktop_<version>_linux_arm64.tar.gz`、`.AppImage`、`.deb`、`.rpm` |
|
| Linux arm64 | `nex-desktop_<version>_linux_arm64.tar.gz`、`.AppImage`、`.deb`、`.rpm` |
|
||||||
| macOS universal | `nex-desktop_<version>_macos_universal.zip`、`nex-desktop_<version>_macos_universal.dmg` |
|
| macOS universal | `nex-desktop_<version>_macos_universal.zip`、`nex-desktop_<version>_macos_universal.dmg` |
|
||||||
| Windows amd64 | `nex-desktop_<version>_windows_amd64.zip` |
|
| Windows amd64 | `nex-desktop_<version>_windows_amd64.zip` |
|
||||||
| Windows arm64 | `nex-desktop_<version>_windows_arm64.zip` |
|
|
||||||
|
|
||||||
Linux deb 包声明 `libgtk-3-0`、`libayatana-appindicator3-1`、`xdg-utils` 运行依赖;rpm 包声明 `gtk3`、`libayatana-appindicator-gtk3`、`xdg-utils` 运行依赖。Rocky Linux 9 等发行版可能需要启用 EPEL 才能解析 Ayatana AppIndicator 依赖。
|
Linux deb 包声明 `libgtk-3-0`、`libayatana-appindicator3-1`、`xdg-utils` 运行依赖;rpm 包声明 `gtk3`、`libayatana-appindicator-gtk3`、`xdg-utils` 运行依赖。Rocky Linux 9 等发行版可能需要启用 EPEL 才能解析 Ayatana AppIndicator 依赖。
|
||||||
|
|
||||||
|
|||||||
@@ -152,9 +152,9 @@ TBD - 提供跨平台桌面应用支持,将后端服务与前端静态资源
|
|||||||
#### Scenario: Windows 构建
|
#### Scenario: Windows 构建
|
||||||
|
|
||||||
- **WHEN** 执行 Windows desktop 构建命令且当前版本为 `1.2.3`
|
- **WHEN** 执行 Windows desktop 构建命令且当前版本为 `1.2.3`
|
||||||
- **THEN** 系统 SHALL 生成 Windows amd64 和 arm64 desktop 可执行文件
|
- **THEN** 系统 SHALL 生成 Windows amd64 desktop 可执行文件
|
||||||
- **AND** Windows desktop 构建 SHALL 使用 `-H=windowsgui` linker flag 隐藏控制台窗口
|
- **AND** Windows desktop 构建 SHALL 使用 `-H=windowsgui` linker flag 隐藏控制台窗口
|
||||||
- **AND** 最终 Windows desktop 发布资产文件名 SHALL 包含 `1.2.3`、`windows` 和对应架构标识
|
- **AND** 最终 Windows desktop 发布资产文件名 SHALL 包含 `1.2.3`、`windows` 和 `amd64`
|
||||||
|
|
||||||
#### Scenario: Linux 构建
|
#### Scenario: Linux 构建
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
- **AND** 系统 SHALL 生成 `nex-server_<version>_macos_arm64.tar.gz`
|
- **AND** 系统 SHALL 生成 `nex-server_<version>_macos_arm64.tar.gz`
|
||||||
- **AND** 系统 SHALL 生成 `nex-server_<version>_macos_universal.tar.gz`
|
- **AND** 系统 SHALL 生成 `nex-server_<version>_macos_universal.tar.gz`
|
||||||
- **AND** 系统 SHALL 生成 `nex-server_<version>_windows_amd64.zip`
|
- **AND** 系统 SHALL 生成 `nex-server_<version>_windows_amd64.zip`
|
||||||
- **AND** 系统 SHALL 生成 `nex-server_<version>_windows_arm64.zip`
|
|
||||||
|
|
||||||
#### Scenario: web 发布构建
|
#### Scenario: web 发布构建
|
||||||
|
|
||||||
@@ -66,9 +65,7 @@
|
|||||||
- **WHEN** 发布流水线执行 Windows desktop 发布构建
|
- **WHEN** 发布流水线执行 Windows desktop 发布构建
|
||||||
- **THEN** 系统 SHALL 在包含对应架构 MSYS2/MinGW 或等价 CGO 工具链的环境中构建
|
- **THEN** 系统 SHALL 在包含对应架构 MSYS2/MinGW 或等价 CGO 工具链的环境中构建
|
||||||
- **AND** Windows amd64 desktop 发布构建 SHALL 在 `windows-latest` runner 上的 MSYS2 MINGW64 环境中执行
|
- **AND** Windows amd64 desktop 发布构建 SHALL 在 `windows-latest` runner 上的 MSYS2 MINGW64 环境中执行
|
||||||
- **AND** Windows arm64 desktop 发布构建 SHALL 在 `windows-11-arm` runner 上的 MSYS2 CLANGARM64 环境中执行
|
|
||||||
- **AND** 系统 SHALL 生成 `nex-desktop_<version>_windows_amd64.zip`
|
- **AND** 系统 SHALL 生成 `nex-desktop_<version>_windows_amd64.zip`
|
||||||
- **AND** 系统 SHALL 生成 `nex-desktop_<version>_windows_arm64.zip`
|
|
||||||
- **AND** 系统 SHALL NOT 在构建步骤中显式传递 TARGET_ARCH 参数
|
- **AND** 系统 SHALL NOT 在构建步骤中显式传递 TARGET_ARCH 参数
|
||||||
|
|
||||||
#### Scenario: macOS desktop 发布构建
|
#### Scenario: macOS desktop 发布构建
|
||||||
@@ -120,22 +117,6 @@
|
|||||||
- **THEN** 发布流水线 SHALL 在正式构建前失败
|
- **THEN** 发布流水线 SHALL 在正式构建前失败
|
||||||
- **AND** 系统 SHALL 在日志中标识缺失的工具链名称
|
- **AND** 系统 SHALL 在日志中标识缺失的工具链名称
|
||||||
|
|
||||||
### Requirement: Windows arm64 CGO 编译器指定
|
|
||||||
|
|
||||||
系统 SHALL 在 Windows arm64 发布构建中显式指定 `CC=clang` 和 `CXX=clang++` 环境变量,确保 Go cgo 在 MSYS2 CLANGARM64 环境下使用正确的 C 编译器进行 `windows/arm64` 交叉编译。
|
|
||||||
|
|
||||||
#### Scenario: Windows arm64 构建使用 clang
|
|
||||||
|
|
||||||
- **WHEN** 发布流水线在 `windows-11-arm` runner 上执行 Windows arm64 构建步骤
|
|
||||||
- **THEN** 构建步骤 SHALL 将 `CC=clang` 和 `CXX=clang++` 注入 go build 环境
|
|
||||||
- **AND** Go cgo SHALL 使用 `clang` 编译 `runtime/cgo` 等 CGO 组件
|
|
||||||
|
|
||||||
#### Scenario: Windows amd64 构建保持 gcc
|
|
||||||
|
|
||||||
- **WHEN** 发布流水线在 `windows-latest` runner 上执行 Windows amd64 构建步骤
|
|
||||||
- **THEN** 构建步骤 MAY 显式指定 `CC=gcc` 和 `CXX=g++` 或依赖 Go 默认编译器探测
|
|
||||||
- **AND** 显式指定的 `gcc` SHALL 等价于 MSYS2 MINGW64 默认 C 编译器(`x86_64-w64-mingw32-gcc`)
|
|
||||||
|
|
||||||
### Requirement: 发布流水线 LFS 资产拉取
|
### Requirement: 发布流水线 LFS 资产拉取
|
||||||
|
|
||||||
发布流水线 SHALL 在所有会 checkout 仓库并参与版本校验、web 构建、server 构建或 desktop 构建的 job 中拉取 Git LFS 真实文件,确保发布构建读取到真实二进制资产而非 LFS pointer 文本。
|
发布流水线 SHALL 在所有会 checkout 仓库并参与版本校验、web 构建、server 构建或 desktop 构建的 job 中拉取 Git LFS 真实文件,确保发布构建读取到真实二进制资产而非 LFS pointer 文本。
|
||||||
@@ -195,7 +176,7 @@
|
|||||||
- **WHEN** 当前发布版本为 `1.2.3`
|
- **WHEN** 当前发布版本为 `1.2.3`
|
||||||
- **THEN** Linux server 发布资产文件名 SHALL 为 `nex-server_1.2.3_linux_amd64.tar.gz` 和 `nex-server_1.2.3_linux_arm64.tar.gz`
|
- **THEN** Linux server 发布资产文件名 SHALL 为 `nex-server_1.2.3_linux_amd64.tar.gz` 和 `nex-server_1.2.3_linux_arm64.tar.gz`
|
||||||
- **AND** macOS server 发布资产文件名 SHALL 为 `nex-server_1.2.3_macos_amd64.tar.gz`、`nex-server_1.2.3_macos_arm64.tar.gz` 和 `nex-server_1.2.3_macos_universal.tar.gz`
|
- **AND** macOS server 发布资产文件名 SHALL 为 `nex-server_1.2.3_macos_amd64.tar.gz`、`nex-server_1.2.3_macos_arm64.tar.gz` 和 `nex-server_1.2.3_macos_universal.tar.gz`
|
||||||
- **AND** Windows server 发布资产文件名 SHALL 为 `nex-server_1.2.3_windows_amd64.zip` 和 `nex-server_1.2.3_windows_arm64.zip`
|
- **AND** Windows server 发布资产文件名 SHALL 为 `nex-server_1.2.3_windows_amd64.zip`
|
||||||
|
|
||||||
#### Scenario: web 资产命名
|
#### Scenario: web 资产命名
|
||||||
|
|
||||||
@@ -207,7 +188,7 @@
|
|||||||
|
|
||||||
- **WHEN** 当前发布版本为 `1.2.3`
|
- **WHEN** 当前发布版本为 `1.2.3`
|
||||||
- **THEN** Linux desktop 发布资产文件名 SHALL 使用 `nex-desktop_1.2.3_linux_<arch>.<format>` 格式
|
- **THEN** Linux desktop 发布资产文件名 SHALL 使用 `nex-desktop_1.2.3_linux_<arch>.<format>` 格式
|
||||||
- **AND** Windows desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_windows_amd64.zip` 和 `nex-desktop_1.2.3_windows_arm64.zip`
|
- **AND** Windows desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_windows_amd64.zip`
|
||||||
- **AND** macOS desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_macos_universal.zip` 和 `nex-desktop_1.2.3_macos_universal.dmg`
|
- **AND** macOS desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_macos_universal.zip` 和 `nex-desktop_1.2.3_macos_universal.dmg`
|
||||||
- **AND** 发布资产文件名中的 macOS 平台字段 SHALL 使用 `macos` 而非 `darwin`
|
- **AND** 发布资产文件名中的 macOS 平台字段 SHALL 使用 `macos` 而非 `darwin`
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,6 @@ func serverAssetName(version, platform, arch, format string) (string, error) {
|
|||||||
{platform: "macos", arch: "arm64", format: "tar.gz"},
|
{platform: "macos", arch: "arm64", format: "tar.gz"},
|
||||||
{platform: "macos", arch: "universal", format: "tar.gz"},
|
{platform: "macos", arch: "universal", format: "tar.gz"},
|
||||||
{platform: "windows", arch: "amd64", format: "zip"},
|
{platform: "windows", arch: "amd64", format: "zip"},
|
||||||
{platform: "windows", arch: "arm64", format: "zip"},
|
|
||||||
}) {
|
}) {
|
||||||
return "", fmt.Errorf("不支持的 server 资产目标 %s/%s/%s", platform, arch, format)
|
return "", fmt.Errorf("不支持的 server 资产目标 %s/%s/%s", platform, arch, format)
|
||||||
}
|
}
|
||||||
@@ -321,7 +320,6 @@ func desktopAssetName(version, platform, arch, format string) (string, error) {
|
|||||||
{platform: "macos", arch: "universal", format: "zip"},
|
{platform: "macos", arch: "universal", format: "zip"},
|
||||||
{platform: "macos", arch: "universal", format: "dmg"},
|
{platform: "macos", arch: "universal", format: "dmg"},
|
||||||
{platform: "windows", arch: "amd64", format: "zip"},
|
{platform: "windows", arch: "amd64", format: "zip"},
|
||||||
{platform: "windows", arch: "arm64", format: "zip"},
|
|
||||||
}) {
|
}) {
|
||||||
return "", fmt.Errorf("不支持的 desktop 资产目标 %s/%s/%s", platform, arch, format)
|
return "", fmt.Errorf("不支持的 desktop 资产目标 %s/%s/%s", platform, arch, format)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ func TestAssetNames(t *testing.T) {
|
|||||||
{"server macos arm64", "server", "macos", "arm64", "tar.gz", "nex-server_1.2.3_macos_arm64.tar.gz"},
|
{"server macos arm64", "server", "macos", "arm64", "tar.gz", "nex-server_1.2.3_macos_arm64.tar.gz"},
|
||||||
{"server macos universal", "server", "macos", "universal", "tar.gz", "nex-server_1.2.3_macos_universal.tar.gz"},
|
{"server macos universal", "server", "macos", "universal", "tar.gz", "nex-server_1.2.3_macos_universal.tar.gz"},
|
||||||
{"server windows amd64", "server", "windows", "amd64", "zip", "nex-server_1.2.3_windows_amd64.zip"},
|
{"server windows amd64", "server", "windows", "amd64", "zip", "nex-server_1.2.3_windows_amd64.zip"},
|
||||||
{"server windows arm64", "server", "windows", "arm64", "zip", "nex-server_1.2.3_windows_arm64.zip"},
|
|
||||||
{"web", "web", "", "", "tar.gz", "nex-web_1.2.3.tar.gz"},
|
{"web", "web", "", "", "tar.gz", "nex-web_1.2.3.tar.gz"},
|
||||||
{"desktop linux amd64 tar", "desktop", "linux", "amd64", "tar.gz", "nex-desktop_1.2.3_linux_amd64.tar.gz"},
|
{"desktop linux amd64 tar", "desktop", "linux", "amd64", "tar.gz", "nex-desktop_1.2.3_linux_amd64.tar.gz"},
|
||||||
{"desktop linux amd64 appimage", "desktop", "linux", "amd64", "AppImage", "nex-desktop_1.2.3_linux_amd64.AppImage"},
|
{"desktop linux amd64 appimage", "desktop", "linux", "amd64", "AppImage", "nex-desktop_1.2.3_linux_amd64.AppImage"},
|
||||||
@@ -110,7 +109,6 @@ func TestAssetNames(t *testing.T) {
|
|||||||
{"desktop macos zip", "desktop", "macos", "universal", "zip", "nex-desktop_1.2.3_macos_universal.zip"},
|
{"desktop macos zip", "desktop", "macos", "universal", "zip", "nex-desktop_1.2.3_macos_universal.zip"},
|
||||||
{"desktop macos dmg", "desktop", "macos", "universal", "dmg", "nex-desktop_1.2.3_macos_universal.dmg"},
|
{"desktop macos dmg", "desktop", "macos", "universal", "dmg", "nex-desktop_1.2.3_macos_universal.dmg"},
|
||||||
{"desktop windows amd64", "desktop", "windows", "amd64", "zip", "nex-desktop_1.2.3_windows_amd64.zip"},
|
{"desktop windows amd64", "desktop", "windows", "amd64", "zip", "nex-desktop_1.2.3_windows_amd64.zip"},
|
||||||
{"desktop windows arm64", "desktop", "windows", "arm64", "zip", "nex-desktop_1.2.3_windows_arm64.zip"},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
|||||||
Reference in New Issue
Block a user