From 673e682273c94c11114814952ddc22269a02faf5 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 2 Jul 2025 21:31:56 +0300 Subject: [PATCH 1/3] use trapping-math with clang --- .github/workflows/posix.yml | 12 ++++++------ pyproject.toml | 2 +- tools/build_steps.sh | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 93567d2..3f753d4 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -23,16 +23,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13] + os: [ubuntu-latest, macos-latest] PLAT: [i686, x86_64] INTERFACE64: ['0', '1'] MB_ML_VER: ['2014'] MB_ML_LIBC: ['manylinux'] include: - - os: macos-13 + - os: macos-latest PLAT: arm64 INTERFACE64: '1' - - os: macos-13 + - os: macos-latest PLAT: arm64 INTERFACE64: '0' - os: ubuntu-latest @@ -67,7 +67,7 @@ jobs: exclude: - PLAT: i686 - os: macos-13 + os: macos-latest - PLAT: i686 INTERFACE64: '1' env: @@ -94,7 +94,7 @@ jobs: echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV; - uses: maxim-lobanov/setup-xcode@v1.6.0 - if: ${{ matrix.os == 'macos-13' }} + if: ${{ matrix.os == 'macos-latest' }} with: xcode-version: '14.3' @@ -137,7 +137,7 @@ jobs: version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml fi - if [ "macos-13" == "${{ matrix.os }}" ]; then + if [ "macos-latest" == "${{ matrix.os }}" ]; then source tools/build_wheel.sh else libc=${MB_ML_LIBC:-manylinux} diff --git a/pyproject.toml b/pyproject.toml index e260105..842951f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" # v0.3.30 -version = "0.3.30.0.0" +version = "0.3.30.0.1" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" diff --git a/tools/build_steps.sh b/tools/build_steps.sh index b7268da..5d8a14f 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -168,6 +168,7 @@ function do_build_lib { Darwin-arm64) local bitness=64 local target="VORTEX" + CFLAGS="$CFLAGS -ftrapping-math" ;; *-s390x) local bitness=64 From 2e7d2b314cd215f51e178cd42f5a82fc09bbe922 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 2 Jul 2025 21:47:48 +0300 Subject: [PATCH 2/3] update to newer xcode --- .github/workflows/posix.yml | 2 +- tools/local_build.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 3f753d4..e567c27 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -96,7 +96,7 @@ jobs: - uses: maxim-lobanov/setup-xcode@v1.6.0 if: ${{ matrix.os == 'macos-latest' }} with: - xcode-version: '14.3' + xcode-version: '15.4' - name: Print some Environment variable run: | diff --git a/tools/local_build.sh b/tools/local_build.sh index af3d323..370e698 100644 --- a/tools/local_build.sh +++ b/tools/local_build.sh @@ -65,8 +65,8 @@ function build_openblas { # Build OpenBLAS set -xeo pipefail if [ "$PLAT" == "arm64" ]; then - sudo xcode-select -switch /Applications/Xcode_12.5.1.app - export SDKROOT=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk + sudo xcode-select -switch /Applications/Xcode_15.4.0.app + export SDKROOT=/Applications/Xcode_15.4.0-app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk clang --version fi source tools/build_steps.sh From 0b2a5356d483633793ad78ff3fe83e467e3d7e51 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 2 Jul 2025 22:42:44 +0300 Subject: [PATCH 3/3] revert image back to macos-13 --- .github/workflows/posix.yml | 14 +++++++------- tools/local_build.sh | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index e567c27..93567d2 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -23,16 +23,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] PLAT: [i686, x86_64] INTERFACE64: ['0', '1'] MB_ML_VER: ['2014'] MB_ML_LIBC: ['manylinux'] include: - - os: macos-latest + - os: macos-13 PLAT: arm64 INTERFACE64: '1' - - os: macos-latest + - os: macos-13 PLAT: arm64 INTERFACE64: '0' - os: ubuntu-latest @@ -67,7 +67,7 @@ jobs: exclude: - PLAT: i686 - os: macos-latest + os: macos-13 - PLAT: i686 INTERFACE64: '1' env: @@ -94,9 +94,9 @@ jobs: echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV; - uses: maxim-lobanov/setup-xcode@v1.6.0 - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-13' }} with: - xcode-version: '15.4' + xcode-version: '14.3' - name: Print some Environment variable run: | @@ -137,7 +137,7 @@ jobs: version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml fi - if [ "macos-latest" == "${{ matrix.os }}" ]; then + if [ "macos-13" == "${{ matrix.os }}" ]; then source tools/build_wheel.sh else libc=${MB_ML_LIBC:-manylinux} diff --git a/tools/local_build.sh b/tools/local_build.sh index 370e698..af3d323 100644 --- a/tools/local_build.sh +++ b/tools/local_build.sh @@ -65,8 +65,8 @@ function build_openblas { # Build OpenBLAS set -xeo pipefail if [ "$PLAT" == "arm64" ]; then - sudo xcode-select -switch /Applications/Xcode_15.4.0.app - export SDKROOT=/Applications/Xcode_15.4.0-app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk + sudo xcode-select -switch /Applications/Xcode_12.5.1.app + export SDKROOT=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk clang --version fi source tools/build_steps.sh