Skip to content

Commit

Permalink
Try building on Windows only
Browse files Browse the repository at this point in the history
  • Loading branch information
bindreams committed Apr 20, 2024
1 parent eaf4d61 commit 9519927
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,39 @@ name: Build
on: [workflow_dispatch]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
build-windows:
name: Build wheels on Windows
runs-on: windows-latest
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Setup vcpkg package manager
run: |
mkdir .cache
git clone https://github.com/microsoft/vcpkg --branch 2024.03.25 .cache/vcpkg
.cache/vcpkg/bootstrap-vcpkg.bat
- name: Install cibuildwheel
run: pip install cibuildwheel==2.17.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: pp* *-win32
CMAKE_TOOLCHAIN_FILE: .cache/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: x64-windows-static

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
name = "zint"
version = "0.1.0"
description="A minimal example package (with pybind11)"
requires-python = ">=3.8"
dependencies = [
"numpy"
]

[build-system]
requires = [
Expand Down
7 changes: 7 additions & 0 deletions src/zint/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"dependencies": ["zlib", "libpng"],
"overrides": [
{"name": "zlib", "version": "1.3.1"},
{"name": "libpng", "version": "1.6.40"}
]
}

0 comments on commit 9519927

Please sign in to comment.