-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new GitHub native aarch64 macOS runners
Now that GitHub has native arm64 macOS runners we can leverage these to build and test our arm64 macOS wheels directly instead of relying on cross-target compilation, which prevent us from exercising the wheels in the CI. Signed-off-by: Pablo Galindo <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,13 +93,11 @@ jobs: | |
|
||
build_macosx_wheels: | ||
needs: [build_sdist] | ||
name: macosx_${{ matrix.cibw_arch }} wheels | ||
runs-on: macos-11 | ||
name: macosx_${{ matrix.os }} wheels | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cibw_arch: ["x86_64", "arm64"] | ||
|
||
os: [macos-11, macos-14] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -113,24 +111,26 @@ jobs: | |
run: | | ||
tar zxvf dist/*.tar.gz --strip-components=1 | ||
- name: Sets env vars for compilation | ||
if: matrix.cibw_arch == 'arm64' | ||
if: matrix.os == 'macos-14' | ||
run: | | ||
echo "CFLAGS=-target arm64-apple-macos11" >> $GITHUB_ENV | ||
echo "MEMRAY_LIBBACKTRACE_TARGET=arm64-apple-macos11" >> $GITHUB_ENV | ||
echo "CFLAGS=-target aarch64-apple-darwin" >> $GITHUB_ENV | ||
echo "MEMRAY_LIBBACKTRACE_TARGET=aarch64-apple-darwin" >> $GITHUB_ENV | ||
echo "LZ4_INSTALL_DIR=/tmp/lz4_install/usr/local/" >> $GITHUB_ENV | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: "cp3{8..12}-*" | ||
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} | ||
CIBW_PRERELEASE_PYTHONS: True | ||
CIBW_TEST_EXTRAS: test | ||
CIBW_TEST_COMMAND: pytest {package}/tests | ||
CIBW_BUILD_VERBOSITY: 1 | ||
MACOSX_DEPLOYMENT_TARGET: "10.14" | ||
|
||
CFLAGS: "${{ env.CFLAGS }} -I/lz4_install/include" | ||
LDFLAGS: "-L${{ env.LZ4_INSTALL_DIR}}/lib -Wl,-rpath,${{env.LZ4_INSTALL_DIR}}/lib" | ||
DYLD_LIBRARY_PATH: "${{ env.LZ4_INSTALL_DIR }}/lib" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: macosx_${{ matrix.cibw_arch }}-wheels | ||
name: macosx_${{ matrix.os }}-wheels | ||
path: ./wheelhouse/*.whl | ||
|
||
build_and_test_wheels: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters