neovim/.github/scripts/build_universal_macos.sh
Christian Clason 01c15a30c0
ci(release): run universal_macos build on M1 (#27505)
Run the release workflow on macos-14 to use faster M1 runners.

Lock the deployment target to the oldest supported version (11.0,
due to libuv support) instead of relying on the host OS version.
2024-02-17 13:35:47 +01:00

23 lines
773 B
Bash
Executable File

#!/bin/bash -e
MACOSX_DEPLOYMENT_TARGET=11.0
export MACOSX_DEPLOYMENT_TARGET
cmake -S cmake.deps -B .deps -G Ninja \
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
-D CMAKE_FIND_FRAMEWORK=NEVER
cmake --build .deps
cmake -B build -G Ninja \
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
-D ENABLE_LIBINTL=OFF \
-D CMAKE_FIND_FRAMEWORK=NEVER
cmake --build build
# Make sure we build everything for M1 as well
for macho in build/bin/* build/lib/nvim/parser/*.so; do
lipo -info "$macho" | grep -q arm64 || exit 1
done
cpack --config build/CPackConfig.cmake