Skip to content

Commit

Permalink
test macos-14 (ARM M1) in build system
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-p committed Mar 12, 2024
1 parent 7af6387 commit 1296ac6
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/build_deploy_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- build_system_macos14

tags:
- "**"
Expand All @@ -25,8 +26,8 @@ jobs:
# so easier to separate out here.
- [ ubuntu-latest, manylinux, x86_64]
- [ ubuntu-latest, manylinux, i686]
- [ macos-latest, macosx, x86_64 ]
- [ macos-11, macosx, arm64] # cross compiled
- [ macos-latest, macosx, x86_64 ] # Intel chip
- [ macos-14, macosx, macos-14] # ARM M1 chip
- [ windows-2019, win, AMD64 ]

python: [[ "cp37", "3.7" ], [ "cp38", "3.8" ], [ "cp39", "3.9" ],
Expand Down Expand Up @@ -63,22 +64,22 @@ jobs:
CIBW_BEFORE_BUILD_MACOS: brew reinstall gfortran
CIBW_BEFORE_BUILD_LINUX: python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"

- name: Set extra env for arm64
if: >-
( contains(matrix.buildplat[2], 'arm64' ) )
run: |
echo "LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV;
echo "LIBRARY_PATH=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV;
- name: Cross-build Solcore for arm64
if: ${{ (matrix.python[0] != 'cp37') && ( contains(matrix.buildplat[2], 'arm64') )}} # image not present for python3.7
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}*
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
CIBW_ENVIRONMENT: CFLAGS='-target arm64-apple-macos'
CIBW_BEFORE_BUILD_MACOS: bash {project}/build_tools/cibw_before_build_macos_arm.sh && meson setup --cross-file={project}/build_tools/x86_64-w64-arm64.ini build
CIBW_CONFIG_SETTINGS_MACOS: builddir=build
# - name: Set extra env for arm64
# if: >-
# ( contains(matrix.buildplat[2], 'arm64' ) )
# run: |
# echo "LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV;
# echo "LIBRARY_PATH=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV;

# - name: Cross-build Solcore for arm64
# if: ${{ (matrix.python[0] != 'cp37') && ( contains(matrix.buildplat[2], 'arm64') )}} # image not present for python3.7
# uses: pypa/cibuildwheel@v2.16.2
# env:
# CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}*
# CIBW_ARCHS: ${{ matrix.buildplat[2] }}
# CIBW_ENVIRONMENT: CFLAGS='-target arm64-apple-macos'
# CIBW_BEFORE_BUILD_MACOS: bash {project}/build_tools/cibw_before_build_macos_arm.sh && meson setup --cross-file={project}/build_tools/x86_64-w64-arm64.ini build
# CIBW_CONFIG_SETTINGS_MACOS: builddir=build

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 1296ac6

Please sign in to comment.