Skip to content

Commit

Permalink
Trying universal build
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaa committed Jan 30, 2025
1 parent 94904b9 commit 51691d2
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/build_macos-universal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,34 @@ jobs:
with:
submodules: true

- name: Install x86_64 Homebrew (if missing)
run: |
if [[ ! -d "/usr/local/Homebrew" ]]; then
echo "Installing Homebrew for x86_64..."
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "x86_64 Homebrew already installed."
fi
# - name: Install x86_64 Homebrew (if missing)
# run: |
# if [[ ! -d "/usr/local/Homebrew" ]]; then
# echo "Installing Homebrew for x86_64..."
# arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# else
# echo "x86_64 Homebrew already installed."
# fi

- name: Install Dependencies
run: |
# Install essential tools (native)
brew update
brew install cmake ninja llvm
# Install Boost separately for each architecture
echo "Installing Boost for arm64..."
brew install boost
- name: Install Universal Boost
run: |
# Remove existing Boost installations
brew uninstall --ignore-dependencies boost || true
# Compile Boost for both x86_64 and arm64
brew install boost --build-from-source --formula \
CXXFLAGS="-arch x86_64 -arch arm64" \
CFLAGS="-arch x86_64 -arch arm64" \
LDFLAGS="-arch x86_64 -arch arm64"
echo "Installing Boost for x86_64..."
arch -x86_64 /usr/local/bin/brew install boost
# Verify Boost architecture
file $(brew --prefix boost)/lib/libboost_system.dylib
- name: Configure Build
run: |
Expand Down

0 comments on commit 51691d2

Please sign in to comment.