Skip to content

Commit 970cb75

Browse files
authored
Merge pull request #210 from mattip/macos-latest
update to macos-latest
2 parents 24557b4 + 8e9a5c5 commit 970cb75

File tree

8 files changed

+50
-30
lines changed

8 files changed

+50
-30
lines changed

.github/workflows/posix.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
os: [ubuntu-latest, macos-13]
26+
os: [ubuntu-latest, macos-latest]
2727
PLAT: [i686, x86_64]
2828
INTERFACE64: ['0', '1']
2929
MB_ML_VER: ['2014']
3030
MB_ML_LIBC: ['manylinux']
3131
include:
32-
- os: macos-13
32+
- os: macos-latest
3333
PLAT: arm64
3434
INTERFACE64: '1'
35-
- os: macos-13
35+
- os: macos-latest
3636
PLAT: arm64
3737
INTERFACE64: '0'
3838
- os: ubuntu-latest
@@ -67,7 +67,7 @@ jobs:
6767

6868
exclude:
6969
- PLAT: i686
70-
os: macos-13
70+
os: macos-latest
7171
- PLAT: i686
7272
INTERFACE64: '1'
7373
env:
@@ -94,9 +94,9 @@ jobs:
9494
echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV;
9595
9696
- uses: maxim-lobanov/[email protected]
97-
if: ${{ matrix.os == 'macos-13' }}
97+
if: ${{ matrix.os == 'macos-latest' }}
9898
with:
99-
xcode-version: '14.3'
99+
xcode-version: '15.4'
100100

101101
- name: Print some Environment variable
102102
run: |
@@ -137,7 +137,7 @@ jobs:
137137
version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
138138
sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml
139139
fi
140-
if [ "macos-13" == "${{ matrix.os }}" ]; then
140+
if [ "macos-latest" == "${{ matrix.os }}" ]; then
141141
source tools/build_wheel.sh
142142
else
143143
libc=${MB_ML_LIBC:-manylinux}
@@ -159,12 +159,13 @@ jobs:
159159
name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }}
160160
path: libs/openblas*.tar.gz
161161

162-
- uses: conda-incubator/setup-miniconda@v3.1.1
162+
- uses: conda-incubator/setup-miniconda@v3.2.0
163163
with:
164164
channels: conda-forge
165165
channel-priority: true
166166
activate-environment: upload
167167
miniforge-version: latest
168+
conda-remove-defaults: "true"
168169

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ local/scipy_openblas64/include
1717
local/scipy_openblas64/*.so
1818
local/scipy_openblas64/*.pyd
1919
local/scipy_openblas64/*.dylib
20+
objconv/

gfortran-install

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
99
[project]
1010
name = "scipy-openblas64"
1111
# v0.3.30
12-
version = "0.3.30.0.1"
12+
version = "0.3.30.0.2"
1313
requires-python = ">=3.7"
1414
description = "Provides OpenBLAS for python packaging"
1515
readme = "README.md"

tools/build_steps.sh

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
# Build script for manylinux and OSX
22
BUILD_PREFIX=/usr/local
3-
# OSX gfortran archive
4-
GFORTRAN_DMG="archives/gfortran-4.9.0-Mavericks.dmg"
53

64
ROOT_DIR=$(dirname $(dirname "${BASH_SOURCE[0]}"))
75
source ${ROOT_DIR}/multibuild/common_utils.sh
8-
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
96

107
MB_PYTHON_VERSION=3.9
118

129
function before_build {
1310
# Manylinux Python version set in build_lib
1411
if [ -n "$IS_OSX" ]; then
12+
if [ ! -e /usr/local/lib ]; then
13+
sudo mkdir -p /usr/local/lib
14+
sudo chmod 777 /usr/local/lib
15+
touch /usr/local/lib/.dir_exists
16+
fi
17+
if [ ! -e /usr/local/include ]; then
18+
sudo mkdir -p /usr/local/include
19+
sudo chmod 777 /usr/local/include
20+
touch /usr/local/include/.dir_exists
21+
fi
1522
source ${ROOT_DIR}/multibuild/osx_utils.sh
1623
get_macpython_environment ${MB_PYTHON_VERSION} venv
17-
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
18-
install_gfortran
24+
# Since install_fortran uses `uname -a` to determine arch,
25+
# force the architecture
26+
arch -${PLAT} bash -s << EOF
27+
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
28+
install_gfortran
29+
EOF
1930
# Deployment target set by gfortran_utils
2031
echo "Deployment target $MACOSX_DEPLOYMENT_TARGET"
2132

@@ -89,7 +100,6 @@ function build_lib {
89100
#
90101
# Depends on globals
91102
# BUILD_PREFIX - install suffix e.g. "/usr/local"
92-
# GFORTRAN_DMG
93103
# MB_ML_VER
94104
set -x
95105
local plat=${1:-$PLAT}
@@ -99,7 +109,7 @@ function build_lib {
99109
# Make directory to store built archive
100110
if [ -n "$IS_OSX" ]; then
101111
# Do build, add gfortran hash to end of name
102-
wrap_wheel_builder do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64" "$nightly"
112+
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64" "$nightly"
103113
return
104114
fi
105115
# Manylinux wrapper
@@ -155,6 +165,8 @@ function do_build_lib {
155165
local target="CORE2"
156166
# Pick up the gfortran runtime libraries
157167
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
168+
CFLAGS="$CFLAGS -arch x86_64"
169+
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}
158170
;;
159171
*-i686)
160172
local bitness=32
@@ -168,7 +180,10 @@ function do_build_lib {
168180
Darwin-arm64)
169181
local bitness=64
170182
local target="VORTEX"
171-
CFLAGS="$CFLAGS -ftrapping-math"
183+
CFLAGS="$CFLAGS -ftrapping-math -mmacos-version-min=11.0"
184+
MACOSX_DEPLOYMENT_TARGET="11.0"
185+
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}
186+
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
172187
;;
173188
*-s390x)
174189
local bitness=64
@@ -208,7 +223,7 @@ function do_build_lib {
208223
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
209224
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
210225
fi
211-
if [ -v dynamic_list ]; then
226+
if [ -n "$dynamic_list" ]; then
212227
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
213228
make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \
214229
USE_OPENMP=0 NUM_THREADS=64 \

tools/build_wheel.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,15 @@ if [ "${PLAT}" == "arm64" ]; then
101101
exit 0
102102
fi
103103
# Test that the wheel works with a different python
104+
PYTHON=python3.11
105+
if [ "$(uname)" == "Darwin" -a "${PLAT}" == "x86_64" ]; then
106+
which python3.11
107+
PYTHON="arch -x86_64 python3.11"
108+
fi
104109
if [ "${INTERFACE64}" != "1" ]; then
105-
python3.11 -m pip install --no-index --find-links dist scipy_openblas32
106-
python3.11 -m scipy_openblas32
110+
$PYTHON -m pip install --no-index --find-links dist scipy_openblas32
111+
$PYTHON -m scipy_openblas32
107112
else
108-
python3.11 -m pip install --no-index --find-links dist scipy_openblas64
109-
python3.11 -m scipy_openblas64
113+
$PYTHON -m pip install --no-index --find-links dist scipy_openblas64
114+
$PYTHON -m scipy_openblas64
110115
fi

tools/local_build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
set -e
55

66
# Set extra env
7-
if [[ $(uname -m) == "x86_64" ]]; then
7+
if [[ $(uname) == "Darwin" ]]; then
8+
# Force x86_64
9+
export PLAT=x86_64
10+
elif [[ $(uname -m) == "x86_64" ]]; then
811
echo got x86_64
912
export TRAVIS_OS_NAME=ubuntu-latest
1013
export PLAT=x86_64
@@ -64,11 +67,6 @@ function build_openblas {
6467
fi
6568
# Build OpenBLAS
6669
set -xeo pipefail
67-
if [ "$PLAT" == "arm64" ]; then
68-
sudo xcode-select -switch /Applications/Xcode_12.5.1.app
69-
export SDKROOT=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
70-
clang --version
71-
fi
7270
source tools/build_steps.sh
7371
echo "------ BEFORE BUILD ---------"
7472
before_build

0 commit comments

Comments
 (0)