Skip to content
Open
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
19 changes: 15 additions & 4 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- cron: '0 0 * * 0'

env:
OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb"
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
MACOSX_DEPLOYMENT_TARGET: 10.9

jobs:
Expand Down Expand Up @@ -39,12 +39,16 @@ jobs:

- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux}

- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux}
- { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux}

- { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}

- { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}
- { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux}

env:
NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }}
Expand All @@ -70,6 +74,12 @@ jobs:
with:
xcode-version: '15.4'

- name: Set up QEMU
if: matrix.PLAT == 'ppc64le' || matrix.PLAT == 's390x'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Print some Environment variable
run: |
echo "PLAT: ${PLAT}"
Expand All @@ -81,7 +91,8 @@ jobs:
# limit-access-to-actor: true

- name: Build and Test wheels
uses: pypa/cibuildwheel@v3.1.4
uses: pypa/cibuildwheel@v3.3.0
timeout-minutes: 60
with:
output-dir: dist
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb"
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
OPENBLAS_ROOT: "c:\\opt"
# Preserve working directory for calls into bash
# Without this, invoking bash will cd to the home directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch: null

env:
OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb"
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
OPENBLAS_ROOT: "c:\\opt"
# Preserve working directory for calls into bash
# Without this, invoking bash will cd to the home directory
Expand Down
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion OpenBLAS
4 changes: 3 additions & 1 deletion ci-before-build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash


# Most of the content in this file comes from https://github.com/multi-build/multibuild, with some modifications
# Most of the content in this file comes from https://github.com/multi-build/multibuild, with some modifications
# Follow the license below


Expand Down Expand Up @@ -87,6 +87,8 @@ else
# Default Manylinux version
MB_ML_VER=${MB_ML_VER:-2014}
fi
./tools/install-static-clang.sh
export PATH=/opt/clang/bin:$PATH
fi

# Work round bug in travis xcode image described at
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ build-backend = "setuptools.build_meta"

[project]
name = "scipy-openblas64"
# v0.3.30-349-gf6df9beb
version = "0.3.30.349.0"
# v0.3.30-359-g29fab2b9
version = "0.3.30.359.0"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down Expand Up @@ -43,7 +43,7 @@ scipy_openblas64 = ["lib/*", "include/*", "lib/pkgconfig/*", "lib/cmake/openblas
[tool.cibuildwheel]
before-build = "bash ci-before-build.sh"
repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}"
test-command = "cd {package} && bash ci-test.sh "
test-command = "cd {package} && bash ci-test.sh"
environment-pass = [
"OPENBLAS_COMMIT",
"MACOSX_DEPLOYMENT_TARGET",
Expand All @@ -54,4 +54,7 @@ environment-pass = [
"BUILD_DIR",
"PLAT",
"OS-NAME",
"RUNNER_ARCH",
]
[tool.cibuildwheel.linux]
environment = { CC = "/opt/clang/bin/clang", CXX = "/opt/clang/bin/clang++", LDFLAGS = "-fuse-ld=lld" }
17 changes: 11 additions & 6 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function clean_code {
echo after git fetch origin
git checkout $build_commit
echo after git checkout $build_commit
git clean -fxd
git clean -fxd
echo after git clean
git submodule update --init --recursive
echo after git submodule update
Expand Down Expand Up @@ -171,11 +171,6 @@ EOF
Linux-aarch64)
local bitness=64
local target="ARMV8"
# manylinux2014 image uses gcc-10, which miscompiles ARMV8SVE and up
if [ "$MB_ML_VER" == "2014" ]; then
echo setting DYNAMIC_LIST for manylinux2014 to ARMV8 only
local dynamic_list="ARMV8"
fi
;;
Darwin-arm64)
local bitness=64
Expand All @@ -186,7 +181,10 @@ EOF
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
;;
*-s390x)
# The TargetList.txt has only ZARCH_GENERIC, Z13, Z14. Not worth
# messing with dynamic lists.
local bitness=64
local target="ZARCH_GENERIC"
;;
*-ppc64le)
local bitness=64
Expand Down Expand Up @@ -222,6 +220,13 @@ EOF
echo -n > utest/test_dsdot.c
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
elif [ "$plat" == "s390x" ]; then
sed -i 's/CTEST(samin, positive_step_1_N_70){/CTEST_SKIP(samin, positive_step_1_N_70){/g' ./utest/test_extensions/test_samin.c
sed -i 's/CTEST(samin, negative_step_1_N_70){/CTEST_SKIP(samin, negative_step_1_N_70){/g' ./utest/test_extensions/test_samin.c
sed -i 's/CTEST(damin, positive_step_1_N_70){/CTEST_SKIP(damin, positive_step_1_N_70){/g' ./utest/test_extensions/test_damin.c
sed -i 's/CTEST(damin, negative_step_1_N_70){/CTEST_SKIP(damin, negative_step_1_N_70){/g' ./utest/test_extensions/test_damin.c
echo "the utest samin/damin have been temporarily disabled."
echo "QEMU does not support the 'lper' /'lpdr' instructions used"
fi
if [ -n "$dynamic_list" ]; then
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
Expand Down
90 changes: 90 additions & 0 deletions tools/install-static-clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/bash

# Stop at any error, show all commands
set -exuo pipefail

TOOLCHAIN_PATH=/opt/clang

# Download static-clang
DEFAULT_ARCH="$(uname -m)"
if [ "${STATIC_CLANG_ARCH:-}" == "" ]; then
STATIC_CLANG_ARCH="${RUNNER_ARCH:-${DEFAULT_ARCH}}"
fi
case "${STATIC_CLANG_ARCH}" in
ARM64|aarch64|arm64|arm64/*) GO_ARCH=arm64;;
ARM|armv7l|armv8l|arm|arm/v7) GO_ARCH=arm;; # assume arm/v7 for arm
X64|x86_64|amd64|amd64/*) GO_ARCH=amd64;;
X86|i686|386) GO_ARCH=386;;
ppc64le) GO_ARCH=ppc64le;;
riscv64) GO_ARCH=riscv64;;
s390x) GO_ARCH=s390x;;
*) echo "No static-clang toolchain for ${CLANG_ARCH}">2; exit 1;;
esac
STATIC_CLANG_VERSION=21.1.6.0
STATIC_CLANG_FILENAME="static-clang-linux-${GO_ARCH}.tar.xz"
STATIC_CLANG_URL="https://github.com/mayeut/static-clang-images/releases/download/v${STATIC_CLANG_VERSION}/${STATIC_CLANG_FILENAME}"
pushd /tmp
cat<<'EOF' | grep "${STATIC_CLANG_FILENAME}" > "${STATIC_CLANG_FILENAME}.sha256"
3f92a131d27ca606dae8230550236a0c897a7f5990d61a293814e0abea8d0e1f static-clang-linux-386.tar.xz
3fc6a3500cb9514b2c3af6d4a95676842769c301f872b6cea8c15576a64e756c static-clang-linux-amd64.tar.xz
82ea0c148ec75f72a2f6f61cc877561efe9675c6e59a1a2c4d130f088f9dc868 static-clang-linux-arm.tar.xz
9b5ad28877b6d56aff530164f7f88590e5d3441a1fddd7a73370539783056120 static-clang-linux-arm64.tar.xz
2adccbcad99d033222c8a63872739919375a7aef2339ce2e8ab7dcfc938502b1 static-clang-linux-loong64.tar.xz
5f551911ad73ecbbcf278e6d05a04bc68bd0dc4918a6a145352072f7734959c6 static-clang-linux-ppc64le.tar.xz
90f5beda1004bec124607df1f9fc0a70c2b9f382b82ab1db2703ebd131c920ef static-clang-linux-riscv64.tar.xz
e4047765a5e64bace4be36f6aae4d859e96bc1298d3ff5ba6b7d6100ea7d23f7 static-clang-linux-s390x.tar.xz
EOF
curl -fsSLO "${STATIC_CLANG_URL}"
sha256sum -c "${STATIC_CLANG_FILENAME}.sha256"
tar -C /opt -xf "${STATIC_CLANG_FILENAME}"
popd

# configure target triple
case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in
manylinux*-armv7l) TARGET_TRIPLE=armv7-unknown-linux-gnueabihf;;
musllinux*-armv7l) TARGET_TRIPLE=armv7-alpine-linux-musleabihf;;
manylinux*-ppc64le) TARGET_TRIPLE=powerpc64le-unknown-linux-gnu;;
musllinux*-ppc64le) TARGET_TRIPLE=powerpc64le-alpine-linux-musl;;
manylinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-unknown-linux-gnu;;
musllinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-alpine-linux-musl;;
esac
case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in
*-riscv64) M_ARCH="-march=rv64gc";;
*-x86_64) M_ARCH="-march=x86-64";;
*-armv7l) M_ARCH="-march=armv7a";;
manylinux*-i686) M_ARCH="-march=k8 -mtune=generic";; # same as gcc manylinux2014 / manylinux_2_28
musllinux*-i686) M_ARCH="-march=pentium-m -mtune=generic";; # same as gcc musllinux_1_2
esac
GCC_TRIPLE=$(gcc -dumpmachine)

cat<<EOF >"${TOOLCHAIN_PATH}/bin/${AUDITWHEEL_PLAT}.cfg"
-target ${TARGET_TRIPLE}
${M_ARCH:-}
--gcc-toolchain=${DEVTOOLSET_ROOTPATH:-}/usr
--gcc-triple=${GCC_TRIPLE}
EOF

cat<<EOF >"${TOOLCHAIN_PATH}/bin/clang.cfg"
@${AUDITWHEEL_PLAT}.cfg
EOF

cat<<EOF >"${TOOLCHAIN_PATH}/bin/clang++.cfg"
@${AUDITWHEEL_PLAT}.cfg
EOF

cat<<EOF >"${TOOLCHAIN_PATH}/bin/clang-cpp.cfg"
@${AUDITWHEEL_PLAT}.cfg
EOF

# override entrypoint to add the toolchain to PATH
mv /usr/local/bin/manylinux-entrypoint /usr/local/bin/manylinux-entrypoint-org
cat<<EOF >/usr/local/bin/manylinux-entrypoint
#!/bin/bash

set -eu

export PATH="${TOOLCHAIN_PATH}/bin:\${PATH}"
exec /usr/local/bin/manylinux-entrypoint-org "\$@"
EOF

chmod +x /usr/local/bin/manylinux-entrypoint
Loading