Skip to content

Commit acfae33

Browse files
committed
build aarch64 on github actions, use macos-13
1 parent 347e655 commit acfae33

File tree

3 files changed

+63
-32
lines changed

3 files changed

+63
-32
lines changed

.github/workflows/posix.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
os: [ubuntu-latest, macos-11]
21+
os: [ubuntu-latest, macos-13]
2222
PLAT: [i686, x86_64]
2323
INTERFACE64: ['0', '1']
2424
MB_ML_VER: ['2014']
2525
MB_ML_LIBC: ['manylinux']
2626
include:
27-
- os: macos-11
27+
- os: macos-13
2828
PLAT: arm64
2929
INTERFACE64: '1'
30-
- os: macos-11
30+
- os: macos-13
3131
PLAT: arm64
3232
INTERFACE64: '0'
3333
- os: ubuntu-latest
@@ -40,9 +40,29 @@ jobs:
4040
INTERFACE64: '0'
4141
MB_ML_LIBC: musllinux
4242
MB_ML_VER: _1_1
43+
44+
- os: ubuntu-latest
45+
PLAT: aarch64
46+
INTERFACE64: '0'
47+
MB_ML_VER: '2014'
48+
- os: ubuntu-latest
49+
PLAT: aarch64
50+
INTERFACE64: '1'
51+
MB_ML_VER: '2014'
52+
- os: ubuntu-latest
53+
PLAT: aarch64
54+
INTERFACE64: '0'
55+
MB_ML_LIBC: musllinux
56+
MB_ML_VER: _1_1
57+
- os: ubuntu-latest
58+
PLAT: aarch64
59+
INTERFACE64: '1'
60+
MB_ML_LIBC: musllinux
61+
MB_ML_VER: _1_1
62+
4363
exclude:
4464
- PLAT: i686
45-
os: macos-11
65+
os: macos-13
4666
- PLAT: i686
4767
INTERFACE64: '1'
4868
env:
@@ -76,6 +96,19 @@ jobs:
7696
# else
7797
# fi
7898
echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV;
99+
100+
- uses: maxim-lobanov/setup-xcode@v1.6.0
101+
if: ${{ matrix.os == 'macos-13' }}
102+
with:
103+
xcode-version: '14.3'
104+
105+
- name: Allow docker with qemu
106+
if: ${{ matrix.PLAT == 'aarch64' }}
107+
run: |
108+
sudo apt-get update -q -y
109+
sudo apt-get -qq install -y qemu qemu-user-static
110+
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
111+
79112
- name: Print some Environment variable
80113
run: |
81114
echo "PLAT: ${PLAT}"
@@ -87,11 +120,6 @@ jobs:
87120
- name: Build OpenBLAS
88121
run: |
89122
set -xeo pipefail
90-
if [[ "$PLAT" == "arm64" ]]; then
91-
sudo xcode-select -switch /Applications/Xcode_12.5.1.app
92-
export SDKROOT=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
93-
clang --version
94-
fi
95123
source tools/build_steps.sh
96124
echo "------ BEFORE BUILD ---------"
97125
before_build
@@ -114,7 +142,7 @@ jobs:
114142
version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
115143
sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml
116144
fi
117-
if [ "macos-11" == "${{ matrix.os }}" ]; then
145+
if [ "macos-13" == "${{ matrix.os }}" ]; then
118146
source tools/build_wheel.sh
119147
else
120148
libc=${MB_ML_LIBC:-manylinux}
@@ -136,9 +164,12 @@ jobs:
136164
name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}
137165
path: libs/openblas*.tar.gz
138166

139-
- uses: conda-incubator/setup-miniconda@v3.0.1
167+
- uses: conda-incubator/setup-miniconda@v3.0.4
140168
with:
169+
channels: conda-forge
170+
channel-priority: true
141171
activate-environment: upload
172+
miniforge-version: latest
142173

143174
- name: Upload
144175
# see https://github.com/marketplace/actions/setup-miniconda for why

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "scipy-openblas64"
11-
version = "0.3.27.44.3"
11+
version = "0.3.27.44.4"
1212
requires-python = ">=3.7"
1313
description = "Provides OpenBLAS for python packaging"
1414
readme = "README.md"

tools/build_steps.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function build_lib {
5555
# OSX or manylinux build
5656
#
5757
# Input arg
58-
# plat - one of i686, x86_64
58+
# plat - one of i686, x86_64, arm64
5959
# interface64 - 1 if build with INTERFACE64 and SYMBOLSUFFIX
6060
# nightly - 1 if building for nightlies
6161
#
@@ -103,7 +103,7 @@ function patch_source {
103103
function do_build_lib {
104104
# Build openblas lib
105105
# Input arg
106-
# plat - one of i686, x86_64
106+
# plat - one of i686, x86_64, arm64
107107
# suffix (optional) - suffix for output archive name
108108
# Suffix added with hyphen prefix
109109
# interface64 (optional) - whether to build ILP64 openblas
@@ -116,7 +116,6 @@ function do_build_lib {
116116
local suffix=$2
117117
local interface64=$3
118118
local nightly=$4
119-
echo "Building with settings: '$plat' '$suffix' '$interface64'"
120119
case $(get_os)-$plat in
121120
Linux-x86_64)
122121
local bitness=64
@@ -125,6 +124,8 @@ function do_build_lib {
125124
Darwin-x86_64)
126125
local bitness=64
127126
local target_flags="TARGET=CORE2"
127+
# Pick up the gfortran runtime libraries
128+
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
128129
;;
129130
*-i686)
130131
local bitness=32
@@ -162,18 +163,29 @@ function do_build_lib {
162163
esac
163164
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ LIBNAMEPREFIX=scipy_ FIXED_LIBNAME=1"
164165
mkdir -p libs
165-
start_spinner
166166
set -x
167167
git config --global --add safe.directory '*'
168168
pushd OpenBLAS
169169
patch_source
170-
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
170+
echo start building
171+
if [ -v dynamic_list ]; then
172+
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
173+
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
174+
USE_OPENMP=0 NUM_THREADS=64 \
175+
DYNAMIC_LIST="$dynamic_list" \
176+
BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null
177+
else
178+
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
179+
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
180+
USE_OPENMP=0 NUM_THREADS=64 \
181+
BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null
182+
fi
183+
echo done building, now testing
171184
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
172185
USE_OPENMP=0 NUM_THREADS=64 \
173-
BINARY=$bitness $interface_flags $target_flags > /dev/null
186+
BINARY=$bitness $interface_flags $target_flags tests
174187
make PREFIX=$BUILD_PREFIX $interface_flags install
175188
popd
176-
stop_spinner
177189
if [ "$nightly" = "1" ]; then
178190
local version="HEAD"
179191
else
@@ -204,16 +216,4 @@ function do_build_lib {
204216
$BUILD_PREFIX/lib/cmake/openblas
205217
}
206218

207-
function upload_to_anaconda {
208-
if [ "$ANACONDA_SCIENTIFIC_PYTHON_UPLOAD" == "" ]; then
209-
echo "ANACONDA_SCIENTIFIC_PYTHON_UPLOAD is not defined: skipping."
210-
else
211-
anaconda -t $ANACONDA_SCIENTIFIC_PYTHON_UPLOAD upload \
212-
--no-progress --force -u scientific-python-nightly-wheels \
213-
-t file -p "openblas-libs" \
214-
-v "$(cd OpenBLAS && git describe --tags --abbrev=8)" \
215-
-d "OpenBLAS for multibuild wheels" \
216-
-s "OpenBLAS for multibuild wheels" \
217-
libs/openblas*.tar.gz
218-
fi
219-
}
219+

0 commit comments

Comments
 (0)