Skip to content

Commit

Permalink
Merge pull request #962 from glotzerlab/cibuildwheel-arm64
Browse files Browse the repository at this point in the history
Build macos-arm64 pypi packages with cibuildwheel
  • Loading branch information
tommy-waltmann authored May 17, 2022
2 parents 76c4eb9 + 1419230 commit f7653f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
CIBW_SKIP: "{pp*,*-musllinux_*}"

# Build only on 64-bit architectures.
CIBW_ARCHS_MACOS: x86_64
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_WINDOWS: auto64

Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/cibuildwheel-before-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,23 @@ TBB_ZIP="v${TBB_VERSION}.zip"
curl -L -O "https://github.com/oneapi-src/oneTBB/archive/refs/tags/${TBB_ZIP}"
unzip -q "${TBB_ZIP}"

#
EXTRA_CMAKE_ARGS=""
if [[ "${PLATFORM}" == "macos" ]]; then
if [[ ${ARCHFLAGS} == *"arm64"* ]]; then
EXTRA_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64"
fi
fi
echo "EXTRA_CMAKE_ARGS=${EXTRA_CMAKE_ARGS}"

# clean the build to rebuild for arm64
rm -rf "${PACKAGE_DIR}/tbb"

# Move to a hard-coded path (defined by CIBW_ENVIRONMENT)
mv "oneTBB-${TBB_VERSION}" "${PACKAGE_DIR}/tbb"
cd "${PACKAGE_DIR}/tbb"
mkdir -p build
cd build
cmake ../ -DTBB_TEST=OFF -DTBB_STRICT=OFF
cmake --build . -j
cmake ../ -DTBB_TEST=OFF -DTBB_STRICT=OFF -DCMAKE_BUILD_TYPE=Release ${EXTRA_CMAKE_ARGS}
cmake --build . -j -v
cmake --install .
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to

### Added
* `include_input_points` argument to `freud.locality.PeriodicBuffer`.
* `macos-arm64` binary builds on conda-forge and PyPI.

### Changed
* `freud.data.UnitCell.generate_system` now generates positions in the same order as the basis positions.
Expand Down

0 comments on commit f7653f6

Please sign in to comment.