Skip to content

Punchboot-tool merge #62

Punchboot-tool merge

Punchboot-tool merge #62

name: Build punchboot-tools
# push
on: [pull_request]
env:
PYTHON_VERSION: "3.12"
LIBUSB_MACOS_ARM64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:ab90516396d8dc99f96d31615bcbddfcfd2082fcc7494dabb9d22b275628e800"
LIBUSB_MACOS_X86_64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:e79be7d4c611f0017567172771761b1df62d140e79ffa6d2538577eb24a48e44"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- if: startsWith(matrix.os, 'windows') == true
name: Windows deps
shell: cmd
run: |
vcpkg install
- if: startsWith(matrix.os, 'macos') == true
name: macos deps
run: |
curl -L -H "Authorization: Bearer QQ==" -o libusb_arm64.tar.gz ${LIBUSB_MACOS_ARM64_URL}
curl -L -H "Authorization: Bearer QQ==" -o libusb_x86_64.tar.gz ${LIBUSB_MACOS_X86_64_URL}
mkdir libusb_x86_64 && tar xf libusb_x86_64.tar.gz -C libusb_x86_64 --strip-components 1
mkdir libusb_arm64 && tar xf libusb_arm64.tar.gz -C libusb_arm64 --strip-components 1
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_x86_64/1.0.26/lib/libusb-1.0.0.dylib
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_arm64/1.0.26/lib/libusb-1.0.0.dylib
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
with:
package-dir: .
output-dir: wheelhouse
config-file: "pyproject.toml"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl