Skip to content

Commit 2a78616

Browse files
committed
ci: set up some cibuildwheel jobs
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent d64fcfb commit 2a78616

3 files changed

Lines changed: 65 additions & 3 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Wheels
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
pull_request:
9+
push:
10+
11+
12+
make_sdist:
13+
name: Make SDist
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Build SDist
19+
run: pipx run build --sdist
20+
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: cibw-sdist
24+
path: dist/*.tar.gz
25+
26+
27+
build_wheels:
28+
name: Wheel on ${{ matrix.os }}
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os:
34+
- ubuntu-latest
35+
- ubuntu-24.04-arm
36+
- windows-latest
37+
- windows-11-arm
38+
- macos-13
39+
- macos-latest
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
submodules: true
46+
47+
- uses: astral-sh/setup-uv@v6
48+
49+
- uses: pypa/cibuildwheel@v3.0
50+
51+
- name: Upload wheels
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: cibw-wheels-${{ matrix.os }}
55+
path: wheelhouse/*.whl

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ var/
3737

3838
#Test Files
3939
test_images_output/
40+
wheelhouse/

pyproject.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ input = "py_gd/__init__.py"
4646
build-frontend = "build[uv]"
4747
test-groups = ["test"]
4848
test-command = "pytest --pyargs py_gd"
49-
before-all = [
49+
skip = ["*musl*"]
50+
linux.before-all = [
51+
"dnf install -y gd-devel",
52+
]
53+
windows.before-all = [
54+
"vcpkg install libgd",
55+
]
56+
macos.before-all = [
5057
"git clone https://github.com/libgd/libgd.git --branch gd-2.3.3 --depth 1",
5158
"cmake -Slibgd -Bbuild-libgd -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install",
5259
"cmake --build build-libgd",
5360
"cmake --install build-libgd",
5461
]
55-
config-settings = { "cmake.define.GD_ROOT" = "./install"}
56-
#repair-wheel-command = ""
62+
macos.config-settings = { "cmake.define.GD_ROOT" = "./install"}
5763

5864

0 commit comments

Comments
 (0)