Skip to content

Commit 7abd34d

Browse files
authored
Merge pull request #159 from StochasticTree/python-update-0.1.1
Updated python package to work with cibuildwheel on github actions
2 parents ff1bfe0 + 1ba4236 commit 7abd34d

File tree

5 files changed

+1242
-23
lines changed

5 files changed

+1242
-23
lines changed

.github/workflows/pypi-wheels.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Python Wheels for PyPI
2+
# Note: this file is based in part on the example workflow in the cibuildwheel docs
3+
# https://cibuildwheel.pypa.io/en/stable/setup/#github-actions
4+
# and in part on matplotlib's wheel build workflow:
5+
# https://github.com/matplotlib/matplotlib/blob/main/.github/workflows/cibuildwheel.yml
6+
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
11+
branches: [main]
12+
workflow_dispatch:
13+
14+
jobs:
15+
build_wheels:
16+
name: Build wheels on ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
cibw_archs: "x86_64"
24+
- os: ubuntu-24.04-arm
25+
cibw_archs: "aarch64"
26+
- os: windows-latest
27+
cibw_archs: "auto64"
28+
- os: macos-13
29+
cibw_archs: "x86_64"
30+
- os: macos-14
31+
cibw_archs: "arm64"
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
submodules: 'recursive'
37+
38+
- name: Build wheels
39+
uses: pypa/[email protected]
40+
env:
41+
CIBW_SKIP: "pp* *-musllinux_* *-win32"
42+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
43+
MACOSX_DEPLOYMENT_TARGET: "10.13"
44+
45+
- uses: actions/upload-artifact@v4
46+
with:
47+
name: cibw-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}
48+
path: ./wheelhouse/*.whl

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ share/python-wheels/
9898
.installed.cfg
9999
*.egg
100100
MANIFEST
101+
wheelhouse/
102+
*.whl
101103

102104
# PyInstaller
103105
# Usually these files are written by a python script from a template

0 commit comments

Comments
 (0)