Skip to content

Commit

Permalink
Merge pull request #169 from mattip/travis
Browse files Browse the repository at this point in the history
fix CI
  • Loading branch information
mattip authored Jul 30, 2024
2 parents 20c179a + df90548 commit 35b5f6a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 20 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
REPO_DIR: OpenBLAS
OPENBLAS_COMMIT: "0929865"
OPENBLAS_COMMIT: "d11e7340"
MACOSX_DEPLOYMENT_TARGET: 10.9

jobs:
Expand Down Expand Up @@ -45,6 +45,26 @@ jobs:
INTERFACE64: '0'
MB_ML_LIBC: musllinux
MB_ML_VER: _1_1

# - os: ubuntu-latest
# PLAT: aarch64
# INTERFACE64: '0'
# MB_ML_VER: '2014'
# - os: ubuntu-latest
# PLAT: aarch64
# INTERFACE64: '1'
# MB_ML_VER: '2014'
# - os: ubuntu-latest
# PLAT: aarch64
# INTERFACE64: '0'
# MB_ML_LIBC: musllinux
# MB_ML_VER: _1_1
# - os: ubuntu-latest
# PLAT: aarch64
# INTERFACE64: '1'
# MB_ML_LIBC: musllinux
# MB_ML_VER: _1_1

exclude:
- PLAT: i686
os: macos-13
Expand Down Expand Up @@ -78,6 +98,13 @@ jobs:
with:
xcode-version: '14.3'

- name: Allow docker with qemu
if: ${{ matrix.PLAT == 'aarch64' }}
run: |
sudo apt-get update -q -y
sudo apt-get -qq install -y qemu qemu-user-static
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- name: Print some Environment variable
run: |
echo "PLAT: ${PLAT}"
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: "0929865"
OPENBLAS_COMMIT: "d11e7340"
OPENBLAS_ROOT: "c:\\opt"
# Preserve working directory for calls into bash
# Without this, invoking bash will cd to the home directory
Expand Down
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ env:
global:
# The archive that gets built has name from ``git describe`` on this
# commit.
- OPENBLAS_COMMIT: "0929865"
- OPENBLAS_COMMIT: "d11e7340"
- REPO_DIR=OpenBLAS

sudo: required
Expand Down Expand Up @@ -85,14 +85,7 @@ install:
script:
# Build library and collect into libs subdirectory
- |
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
travis wait build_lib "$PLAT" "$INTERFACE64" 1
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
else
travis wait build_lib "$PLAT" "$INTERFACE64" 0
fi
- travis_wait 30 build_on_travis
- libc=${MB_ML_LIBC:-manylinux}
- docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT}
- docker run --rm -e INTERFACE64="${INTERFACE64}" -e MB_ML_LIBC="${MB_ML_LIBC}" -v $(pwd):/openblas "${docker_image}" /bin/bash -xe /openblas/tools/build_wheel.sh
Expand Down
4 changes: 2 additions & 2 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.27-341-g09298658
version = "0.3.27.341.0"
# v0.3.27-350-gd11e7340
version = "0.3.27.350.0"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
31 changes: 24 additions & 7 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ function do_build_lib {
local suffix=$2
local interface64=$3
local nightly=$4
echo "Building with settings: '$plat' '$suffix' '$interface64'"
case $(get_os)-$plat in
Linux-x86_64)
local bitness=64
Expand Down Expand Up @@ -169,21 +168,29 @@ function do_build_lib {
esac
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ LIBNAMEPREFIX=scipy_ FIXED_LIBNAME=1"
mkdir -p libs
start_spinner
set -x
git config --global --add safe.directory '*'
pushd OpenBLAS
patch_source
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
BINARY=$bitness $interface_flags $target_flags shared > /dev/null
echo start building
if [ -v dynamic_list ]; then
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
DYNAMIC_LIST="$dynamic_list" \
BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null
else
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null
fi
echo done building, now testing
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
BINARY=$bitness $interface_flags $target_flags tests
make PREFIX=$BUILD_PREFIX $interface_flags install
popd
stop_spinner
if [ "$nightly" = "1" ]; then
local version="HEAD"
else
Expand Down Expand Up @@ -213,3 +220,13 @@ function do_build_lib {
$BUILD_PREFIX/lib/pkgconfig/scipy-openblas* \
$BUILD_PREFIX/lib/cmake/openblas
}

function build_on_travis {
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
build_lib "$PLAT" "$INTERFACE64" 1
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
else
build_lib "$PLAT" "$INTERFACE64" 0
fi
}

0 comments on commit 35b5f6a

Please sign in to comment.