From 486900df1e38252c6c7f7c41c08ffa7e2fb77148 Mon Sep 17 00:00:00 2001 From: Jonas Blixt Date: Tue, 28 Nov 2023 21:01:34 +0100 Subject: [PATCH] ci: cibuildwheel setup --- .github/workflows/punchboot-tools.yml | 25 +++++++++++++++++++++++++ pyproject.toml | 5 +++++ setup.py | 1 + 3 files changed, 31 insertions(+) create mode 100644 .github/workflows/punchboot-tools.yml diff --git a/.github/workflows/punchboot-tools.yml b/.github/workflows/punchboot-tools.yml new file mode 100644 index 00000000..397d2316 --- /dev/null +++ b/.github/workflows/punchboot-tools.yml @@ -0,0 +1,25 @@ +name: Build punchboot-tools + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, windows-2022] + + steps: + - uses: actions/checkout@v4 + + - 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 diff --git a/pyproject.toml b/pyproject.toml index 3dbcb6fd..2fd7aff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,3 +26,8 @@ exclude = [ "^doc.*", "^scripts/menuconfig\\.py$" ] + +[tool.cibuildwheel.linux] +before-all = "yum install -y libusbx-devel" +skip = "*-manylinux_i686 pp* *-musllinux*" +archs = ["auto"] diff --git a/setup.py b/setup.py index 60c7e158..cd30f0e1 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ package_data={ "punchboot": ["py.typed"], }, + python_requires=">=3.8", entry_points={"console_scripts": ["punchboot=punchboot.__main__:cli"]}, ext_modules=[ Extension(