Skip to content

Commit

Permalink
Merge pull request #53 from isuruf/arm64
Browse files Browse the repository at this point in the history
macos arm64 build
  • Loading branch information
mattip committed Jan 31, 2021
2 parents 43a3e43 + e1abae8 commit c70ac71
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/multibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
PLAT: [i686, x86_64]
INTERFACE64: ['', '1']
MB_ML_VER: ['', 2010, 2014]
include:
- os: macos-latest
PLAT: arm64
INTERFACE64: ''
platform: [x64]
exclude:
- os: macos-latest
PLAT: i686
Expand Down Expand Up @@ -66,6 +71,10 @@ jobs:
pip install virtualenv
- name: Build and Install Wheels
run: |
if [[ "$PLAT" == "arm64" ]]; then
sudo xcode-select -switch /Applications/Xcode_12.2.app
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
fi
source travis-ci/build_steps.sh
echo "------ BEFORE BUILD ---------"
before_build
Expand Down
2 changes: 1 addition & 1 deletion gfortran-install
25 changes: 17 additions & 8 deletions travis-ci/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ROOT_DIR=$(dirname $(dirname "${BASH_SOURCE[0]}"))
source ${ROOT_DIR}/multibuild/common_utils.sh
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh

MB_PYTHON_VERSION=3.7
MB_PYTHON_VERSION=3.9

function before_build {
# Manylinux Python version set in build_lib
Expand Down Expand Up @@ -44,7 +44,7 @@ function build_lib {
# Make directory to store built archive
if [ -n "$IS_OSX" ]; then
# Do build, add gfortran hash to end of name
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
wrap_wheel_builder do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
return
fi
# Manylinux wrapper
Expand Down Expand Up @@ -85,24 +85,33 @@ function do_build_lib {
local suffix=$2
local interface64=$3
echo "Building with settings: '$plat' '$suffix' '$interface64'"
case $plat in
x86_64)
case $(get_os)-$plat in
Linux-x86_64)
local bitness=64
local target_flags="TARGET=PRESCOTT"
;;
i686)
Darwin-x86_64)
local bitness=64
local target_flags="TARGET=CORE2"
;;
*-i686)
local bitness=32
local target_flags="TARGET=PRESCOTT"
;;
aarch64)
Linux-aarch64)
local bitness=64
local target_flags="TARGET=ARMV8"
;;
s390x)
Darwin-arm64)
local bitness=64
local target_flags="TARGET=VORTEX"
;;
*-s390x)
local bitness=64
;;
ppc64le)
*-ppc64le)
local bitness=64
local target_flags="TARGET=POWER8"
;;
*) echo "Strange plat value $plat"; exit 1 ;;
esac
Expand Down

0 comments on commit c70ac71

Please sign in to comment.