From f023f12faccb7286f3a5e4cdcc29779c8bdb5c24 Mon Sep 17 00:00:00 2001 From: kingbri Date: Sat, 3 Aug 2024 17:23:02 -0400 Subject: [PATCH] Actions: Add windows build Signed-off-by: kingbri --- .github/workflows/windows.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..fe1d3f31 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,61 @@ +name: PyPi wheels + +on: + workflow_dispatch: + + +jobs: + buildWin: + if: startsWith(github.ref, 'refs/tags/20') + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest] + architecture: ['x64'] + include: + # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip + - os: windows-latest + skip: "*win32 pp*" + + name: ${{ matrix.os }} ${{ matrix.architecture}} + env: + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}" + CIBW_BEFORE_ALL: "pip install cython" + CIBW_SKIP: ${{ matrix.skip }} + CIBW_ARCHS_LINUX: ${{ matrix.linux_archs }} + CIBW_TEST_SKIP: "*" + CIBW_BEFORE_TEST: "git status" + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Add msbuild to PATH + if: runner.os == 'Windows' + uses: microsoft/setup-msbuild@v2 + + - name: delvewheel install + if: runner.os == 'Windows' + run: | + python -m pip install delvewheel cython + + - name: Build wheels + uses: joerick/cibuildwheel@v2.18.1 + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + name: wheels