Skip to content

Commit

Permalink
Merge pull request #172 from mattip/updates
Browse files Browse the repository at this point in the history
patch v0.3.27.44 with fixes from HEAD
  • Loading branch information
mattip authored Aug 8, 2024
2 parents fff9822 + 86f85ae commit 15c6999
Show file tree
Hide file tree
Showing 7 changed files with 748 additions and 46 deletions.
53 changes: 42 additions & 11 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11]
os: [ubuntu-latest, macos-13]
PLAT: [i686, x86_64]
INTERFACE64: ['0', '1']
MB_ML_VER: ['2014']
MB_ML_LIBC: ['manylinux']
include:
- os: macos-11
- os: macos-13
PLAT: arm64
INTERFACE64: '1'
- os: macos-11
- os: macos-13
PLAT: arm64
INTERFACE64: '0'
- os: ubuntu-latest
Expand All @@ -42,9 +42,29 @@ 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-11
os: macos-13
- PLAT: i686
INTERFACE64: '1'
env:
Expand Down Expand Up @@ -78,6 +98,19 @@ jobs:
# else
# fi
echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV;
- uses: maxim-lobanov/setup-xcode@v1.6.0
if: ${{ matrix.os == 'macos-13' }}
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 All @@ -89,11 +122,6 @@ jobs:
- name: Build OpenBLAS
run: |
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
clang --version
fi
source tools/build_steps.sh
echo "------ BEFORE BUILD ---------"
before_build
Expand All @@ -116,7 +144,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-11" == "${{ matrix.os }}" ]; then
if [ "macos-13" == "${{ matrix.os }}" ]; then
source tools/build_wheel.sh
else
libc=${MB_ML_LIBC:-manylinux}
Expand All @@ -138,9 +166,12 @@ jobs:
name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}
path: libs/openblas*.tar.gz

- uses: conda-incubator/setup-miniconda@v3.0.1
- uses: conda-incubator/setup-miniconda@v3.0.4
with:
channels: conda-forge
channel-priority: true
activate-environment: upload
miniforge-version: latest

- name: Upload
# see https://github.com/marketplace/actions/setup-miniconda for why
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ jobs:
echo "PLAT=i686" >> $env:GITHUB_ENV
echo "WHEEL_PLAT=win32" >> $env:GITHUB_ENV
echo "MSYSTEM=MINGW32" >> $env:GITHUB_ENV
echo "LDFLAGS=-static -static-libgcc" >> $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" >> $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" ) {
Expand Down
15 changes: 15 additions & 0 deletions patches-windows/openblas-make-libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/exports/Makefile b/exports/Makefile
index 668a4866e..956b51bf4 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -126,8 +126,9 @@ dll : ../$(LIBDLLNAME)
../$(LIBDLLNAME) : ../$(LIBNAME) $(LIBPREFIX).def dllinit.$(SUFFIX)
$(RANLIB) ../$(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBPREFIX).def dllinit.$(SUFFIX) \
- -shared -o ../$(LIBDLLNAME) -Wl,--out-implib,../$(IMPLIBNAME) \
+ -shared -o ../$(LIBDLLNAME) -Wl,-gc-sections -Wl,-s -Wl,-Map,output.map \
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) $(EXTRALIB)
+ dlltool -D $(LIBDLLNAME) -d $(LIBPREFIX).def -l ../$(LIBDLLNAME).a

$(LIBPREFIX).def : $(GENSYM)
./$(GENSYM) win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
Loading

0 comments on commit 15c6999

Please sign in to comment.