Skip to content

Commit

Permalink
Merge pull request PolusAI#204 from sameeul/v074
Browse files Browse the repository at this point in the history
V074 - fix apple wheel and cuda wheels publication
  • Loading branch information
sameeul authored Feb 12, 2024
2 parents cf2a627 + ff24d2d commit ef67196
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_cuda11_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ jobs:
run: python -m twine upload dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY_CUDA11 }}
TWINE_REPOSITORY: pypi
2 changes: 1 addition & 1 deletion .github/workflows/publish_cuda12_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ jobs:
run: python -m twine upload dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY_CUDA12 }}
TWINE_REPOSITORY: pypi
71 changes: 3 additions & 68 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,6 @@ on:
workflow_dispatch:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-latest]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]

steps:
- uses: actions/checkout@v3
name: Check out
with:
submodules: recursive

- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
- name: Building wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: "*musllinux*"
CIBW_BUILD_VERBOSITY: 3
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_MACOS: brew install llvm@16 &&
bash ci-utils/install_prereq_linux.sh --build_arrow yes &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
CIBW_BEFORE_ALL_LINUX: yum install -y llvm libevent-devel openssl-devel &&
bash ci-utils/install_arrow_yum.sh &&
bash ci-utils/install_prereq_linux.sh --build_arrow no &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
CIBW_BEFORE_ALL_WINDOWS: ci-utils\install_prereq_win.bat &&
xcopy /E /I /y local_install C:\TEMP\nyxus_bld\local_install
CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64" ON_GITHUB="TRUE" PATH="$(brew --prefix llvm@16)/bin:$PATH" COMPILER="/usr/local/opt/llvm@16/bin/clang++" CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm@16/include" CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm@16/include" LDFLAGS="-L /usr/local/lib -L/usr/local/opt/llvm@16/lib -Wl,-rpath,/usr/local/opt/llvm@16/lib" CXX="/usr/local/opt/llvm@16/bin/clang++" CC="/usr/local/opt/llvm@16/bin/clang" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/nyxus_bld/local_install/lib:/tmp/nyxus_bld/local_install/lib64:$LD_LIBRARY_PATH" ON_GITHUB="TRUE" NYXUS_DEP_DIR="/tmp/nyxus_bld/local_install"
CIBW_ENVIRONMENT_WINDOWS: PATH="$TEMP\\nyxus\\bin;$PATH" ON_GITHUB="TRUE" NYXUS_DEP_DIR="C:\\TEMP\\nyxus_bld\\local_install"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio
CIBW_TEST_COMMAND: pytest {project}/tests/python

- name: Install Dependencies
run: python -m pip install --upgrade twine requests

- name: Publish to PyPi
run: python -m twine upload dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
TWINE_REPOSITORY: pypi


build_wheels_apple_arm64:
Expand All @@ -97,7 +31,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
python -m pip install cibuildwheel==2.16.2 delocate wheel
- name: Building wheels
run: |
Expand All @@ -107,6 +41,7 @@ jobs:
CIBW_BUILD_VERBOSITY: 3
CIBW_ARCHS_MACOS: arm64
CIBW_BEFORE_ALL_MACOS: brew install llvm@16 &&
sudo xcode-select -s /Applications/Xcode_14.2.app &&
bash ci-utils/install_prereq_linux.sh --build_arrow yes &&
mkdir -p /tmp/nyxus_bld &&
cp -r local_install /tmp/nyxus_bld
Expand All @@ -115,7 +50,7 @@ jobs:
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: numpy pandas pyarrow pytest bfio
CIBW_TEST_COMMAND: pytest {project}/tests/python
CIBW_TEST_COMMAND: pytest -vv {project}/tests/python

- name: Publish to PyPi
run: python -m twine upload dist/*.whl
Expand Down

0 comments on commit ef67196

Please sign in to comment.