Skip to content

Commit

Permalink
Merge pull request #13 from sameeul/update_pypi
Browse files Browse the repository at this point in the history
update pypi publish workflow
  • Loading branch information
sameeul authored Mar 13, 2024
2 parents 3faeb7f + 8fb7a32 commit 330ee9f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,60 @@ jobs:
- 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.PYPI_TOKEN }}
TWINE_REPOSITORY: pypi

build_wheels_apple_arm64:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
strategy:
matrix:
os: [macos-13-xlarge]
cibw_archs: ["arm64"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*"]

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

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

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delocate wheel
- name: Building wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_BUILD_VERBOSITY: 3
CIBW_ARCHS_MACOS: arm64
CIBW_BEFORE_ALL_MACOS: brew install nasm libjpeg-turbo &&
brew install llvm@16 &&
sudo xcode-select -s /Applications/Xcode_14.2.app &&
bash ci-utils/install_prereq_linux.sh &&
mkdir -p /tmp/argolid_bld &&
cp -r local_install /tmp/argolid_bld

CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/argolid_bld/local_install/lib:/tmp/argolid_bld/local_install/lib64" ON_GITHUB="TRUE" ARGOLID_DEP_DIR="/tmp/argolid_bld/local_install" CMAKE_ARGS="-DTENSORSTORE_USE_SYSTEM_JPEG=ON"
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: bfio==2.3.2 tensorstore
CIBW_TEST_COMMAND: python -W default -m unittest discover -s {project}/tests -v

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

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

0 comments on commit 330ee9f

Please sign in to comment.