Skip to content

Commit c70ac71

Browse files
authored
Merge pull request #53 from isuruf/arm64
macos arm64 build
2 parents 43a3e43 + e1abae8 commit c70ac71

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

.github/workflows/multibuild.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
PLAT: [i686, x86_64]
2121
INTERFACE64: ['', '1']
2222
MB_ML_VER: ['', 2010, 2014]
23+
include:
24+
- os: macos-latest
25+
PLAT: arm64
26+
INTERFACE64: ''
27+
platform: [x64]
2328
exclude:
2429
- os: macos-latest
2530
PLAT: i686
@@ -66,6 +71,10 @@ jobs:
6671
pip install virtualenv
6772
- name: Build and Install Wheels
6873
run: |
74+
if [[ "$PLAT" == "arm64" ]]; then
75+
sudo xcode-select -switch /Applications/Xcode_12.2.app
76+
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
77+
fi
6978
source travis-ci/build_steps.sh
7079
echo "------ BEFORE BUILD ---------"
7180
before_build

gfortran-install

travis-ci/build_steps.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ROOT_DIR=$(dirname $(dirname "${BASH_SOURCE[0]}"))
77
source ${ROOT_DIR}/multibuild/common_utils.sh
88
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
99

10-
MB_PYTHON_VERSION=3.7
10+
MB_PYTHON_VERSION=3.9
1111

1212
function before_build {
1313
# Manylinux Python version set in build_lib
@@ -44,7 +44,7 @@ function build_lib {
4444
# Make directory to store built archive
4545
if [ -n "$IS_OSX" ]; then
4646
# Do build, add gfortran hash to end of name
47-
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
47+
wrap_wheel_builder do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
4848
return
4949
fi
5050
# Manylinux wrapper
@@ -85,24 +85,33 @@ function do_build_lib {
8585
local suffix=$2
8686
local interface64=$3
8787
echo "Building with settings: '$plat' '$suffix' '$interface64'"
88-
case $plat in
89-
x86_64)
88+
case $(get_os)-$plat in
89+
Linux-x86_64)
9090
local bitness=64
9191
local target_flags="TARGET=PRESCOTT"
9292
;;
93-
i686)
93+
Darwin-x86_64)
94+
local bitness=64
95+
local target_flags="TARGET=CORE2"
96+
;;
97+
*-i686)
9498
local bitness=32
9599
local target_flags="TARGET=PRESCOTT"
96100
;;
97-
aarch64)
101+
Linux-aarch64)
98102
local bitness=64
99103
local target_flags="TARGET=ARMV8"
100104
;;
101-
s390x)
105+
Darwin-arm64)
106+
local bitness=64
107+
local target_flags="TARGET=VORTEX"
108+
;;
109+
*-s390x)
102110
local bitness=64
103111
;;
104-
ppc64le)
112+
*-ppc64le)
105113
local bitness=64
114+
local target_flags="TARGET=POWER8"
106115
;;
107116
*) echo "Strange plat value $plat"; exit 1 ;;
108117
esac

0 commit comments

Comments
 (0)