diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 569d8e9..14acda9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,6 +1,7 @@ -name: wheels +name: Build and publish wheels on: + push: workflow_dispatch: release: types: [published] @@ -30,14 +31,10 @@ jobs: name: sdist path: dist/*.tar.gz - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + build_wheels_windows: + name: Build wheels on windows-latest + runs-on: windows-latest needs: [build_sdist] - strategy: - fail-fast: false - matrix: - os: [windows-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -48,11 +45,54 @@ jobs: uses: pypa/cibuildwheel@v3.4.0 env: CIBW_TEST_SKIP: "*" - CIBW_SKIP: "pp* cp3*t-*" + CIBW_ARCHS_WINDOWS: "AMD64 x86" - uses: actions/upload-artifact@v4 with: - name: ${{ matrix.os }} + name: windows + path: ./wheelhouse/*.whl + retention-days: 1 + + build_wheels_windows_arm64: + name: Build wheels on windows-11-arm + runs-on: windows-11-arm + needs: [build_sdist] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build wheels + uses: pypa/cibuildwheel@v3.4.0 + env: + CIBW_TEST_SKIP: "*" + CIBW_ARCHS_WINDOWS: "ARM64" + + - uses: actions/upload-artifact@v4 + with: + name: windows-arm64 + path: ./wheelhouse/*.whl + retention-days: 1 + + build_wheels_macos: + name: Build wheels on macos-latest + runs-on: macos-latest + needs: [build_sdist] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build wheels + uses: pypa/cibuildwheel@v3.4.0 + env: + CIBW_TEST_SKIP: "*" + + - uses: actions/upload-artifact@v4 + with: + name: macos-latest path: ./wheelhouse/*.whl retention-days: 1 @@ -75,7 +115,7 @@ jobs: uses: pypa/cibuildwheel@v3.4.0 env: CIBW_TEST_SKIP: "*" - CIBW_SKIP: "pp* cp3*t-* *-musllinux*" + CIBW_SKIP: "*-musllinux*" - uses: actions/upload-artifact@v4 with: @@ -86,7 +126,7 @@ jobs: publish: if: github.event_name == 'release' name: Publish to PyPI - needs: [build_sdist, build_wheels, build_manylinux_wheels_ubuntu] + needs: [build_sdist, build_wheels_windows, build_wheels_windows_arm64, build_wheels_macos, build_manylinux_wheels_ubuntu] runs-on: ubuntu-latest permissions: id-token: write diff --git a/CMakeLists.txt b/CMakeLists.txt index 7897604..68a4e95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.32) project(ark_fbs_python LANGUAGES CXX) option(ARK_FBS_VENDOR_FLATBUFFERS "Build with vendored flatbuffers source" ON) diff --git a/pyproject.toml b/pyproject.toml index dd80b3e..54f908d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,13 +17,10 @@ classifiers = [ "Bug Tracker" = "https://github.com/MooncellWiki/ArkFBS/issues" [dependency-groups] -dev = [ - "ruff >=0.15.0, <0.16.0", - "pre-commit >=4.0.0, <5.0.0", -] +dev = ["ruff >=0.15.0, <0.16.0", "pre-commit >=4.0.0, <5.0.0"] [tool.scikit-build] -cmake.version = ">=3.15" +cmake.version = ">=3.32" cmake.build-type = "Release" wheel.packages = ["src/ark_fbs"] @@ -40,8 +37,5 @@ archs = ["x86_64", "arm64"] archs = ["AMD64", "x86", "ARM64"] [build-system] -requires = [ - "scikit-build-core >=0.12", - "pybind11 >=3.0", -] -build-backend = "scikit_build_core.build" \ No newline at end of file +requires = ["scikit-build-core >=0.12", "pybind11 >=3.0"] +build-backend = "scikit_build_core.build"