Skip to content

Punchboot-tool merge #39

Punchboot-tool merge

Punchboot-tool merge #39

name: Build punchboot-tools
# push
on: [pull_request]
env:
LIBWDI_TAG: v1.5.0
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB0_URL: https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.7.3/libusb-win32-bin-1.2.7.3.zip/download
LIBUSBK_URL: https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z
SOLUTION_FILE_PATH: ./libwdi/libwdi.sln
BUILD_MACROS: '"WDK_DIR=\"../../wdk/Windows Kits/8.0\";LIBUSB0_DIR=\"../../libusb0\";LIBUSBK_DIR=\"../../libusbk/bin\""'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-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
git clone https://github.com/pbatard/libwdi.git --depth 1 --branch ${{ env.LIBWDI_TAG }}
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
curl -L ${{ env.LIBUSB0_URL }} -o libusb0-redist.zip
curl -L ${{ env.LIBUSBK_URL }} -o libusbk-redist.7z
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
7z x libusb0-redist.zip
7z x libusbk-redist.7z
del *.zip
del *.7z
move libusb-win32* libusb0
move libusbK* libusbk
- if: startsWith(matrix.os, 'windows') == true
name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- if: startsWith(matrix.os, 'windows') == true
name: Build libwdi
shell: cmd
run: |
msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=Release,Platform=x64,BuildMacros=${{ env.BUILD_MACROS }} /targets
dir /A-D /S /B libwdi
- 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