3636 with :
3737 name : pysplashsurf.pyi
3838 path : pysplashsurf/pysplashsurf/
39-
40- # linux:
41- # name: Build wheels for Linux
42- # needs: generate-stub
43- # runs-on: ${{ matrix.platform.runner }}
44- # strategy:
45- # matrix:
46- # platform:
47- # - runner: ubuntu-24.04
48- # target: x86_64
49- # - runner: ubuntu-24.04
50- # target: x86
51- # - runner: ubuntu-24.04
52- # target: aarch64
53- # - runner: ubuntu-24.04
54- # target: armv7
55- # steps:
56- # - uses: actions/checkout@v4
57- # - name: Download stub artifact
58- # uses: actions/download-artifact@v4
59- # with:
60- # name: pysplashsurf.pyi
61- # path: pysplashsurf/pysplashsurf/
62- # - uses: actions/setup-python@v5
63- # with:
64- # python-version: 3.x
65- # - name: Build wheels
66- # uses: PyO3/maturin-action@v1
67- # with:
68- # target: ${{ matrix.platform.target }}
69- # args: --release --out dist -m pysplashsurf/Cargo.toml
70- # # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
71- # manylinux: auto
72- # - name: Upload wheels
73- # uses: actions/upload-artifact@v4
74- # with:
75- # name: wheels-linux-${{ matrix.platform.target }}
76- # path: dist
7739
78- macos :
40+ linux :
7941 name : Build wheels
8042 needs : generate-stub
8143 runs-on : ${{ matrix.platform.runner }}
8648 - runner : ubuntu-24.04
8749 python-version : " cp312-manylinux_x86_64"
8850 archs : " x86_64"
89- - runner : ubuntu-24.04
90- python-version : " cp312-manylinux_aarch64"
91- archs : " aarch64"
9251 # - runner: ubuntu-24.04
93- # python-version: "{cp312-manylinux_x86_64,cp312-manylinux_aarch64}"
94- # archs: "x86_64,aarch64"
95- - runner : macos-13
96- python-version : " cp312-macosx_x86_64"
97- archs : " x86_64"
98- macosx_deployment_target : " 13.0"
99- - runner : macos-14
100- python-version : " cp312-macosx_arm64"
101- archs : " arm64"
102- macosx_deployment_target : " 14.0"
103- - runner : windows-latest
104- archs : " AMD64"
105- python-version : " cp312-win_amd64"
106- # - runner: ubuntu-24.04
107- # python-version: "cp312-manylinux_x86_64"
52+ # python-version: "cp312-manylinux_aarch64"
53+ # archs: "aarch64"
10854 # - runner: ubuntu-24.04
10955 # python-version: "cp312-manylinux_i686"
11056 # - runner: ubuntu-24.04
@@ -130,6 +76,91 @@ jobs:
13076 platforms : all
13177 - name : Install cibuildwheel
13278 run : python -m pip install cibuildwheel==3.1.3
79+ - name : Build wheels
80+ run : python -m cibuildwheel --output-dir wheelhouse pysplashsurf
81+ env :
82+ CIBW_BUILD : ${{ matrix.platform.python-version }}
83+ CIBW_ARCHS : ${{ matrix.platform.archs }}
84+ CIBW_BEFORE_ALL : curl -sSf https://sh.rustup.rs | sh -s -- -y
85+ CIBW_ENVIRONMENT_LINUX : " PATH=$HOME/.cargo/bin:$PATH"
86+ CIBW_TEST_COMMAND : " cargo install --path {project}/splashsurf && pytest pysplashsurf/tests"
87+ CIBW_TEST_SOURCES : " pysplashsurf/tests"
88+ CIBW_TEST_REQUIRES : pytest meshio trimesh rtree scipy
89+ - name : Upload wheels
90+ uses : actions/upload-artifact@v4
91+ with :
92+ name : wheels-${{ matrix.platform.python-version }}
93+ path : wheelhouse
94+
95+ macos :
96+ name : Build wheels
97+ needs : generate-stub
98+ runs-on : ${{ matrix.platform.runner }}
99+ strategy :
100+ fail-fast : false
101+ matrix :
102+ platform :
103+ - runner : macos-13
104+ python-version : " cp312-macosx_x86_64"
105+ archs : " x86_64"
106+ macosx_deployment_target : " 13.0"
107+ - runner : macos-14
108+ python-version : " cp312-macosx_arm64"
109+ archs : " arm64"
110+ macosx_deployment_target : " 14.0"
111+ steps :
112+ - uses : actions/checkout@v4
113+ - name : Download stub artifact
114+ uses : actions/download-artifact@v4
115+ with :
116+ name : pysplashsurf.pyi
117+ path : pysplashsurf/pysplashsurf/
118+ - uses : actions/setup-python@v5
119+ with :
120+ python-version : 3.12
121+ - name : Install cibuildwheel
122+ run : python -m pip install cibuildwheel==3.1.3
123+ - name : Build wheels
124+ run : python -m cibuildwheel --output-dir wheelhouse pysplashsurf
125+ env :
126+ CIBW_BUILD : ${{ matrix.platform.python-version }}
127+ CIBW_ARCHS : ${{ matrix.platform.archs }}
128+ CIBW_BEFORE_ALL : curl -sSf https://sh.rustup.rs | sh -s -- -y
129+ CIBW_ENVIRONMENT_LINUX : " PATH=$HOME/.cargo/bin:$PATH"
130+ CIBW_ENVIRONMENT_MACOS : >-
131+ PATH=$HOME/.cargo/bin:$PATH MACOSX_DEPLOYMENT_TARGET=${{ matrix.platform.macosx_deployment_target }}
132+ CIBW_TEST_COMMAND : " cargo install --path {project}/splashsurf && pytest pysplashsurf/tests"
133+ CIBW_TEST_SOURCES : " pysplashsurf/tests"
134+ CIBW_TEST_REQUIRES : pytest meshio trimesh rtree scipy
135+ - name : Upload wheels
136+ uses : actions/upload-artifact@v4
137+ with :
138+ name : wheels-${{ matrix.platform.python-version }}
139+ path : wheelhouse
140+
141+ windows :
142+ name : Build wheels
143+ needs : generate-stub
144+ runs-on : ${{ matrix.platform.runner }}
145+ strategy :
146+ fail-fast : false
147+ matrix :
148+ platform :
149+ - runner : windows-latest
150+ archs : " AMD64"
151+ python-version : " cp312-win_amd64"
152+ steps :
153+ - uses : actions/checkout@v4
154+ - name : Download stub artifact
155+ uses : actions/download-artifact@v4
156+ with :
157+ name : pysplashsurf.pyi
158+ path : pysplashsurf/pysplashsurf/
159+ - uses : actions/setup-python@v5
160+ with :
161+ python-version : 3.12
162+ - name : Install cibuildwheel
163+ run : python -m pip install cibuildwheel==3.1.3
133164 - name : Build wheels
134165 run : python -m cibuildwheel --output-dir wheelhouse pysplashsurf
135166 env :
@@ -170,6 +201,28 @@ jobs:
170201 name : wheels-sdist
171202 path : dist
172203
204+ publish :
205+ name : Publish to PyPI
206+ runs-on : ubuntu-latest
207+ if : ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
208+ needs : [linux, macos, sdist]
209+ steps :
210+ - uses : actions/download-artifact@v4
211+ with :
212+ pattern : wheels-*
213+ merge-multiple : true
214+ - name : Test
215+ run : |
216+ ls
217+ # - name: Publish to PyPI
218+ # #if: ${{ startsWith(github.ref, 'refs/tags/') }}
219+ # uses: PyO3/maturin-action@v1
220+ # env:
221+ # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
222+ # with:
223+ # command: upload
224+ # args: --non-interactive --skip-existing wheels-*/*
225+
173226 # publish:
174227 # name: Publish to PyPI
175228 # runs-on: ubuntu-latest
0 commit comments