@@ -150,6 +150,77 @@ jobs:
150150 name : wheels-sdist
151151 path : crates/processing_pyo3/dist
152152
153+ ffi-linux :
154+ name : FFI Linux (x86_64)
155+ runs-on : ubuntu-22.04
156+ steps :
157+ - uses : actions/checkout@v4
158+ with :
159+ submodules : true
160+ - uses : ./.github/actions/setup
161+ - name : Build FFI shared library
162+ run : cargo build --release -p processing_ffi --features wayland,x11,webcam
163+ - name : Stage release files
164+ run : |
165+ mkdir -p staging/lib staging/include
166+ cp target/release/libprocessing.so staging/lib/
167+ cp target/release/libprocessing.a staging/lib/
168+ cp crates/processing_ffi/include/processing.h staging/include/
169+ cp LICENSE.md staging/
170+ tar -czvf libprocessing-${{ github.ref_name }}-linux-x86_64.tar.gz -C staging .
171+ - uses : actions/upload-artifact@v4
172+ with :
173+ name : libprocessing-linux-x86_64
174+ path : libprocessing-${{ github.ref_name }}-linux-x86_64.tar.gz
175+
176+ ffi-macos :
177+ name : FFI macOS (aarch64)
178+ runs-on : macos-14
179+ steps :
180+ - uses : actions/checkout@v4
181+ with :
182+ submodules : true
183+ - uses : dtolnay/rust-toolchain@stable
184+ - name : Build FFI shared library
185+ run : cargo build --release -p processing_ffi --features webcam
186+ - name : Stage release files
187+ run : |
188+ mkdir -p staging/lib staging/include
189+ cp target/release/libprocessing.dylib staging/lib/
190+ cp target/release/libprocessing.a staging/lib/
191+ cp crates/processing_ffi/include/processing.h staging/include/
192+ cp LICENSE.md staging/
193+ tar -czvf libprocessing-${{ github.ref_name }}-macos-aarch64.tar.gz -C staging .
194+ - uses : actions/upload-artifact@v4
195+ with :
196+ name : libprocessing-macos-aarch64
197+ path : libprocessing-${{ github.ref_name }}-macos-aarch64.tar.gz
198+
199+ ffi-windows :
200+ name : FFI Windows (x64)
201+ runs-on : windows-latest
202+ steps :
203+ - uses : actions/checkout@v4
204+ with :
205+ submodules : true
206+ - uses : dtolnay/rust-toolchain@stable
207+ - name : Build FFI shared library
208+ run : cargo build --release -p processing_ffi --features webcam
209+ - name : Stage release files
210+ shell : pwsh
211+ run : |
212+ New-Item -ItemType Directory -Force -Path staging/lib, staging/include | Out-Null
213+ Copy-Item target/release/processing.dll staging/lib/
214+ Copy-Item target/release/processing.dll.lib staging/lib/
215+ Copy-Item target/release/processing.lib staging/lib/
216+ Copy-Item crates/processing_ffi/include/processing.h staging/include/
217+ Copy-Item LICENSE.md staging/
218+ Compress-Archive -Path staging/* -DestinationPath libprocessing-${{ github.ref_name }}-windows-x64.zip
219+ - uses : actions/upload-artifact@v4
220+ with :
221+ name : libprocessing-windows-x64
222+ path : libprocessing-${{ github.ref_name }}-windows-x64.zip
223+
153224 publish :
154225 name : Publish to PyPI
155226 runs-on : ubuntu-latest
@@ -166,3 +237,26 @@ jobs:
166237 path : dist
167238 - name : Publish to PyPI
168239 uses : pypa/gh-action-pypi-publish@release/v1
240+
241+ github-release :
242+ name : Create GitHub Release
243+ runs-on : ubuntu-latest
244+ if : startsWith(github.ref, 'refs/tags/')
245+ needs : [ffi-linux, ffi-macos, ffi-windows, linux, macos, windows, sdist]
246+ permissions :
247+ contents : write
248+ steps :
249+ - uses : actions/download-artifact@v4
250+ with :
251+ pattern : libprocessing-*
252+ merge-multiple : true
253+ path : release-assets
254+ - uses : actions/download-artifact@v4
255+ with :
256+ pattern : wheels-*
257+ merge-multiple : true
258+ path : release-assets
259+ - uses : softprops/action-gh-release@v2
260+ with :
261+ files : release-assets/*
262+ generate_release_notes : true
0 commit comments