From 0ccd93d569599fb1a0cbc24f8afc7e3c1c03a0a4 Mon Sep 17 00:00:00 2001 From: liangxu Date: Wed, 6 May 2026 22:28:28 +0800 Subject: [PATCH] fix: fix build bug mac --- .gitea/workflows/desktop-client-build.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/desktop-client-build.yml b/.gitea/workflows/desktop-client-build.yml index ca892d5..9fc4e83 100644 --- a/.gitea/workflows/desktop-client-build.yml +++ b/.gitea/workflows/desktop-client-build.yml @@ -18,9 +18,9 @@ on: required: true default: "mac,win" mac_arches: - description: "macOS architectures: universal, arm64, x64, or comma-separated" + description: "macOS architectures: arm64, x64, or comma-separated. universal requires a macOS runner." required: true - default: "universal" + default: "arm64" win_arches: description: "Windows architectures: x64, arm64, ia32, or comma-separated" required: true @@ -79,7 +79,7 @@ concurrency: env: DEFAULT_DESKTOP_PLATFORMS: "mac,win" - DEFAULT_MAC_ARCHES: "universal" + DEFAULT_MAC_ARCHES: "arm64" DEFAULT_WIN_ARCHES: "x64" DEFAULT_VERSION_PREFIX: "0.1" DEFAULT_NAS_OUTPUT_DIR: "/vol1/1000/share/gl-test" @@ -190,7 +190,15 @@ jobs: exit 1 fi - mac_arch_flags="$(arch_flags "${REQUESTED_MAC_ARCHES:-${DEFAULT_MAC_ARCHES}}" "x64 arm64 universal")" + mac_arches="$(normalize_csv "${REQUESTED_MAC_ARCHES:-${DEFAULT_MAC_ARCHES}}")" + case ",${mac_arches}," in + *,universal,*) + echo "::error::mac universal cannot be built on the current ubuntu-latest runner. Use mac_arches=arm64 or x64, or run this job on a macOS runner." + exit 1 + ;; + esac + + mac_arch_flags="$(arch_flags "${mac_arches}" "x64 arm64")" win_arch_flags="$(arch_flags "${REQUESTED_WIN_ARCHES:-${DEFAULT_WIN_ARCHES}}" "x64 arm64 ia32")" version_prefix="${REQUESTED_VERSION_PREFIX:-${DEFAULT_VERSION_PREFIX}}"