From c768c66ab80dad51bbd98bce801199ba2a6d7907 Mon Sep 17 00:00:00 2001 From: illuzen Date: Thu, 10 Sep 2026 12:29:27 +0800 Subject: [PATCH] Drop the Intel Mac release binary and stop brewing LLVM macos-15-intel has no Homebrew LLVM bottle, so the x86_64-apple-darwin job compiled LLVM from source and wedged the release. Ship aarch64-apple-darwin only, and point bindgen at Xcode libclang on remaining macOS jobs. Co-authored-by: Cursor --- .github/actions/macos/action.yml | 18 ++++++++++++------ .../create-release-tag-and-publish.yml | 3 --- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/actions/macos/action.yml b/.github/actions/macos/action.yml index f1a37fa..511bdb0 100644 --- a/.github/actions/macos/action.yml +++ b/.github/actions/macos/action.yml @@ -10,11 +10,14 @@ runs: brew update OK=0 for i in 1 2 3; do - if brew install protobuf llvm; then OK=1; break; fi + # protobuf only. Homebrew LLVM has no bottle on macos-15-intel and + # compiles from source for an hour-plus; bindgen can use Xcode's + # libclang (see LIBCLANG_PATH below). + if brew install protobuf; then OK=1; break; fi echo "brew install attempt $i failed (often transient ghcr.io), retrying in 15s..." sleep 15 done - if [ "$OK" -ne 1 ]; then echo "::error::brew install protobuf llvm failed after 3 attempts"; exit 1; fi + if [ "$OK" -ne 1 ]; then echo "::error::brew install protobuf failed after 3 attempts"; exit 1; fi curl https://sh.rustup.rs -sSf | sh -s -- -y brew uninstall cmake set +e @@ -33,11 +36,14 @@ runs: shell: bash - name: Set LIBCLANG_PATH for clang-sys (bindgen/rocksdb etc.) run: | - # Homebrew LLVM provides libclang.dylib; clang-sys looks for libclang.dylib. - # ARM (Apple Silicon): /opt/homebrew/opt/llvm/lib - # x86 (Intel): /usr/local/opt/llvm/lib + # Prefer Xcode libclang so we never brew-build LLVM. Homebrew paths + # remain as fallbacks if someone already installed the formula. DIR= - if command -v brew >/dev/null 2>&1; then + XC="$(xcode-select -p 2>/dev/null)/Toolchains/XcodeDefault.xctoolchain/usr/lib" + if [ -d "$XC" ] && ls "$XC"/libclang*.dylib 1>/dev/null 2>&1; then + DIR="$XC" + fi + if [ -z "$DIR" ] && command -v brew >/dev/null 2>&1; then PREFIX="$(brew --prefix llvm 2>/dev/null)" [ -n "$PREFIX" ] && [ -d "$PREFIX/lib" ] && ls "$PREFIX/lib"/libclang*.dylib 1>/dev/null 2>&1 && DIR="$PREFIX/lib" fi diff --git a/.github/workflows/create-release-tag-and-publish.yml b/.github/workflows/create-release-tag-and-publish.yml index fcc4663..4a469b1 100644 --- a/.github/workflows/create-release-tag-and-publish.yml +++ b/.github/workflows/create-release-tag-and-publish.yml @@ -163,9 +163,6 @@ jobs: - target: x86_64-unknown-linux-gnu os: ubuntu-latest archive: tar.gz - - target: x86_64-apple-darwin - os: macos-15-intel - archive: tar.gz - target: aarch64-apple-darwin os: macos-latest archive: tar.gz