-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
157 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Replicate the workflow from posix.yml locally on posix | ||
# This may bitrot, compare it to the original file before using | ||
|
||
|
||
# Set extra env | ||
if [ "uname -m" == "x86_64" ]; then | ||
export TRAVIS_OS_NAME=ubuntu-latest | ||
export PLAT=x86_64 | ||
# export PLAT=i86 | ||
DOCKER_TEST_IMAGE=multibuild/xenial_${PLAT} | ||
else | ||
export TRAVIS_OS_NAME=osx | ||
export LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" | ||
export LIBRARY_PATH="-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" | ||
export PLAT=x86_64 | ||
# export PLAT=arm64 | ||
export SUFFIX=gf_c469a42 | ||
|
||
fi | ||
export REPO_DIR=OpenBLAS | ||
export OPENBLAS_COMMIT="c2f4bdb" | ||
|
||
# export MB_ML_LIBC=musllinux | ||
# export MB_ML_VER=_1_1 | ||
# export MB_ML_VER=2014 | ||
export INTERFACE64=1 | ||
|
||
function install_virtualenv { | ||
# Install VirtualEnv | ||
python3 -m pip install --upgrade pip | ||
pip install virtualenv | ||
} | ||
|
||
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 | ||
clang --version | ||
fi | ||
source travis-ci/build_steps.sh | ||
echo "------ BEFORE BUILD ---------" | ||
before_build | ||
if [[ "$NIGHTLY" = "true" ]]; then | ||
echo "------ CLEAN CODE --------" | ||
clean_code $REPO_DIR develop | ||
echo "------ BUILD LIB --------" | ||
build_lib "$PLAT" "$INTERFACE64" "1" | ||
else | ||
echo "------ CLEAN CODE --------" | ||
clean_code $REPO_DIR $OPENBLAS_COMMIT | ||
echo "------ BUILD LIB --------" | ||
build_lib "$PLAT" "$INTERFACE64" "0" | ||
fi | ||
} | ||
|
||
# install_virtualenv | ||
# build_openblas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set -xe | ||
ls libs/openblas* >/dev/null 2>&1 && true | ||
if [ "$?" != "0" ]; then | ||
# inside docker | ||
cd /openblas | ||
fi | ||
|
||
mkdir -p local/openblas | ||
# This will fail if there is more than one file in libs | ||
tar -C local/openblas --strip-components=2 -xf libs/openblas*.tar.gz | ||
|
||
# do not package the static libs and symlinks, only take the shared object | ||
find local/openblas/lib -maxdepth 1 -type l -delete | ||
rm local/openblas/lib/*.a | ||
|
||
mv local/openblas/lib/libopenblas* local/openblas/lib/libopenblas_python.so | ||
patchelf --set-soname libopenblas_python.so local/openblas/lib/libopenblas_python.so | ||
python3.7 -m pip install wheel auditwheel | ||
python3.7 -m pip wheel -w /tmp/wheelhouse -vv . | ||
auditwheel repair -w dist/ /tmp/wheelhouse/openblas-*.whl |