Skip to content

Commit

Permalink
reduce manylinux builds, fix wheel building/testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Aug 16, 2023
1 parent 0570403 commit b9d2f8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,27 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11]
platform: [x64]
PLAT: [i686, x86_64]
INTERFACE64: ['0', '1']
MB_ML_VER: ['', 2010, 2014]
MB_ML_VER: [2014]
include:
- os: macos-11
PLAT: arm64
INTERFACE64: '1'
platform: [x64]
- os: macos-11
PLAT: arm64
INTERFACE64: '0'
platform: [x64]
- os: ubuntu-latest
PLAT: x86_64
INTERFACE64: '1'
MB_ML_LIBC: musllinux
MB_ML_VER: _1_1
platform: x64
- os: ubuntu-latest
PLAT: x86_64
INTERFACE64: '0'
MB_ML_LIBC: musllinux
MB_ML_VER: _1_1
platform: [x64]
exclude:
- os: macos-11
PLAT: i686
- os: macos-11
MB_ML_VER: 2010
- os: macos-11
MB_ML_VER: 2014
- PLAT: i686
Expand Down Expand Up @@ -78,7 +69,6 @@ jobs:
- name: Set extra env
run: |
if [ "macos-11" == "${{ matrix.os }}" ]; then
ls /Library/Developer/CommandLineTools/SDKs
echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV;
echo "LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" >> $GITHUB_ENV;
echo "LIBRARY_PATH=-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" >> $GITHUB_ENV;
Expand Down Expand Up @@ -118,25 +108,17 @@ jobs:
build_lib "$PLAT" "$INTERFACE64" "0"
fi
- name: Build wheel
- name: Build and test wheel
run: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install patchelf
source travis-ci/build_wheel.sh
else
docker run --rm -v $(pwd):/openblas quay.io/pypa/manylinux2014_${PLAT} /bin/bash -xe /openblas/travis-ci/build_wheel.sh
libc=${MB_ML_LIBC:-manylinux}
docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT}
docker run --rm -v $(pwd):/openblas docker_image /bin/bash -xe /openblas/travis-ci/build_wheel.sh
fi
- name: Setup different python to test wheel
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Test wheel
run: |
python -m pip install --no-index --find-links dist openblas
python -m openblas
- uses: actions/upload-artifact@v3
with:
path: libs/openblas*.tar.gz
Expand Down
4 changes: 4 additions & 0 deletions travis-ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ patchelf --set-soname libopenblas_python.so local/openblas/lib/libopenblas_pytho
python3.7 -m pip install wheel auditwheel
python3.7 -m pip wheel -w /tmp/wheelhouse -vv .
auditwheel repair -w dist/ /tmp/wheelhouse/openblas-*.whl

# Test that the wheel works with a different python
python3.11 -m pip install --no-index --find-links dist openblas
python3.11 -m openblas

0 comments on commit b9d2f8c

Please sign in to comment.