Skip to content

Commit

Permalink
Move azure to macos-latest and add check that MACOSX_DEPLOYMENT_TARGE…
Browse files Browse the repository at this point in the history
…T was set correctly in osx build script
  • Loading branch information
milot-mirdita committed Jan 14, 2025
1 parent b903391 commit 4c1d036
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
- job: build_macos
displayName: macOS
pool:
vmImage: 'macos-12'
vmImage: 'macos-latest'
steps:
- checkout: self
submodules: true
Expand Down
14 changes: 14 additions & 0 deletions util/build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ if [ "$(otool -L "src/${BINARY_NAME}" | tail -n +2 | grep -v -E "${ALLOWED_DL_LI
exit 1
fi

if ! vtool -show "src/${BINARY_NAME}" | tee | grep minos | \
awk -v version="${MACOSX_DEPLOYMENT_TARGET}" '$2 > version { exit 1 }'
then
echo "macOS deployment target was not set correctly"
exit 1
fi

export MACOSX_DEPLOYMENT_TARGET=11.0

mkdir -p "$BUILD/build_libomp/openmp-${OMPVERSION}.src/build-arm64" && cd "$BUILD/build_libomp/openmp-${OMPVERSION}.src/build-arm64"
Expand Down Expand Up @@ -96,6 +103,13 @@ if [ "$(otool -L "src/${BINARY_NAME}" | tail -n +2 | grep -v -E "${ALLOWED_DL_LI
exit 1
fi

if ! vtool -show "src/${BINARY_NAME}" | tee | grep minos | \
awk -v version="${MACOSX_DEPLOYMENT_TARGET}" '$2 > version { exit 1 }'
then
echo "macOS deployment target was not set correctly"
exit 1
fi

lipo \
-create \
-arch x86_64 "$BUILD/build_avx2/src/${BINARY_NAME}" \
Expand Down

0 comments on commit 4c1d036

Please sign in to comment.