Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7576af0

Browse files
committed
Support M1 for Regular Variant
1 parent24a3dba commit7576af0

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

‎.github/workflows/build-wheels.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
fail-fast:false
1818
matrix:
19-
os:[ ubuntu-22.04, macos-12, windows-2022 ]
19+
os:[ ubuntu-22.04, macos-13, windows-2022 ]
2020
arch:[ x86_64 ]
2121
include:
22-
-os:macos-12
22+
-os:macos-13
2323
arch:arm64
2424
-os:ubuntu-22.04
2525
arch:aarch64
@@ -65,10 +65,10 @@ jobs:
6565

6666
-name:Build wheels
6767
if:${{ (runner.os != 'Linux' || matrix.arch != 'aarch64') || (env.PUSH_WHEELS == 'TEST' || env.PUSH_WHEELS == 'YES')}}
68-
uses:pypa/cibuildwheel@v2.19.2
68+
uses:pypa/cibuildwheel@v2.22.0
6969
env:
7070
CIBW_ENVIRONMENT_LINUX:RUNNER_OS="manylinux" GITHUB_WORKSPACE="/project"
71-
CIBW_ENVIRONMENT_MACOS:RUNNER_ARCH=${{ matrix.arch }} MACOSX_DEPLOYMENT_TARGET="12.0"
71+
CIBW_ENVIRONMENT_MACOS:RUNNER_ARCH=${{ matrix.arch }}
7272
CIBW_BEFORE_ALL_LINUX:source sdpa-python/continuous_integration/build_libsdpa_gmp.sh
7373
CIBW_BEFORE_ALL_WINDOWS:set PATH=D:\msys64\mingw64\bin;%PATH%
7474
CIBW_BEFORE_ALL_MACOS:source sdpa-python/continuous_integration/build_libsdpa_gmp.sh
@@ -117,9 +117,11 @@ jobs:
117117
strategy:
118118
fail-fast:false
119119
matrix:
120-
os:[ ubuntu-22.04, macos-12, windows-2022 ]
120+
os:[ ubuntu-22.04, macos-13, windows-2022 ]
121121
arch:[ x86_64 ]
122122
include:
123+
-os:macos-14
124+
arch:arm64
123125
-os:ubuntu-22.04
124126
arch:aarch64
125127

@@ -153,7 +155,7 @@ jobs:
153155
run:source sdpa-python/continuous_integration/build_libsdpa.sh
154156

155157
-name:Install Requirements (macOS)
156-
if:${{ matrix.os == 'macos-12' }}
158+
if:${{(matrix.os == 'macos-13' || matrix.os == 'macos-14') }}
157159
uses:fortran-lang/setup-fortran@v1
158160

159161
-name:Set up QEMU (Linux)
@@ -162,12 +164,21 @@ jobs:
162164
with:
163165
platforms:arm64
164166

167+
-name:Conditionally set CIBW_ENVIRONMENT_MACOS
168+
if:${{ (matrix.os == 'macos-13' || matrix.os == 'macos-14') }}
169+
run:|
170+
RUNNER_ARCH=${{ matrix.arch }}
171+
if [[ "$RUNNER_ARCH" == "arm64" ]]; then
172+
echo "CIBW_ENVIRONMENT_MACOS=RUNNER_ARCH=arm64 MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV
173+
else
174+
echo "CIBW_ENVIRONMENT_MACOS=RUNNER_ARCH=x86_64 MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV
175+
fi
176+
165177
-name:Build wheels
166178
if:${{ (runner.os != 'Linux' || matrix.arch != 'aarch64') || (env.PUSH_WHEELS == 'TEST' || env.PUSH_WHEELS == 'YES')}}
167-
uses:pypa/cibuildwheel@v2.19.2
179+
uses:pypa/cibuildwheel@v2.22.0
168180
env:
169181
CIBW_ENVIRONMENT_LINUX:RUNNER_OS="manylinux" GITHUB_WORKSPACE="/project"
170-
CIBW_ENVIRONMENT_MACOS:MACOSX_DEPLOYMENT_TARGET="12.0"
171182
CIBW_BEFORE_ALL_LINUX:source sdpa-python/continuous_integration/build_libsdpa.sh
172183
CIBW_BEFORE_ALL_WINDOWS:set PATH=D:\msys64\mingw64\bin;%PATH%
173184
CIBW_BEFORE_ALL_MACOS:source sdpa-python/continuous_integration/build_libsdpa.sh

‎continuous_integration/build_libsdpa.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cd sdpa-7.3.18
2020
# MUMPS package (even if there is no new `sdpa` release at sdpa.sourceforge.net)
2121
# Please check the bottom of this webpage for latest MUMPS available:
2222
# http://ftp.de.debian.org/debian/pool/main/m/mumps/
23-
sed -i.bak's/MUMPS_VER =.*/MUMPS_VER = 5.7.1/' mumps/Makefile
23+
sed -i.bak's/MUMPS_VER =.*/MUMPS_VER = 5.7.3/' mumps/Makefile
2424
# `wget` may not be available but `curl` almost always is
2525
sed -i.bak's/wget/curl -L -O/' mumps/Makefile
2626

@@ -32,6 +32,8 @@ fi
3232

3333
# Build SDPA and MUMPS and `cd` back into main directory
3434
make
35+
./sdpa example1.dat example1.out
36+
3537
cd$GITHUB_WORKSPACE
3638

3739
# Build SPOOLES or provide location to system spooles
@@ -47,12 +49,23 @@ if [[ "$RUNNER_OS" != "Windows" ]]; then
4749
# this patch is critical only on Ubuntu
4850
curl -O https://raw.githubusercontent.com/sdpa-python/sdpa-multiprecision/main/spooles/patches/patch-timings.h
4951
patch -p0< patch-timings.h
52+
elif [["$RUNNER_OS"=="macOS" ]]&& [["$RUNNER_ARCH"=="arm64" ]];then
53+
# solves
54+
# error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'int' [-Wint-conversion]
55+
# while building SPOOLES on M1
56+
sed -i.bak's/^ CFLAGS =.*/& -Wno-int-conversion/' Make.inc
5057
fi
5158
make lib
5259
mv spooles.a libspooles.a
5360
cd$GITHUB_WORKSPACE
5461
fi
5562

63+
# # this might help locating Homebrew's libgfortran
64+
# if [[ "$RUNNER_OS" == "macOS" ]]; then
65+
# find / -name libgfortran.a 2>/dev/null
66+
# find / -name libquadmath.a 2>/dev/null
67+
# fi
68+
5669
# Modify setupcfg.py file
5770
if [["$RUNNER_OS"=="Windows" ]];then
5871
original_value="${GITHUB_WORKSPACE}"
@@ -69,7 +82,11 @@ elif [[ "$RUNNER_OS" == "macOS" ]]; then
6982
sed -i.bak's@SPOOLES_DIR =.*@SPOOLES_DIR="'"$GITHUB_WORKSPACE"'/spooles"@g' sdpa-python/setupcfg.py
7083
sed -i.bak's@SPOOLES_INCLUDE =.*@SPOOLES_INCLUDE="'"$GITHUB_WORKSPACE"'/spooles"@g' sdpa-python/setupcfg.py
7184
# sed -i.bak "s/GFORTRAN_LIBS =.*/GFORTRAN_LIBS='\/usr\/local\/Cellar\/gcc\/14.1.0_1\/lib\/gcc\/current'/g" sdpa-python/setupcfg.py
72-
sed -i.bak"s/GFORTRAN_LIBS =.*/GFORTRAN_LIBS='\/usr\/local\/opt\/gcc\/lib\/gcc\/current'/g" sdpa-python/setupcfg.py
85+
if [["$RUNNER_ARCH"=="arm64" ]];then
86+
sed -i.bak"s/GFORTRAN_LIBS =.*/GFORTRAN_LIBS='\/opt\/homebrew\/opt\/gcc\/lib\/gcc\/current'/g" sdpa-python/setupcfg.py
87+
else
88+
sed -i.bak"s/GFORTRAN_LIBS =.*/GFORTRAN_LIBS='\/usr\/local\/opt\/gcc\/lib\/gcc\/current'/g" sdpa-python/setupcfg.py
89+
fi
7390
else
7491
sed -i.bak's@SDPA_DIR =.*@SDPA_DIR="'"$GITHUB_WORKSPACE"'/sdpa-7.3.18"@g' sdpa-python/setupcfg.py
7592
sed -i.bak's@SPOOLES_DIR =.*@SPOOLES_DIR="'"$GITHUB_WORKSPACE"'/spooles"@g' sdpa-python/setupcfg.py

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp