Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}
# Pin docker builds to ubuntu-24.04 https://github.com/actions/runner-images/issues/14790
- { os: ubuntu-24.04, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}

- { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}
- { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}
Expand Down Expand Up @@ -58,8 +59,8 @@ jobs:
- { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '0', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '1', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux}

- { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: android}
- { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: android}
- { os: ubuntu-24.04, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: android}
- { os: ubuntu-24.04, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: android}

- { os: ubuntu-latest, PLAT: arm64_v8a, INTERFACE64: '0', MB_ML_LIBC: android}
- { os: ubuntu-latest, PLAT: arm64_v8a, INTERFACE64: '1', MB_ML_LIBC: android}
Expand Down
55 changes: 39 additions & 16 deletions .github/workflows/windows-arm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows-on-ARM
name: Windows

on:
push:
Expand All @@ -24,18 +24,30 @@ env:
# Without this, invoking bash will cd to the home directory
CHERE_INVOKING: "yes"
BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe"
PLAT: arm64
LLVM_VERSION: "22.1.8"
NINJA_VERSION: "1.13.1"

jobs:
build:
runs-on: windows-11-arm
name: ${{ matrix.PLAT }}_${{ matrix.INTERFACE64 }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90

strategy:
fail-fast: false
matrix:
INTERFACE64: ['1', '0']
# Both architectures build with the same toolchain (clang-cl +
# flang-new + cmake + ninja) and the same script, so they differ only
# in the runner, the installer assets and the wheel tag.
include:
- { os: windows-latest, PLAT: x86_64, WHEEL_PLAT: win_amd64, PY_ARCH: x64, LLVM_ASSET: win64, NINJA_ASSET: win, INTERFACE64: '0' }
- { os: windows-latest, PLAT: x86_64, WHEEL_PLAT: win_amd64, PY_ARCH: x64, LLVM_ASSET: win64, NINJA_ASSET: win, INTERFACE64: '1' }
- { os: windows-11-arm, PLAT: arm64, WHEEL_PLAT: win_arm64, PY_ARCH: arm64, LLVM_ASSET: woa64, NINJA_ASSET: winarm64, INTERFACE64: '0' }
- { os: windows-11-arm, PLAT: arm64, WHEEL_PLAT: win_arm64, PY_ARCH: arm64, LLVM_ASSET: woa64, NINJA_ASSET: winarm64, INTERFACE64: '1' }

env:
PLAT: ${{ matrix.PLAT }}
WHEEL_PLAT: ${{ matrix.WHEEL_PLAT }}
INTERFACE64: ${{ matrix.INTERFACE64 }}
# A scheduled or manually triggered run builds against the latest
# OpenBLAS HEAD instead of openblas_commit.txt
Expand All @@ -50,28 +62,39 @@ jobs:
uses: actions/setup-python@v6.2.0
with:
python-version: 3.12
architecture: arm64
architecture: ${{ matrix.PY_ARCH }}

- name: Download and install LLVM installer
# The runner images' preinstalled LLVM has no flang; the official
# installer does.
run: |
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
$url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${env:LLVM_VERSION}/LLVM-${env:LLVM_VERSION}-${{ matrix.LLVM_ASSET }}.exe"
echo "Downloading $url"
Invoke-WebRequest $url -UseBasicParsing -OutFile LLVM-installer.exe
Start-Process -FilePath ".\LLVM-installer.exe" -ArgumentList "/S" -Wait
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install CMake and Ninja for Win-ARM64
- name: Install Ninja
shell: pwsh
run: |
$url = "https://github.com/ninja-build/ninja/releases/download/v${env:NINJA_VERSION}/ninja-${{ matrix.NINJA_ASSET }}.zip"
echo "Downloading $url"
Invoke-WebRequest $url -OutFile ninja.zip
Expand-Archive ninja.zip -DestinationPath ninja
Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32"

- name: Install CMake for Win-ARM64
# windows-latest already ships a usable cmake; the ARM64 image does not.
if: matrix.PLAT == 'arm64'
shell: pwsh
run: |
Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4-windows-arm64.msi -OutFile cmake-arm64.msi
Start-Process msiexec.exe -ArgumentList "/i cmake-arm64.msi /quiet /norestart" -Wait
echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH

Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip -OutFile ninja-winarm64.zip
Expand-Archive ninja-winarm64.zip -DestinationPath ninja
Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32"

- name: Set env variables
run: |
if ( ${{ matrix.INTERFACE64 }} -eq "1" ) {
if ( "${{ matrix.INTERFACE64 }}" -eq "1" ) {
echo "INTERFACE_BITS=64" >> $env:GITHUB_ENV
} else {
echo "INTERFACE_BITS=32" >> $env:GITHUB_ENV
Expand All @@ -80,17 +103,17 @@ jobs:
- name: Build
run: |
git submodule update --init --recursive
.\tools\build_steps_win_arm64.bat 64 ${env:INTERFACE_BITS}
.\tools\build_steps_win.bat 64 ${env:INTERFACE_BITS}

- name: Test ${{ matrix.INTERFACE_BITS }}-bit interface wheel
- name: Test wheel, INTERFACE64=${{ matrix.INTERFACE64 }}
run: |
python -m pip install --no-index --find-links dist scipy_openblas${env:INTERFACE_BITS}
python -m scipy_openblas${env:INTERFACE_BITS}
python -c "import scipy_openblas${env:INTERFACE_BITS}; print(scipy_openblas${env:INTERFACE_BITS}.get_pkg_config())"

- uses: actions/upload-artifact@v6.0.0
with:
name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }}
name: wheels-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}
path: dist/scipy_openblas*.whl

upload:
Expand Down
52 changes: 24 additions & 28 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@ env:
# Preserve working directory for calls into bash
# Without this, invoking bash will cd to the home directory
CHERE_INVOKING: "yes"
BASH_PATH: "c:\\rtools40\\usr\\bin\\bash.exe"

jobs:
build:
strategy:
matrix:
plat: ['x64', 'x86']
plat: ['x64']
INTERFACE64: ['1', '0']
os: [windows-latest]
exclude:
- plat: x86
INTERFACE64: '1'
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -46,30 +42,28 @@ jobs:
timeout-minutes: 90
steps:
- uses: actions/checkout@v6.0.1
- name: install-rtools
run: |
# rtools 42+ does not support 32 bits builds.
choco install -y rtools --no-progress --force --version=4.0.0.20220206

- name: Install MSYS2 toolchain
uses: msys2/setup-msys2@v2.33.0
with:
msystem: UCRT64
update: true
install: >-
git
make
zip
unzip
pacboy: >-
cc:p
fc:p

- name: Set env variables
run: |
echo "START_DIR=$PWD" >> $env:GITHUB_ENV
# For interpretation of MSYSTEM, see:
# https://sourceforge.net/p/msys2/discussion/general/thread/b7dfdac8/#3939
if ( "${{ matrix.plat }}" -eq "x86") {
echo "PLAT=i686" >> $env:GITHUB_ENV
echo "WHEEL_PLAT=win32" >> $env:GITHUB_ENV
echo "MSYSTEM=MINGW32" >> $env:GITHUB_ENV
# No ucrt on 32-bits, so use _snprintf_c instead
echo "LDFLAGS=-static -static-libgcc -Wl,--defsym,_quadmath_snprintf=__snprintf_c" >> $env:GITHUB_ENV
echo "BUILD_BITS=32" >> $env:GITHUB_ENV
} else {
echo "PLAT=x86_64" >> $env:GITHUB_ENV
echo "WHEEL_PLAT=win_amd64" >> $env:GITHUB_ENV
echo "MSYSTEM=UCRT64" >> $env:GITHUB_ENV
echo "LDFLAGS=-lucrt -static -static-libgcc -Wl,--defsym,quadmath_snprintf=snprintf" >> $env:GITHUB_ENV
echo "BUILD_BITS=64" >> $env:GITHUB_ENV
}
echo "PLAT=x86_64" >> $env:GITHUB_ENV
echo "WHEEL_PLAT=win_amd64" >> $env:GITHUB_ENV
echo "LDFLAGS=-lucrt -static -static-libgcc -Wl,--defsym,quadmath_snprintf=snprintf" >> $env:GITHUB_ENV
echo "BUILD_BITS=64" >> $env:GITHUB_ENV
if ( ${{ matrix.INTERFACE64 }} -eq "1" ) {
echo "INTERFACE64=1" >> $env:GITHUB_ENV
}
Expand All @@ -82,15 +76,17 @@ jobs:
echo CIBW_ENVIRONMENT_WINDOWS=$env:CIBW_ENVIRONMENT_WINDOWS

- name: Build
shell: msys2 {0}
run: |
git submodule update --init --recursive
& $env:BASH_PATH -lc tools/build_steps_windows.sh
tools/build_steps_windows.sh

- name: Test
shell: msys2 {0}
run: |
& $env:BASH_PATH -lc tools/build_gfortran.sh
tools/build_gfortran.sh
echo "Dynamic test"
.\for_test\test_dyn.exe
./for_test/test_dyn.exe

- name: Copy
run: |
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## OpenBLAS v0.3.34 (v0.3.34)

### 0.3.34.481.4 (2026-11-19)

- Drop 32-bit windows wheels, update rtools

### 0.3.34.481.3 (2026-11-2)

- Refactor gha upload to anaconda.org
Expand Down
7 changes: 2 additions & 5 deletions local/scipy_openblas64/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import re
import sys
from textwrap import dedent
import platform

_HERE = Path(__file__).resolve().parent

Expand Down Expand Up @@ -74,12 +73,10 @@ def get_pkg_config(use_preloading=False, use_prefix=False):
"""
extralib = ""
if sys.platform == "win32":
machine = platform.machine().lower()
if machine != "arm64":
extralib = "-defaultlib:advapi32 -lgfortran -lquadmath"
extralib = "-defaultlib:advapi32"
libs_flags = f"-L${{libdir}} -l{get_library()}"
else:
extralib = f"-lm -lpthread -lgfortran -lquadmath -L${{libdir}} -l{get_library()}"
extralib = f"-lm -lpthread -L${{libdir}} -l{get_library()}"
if use_preloading:
libs_flags = ""
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "scipy-openblas64"
# 0.3.34-481-g5137bb62
version = "0.3.34.481.3"
version = "0.3.34.481.4"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
Loading
Loading