Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 6 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,11 @@ jobs:
call-test:
uses: ./.github/workflows/test.yml
secrets: inherit

build-sdist:
runs-on: ubuntu-latest
needs: call-test
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: dev
cache: true
- name: Re-install local
run: |
pixi reinstall -e dev --frozen fastcan
- name: Build SDist
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

build-wheels:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
call-wasm-wheel:
needs: call-test
uses: ./.github/workflows/emscripten.yml

call-wheel:
needs: call-test
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp3*-*
CIBW_SKIP: pp* *i686* *musllinux* *-macosx_universal2 *-manylinux_ppc64le *-manylinux_s390x
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: auto64
CIBW_BEFORE_ALL_LINUX: yum install -y ninja-build python3-devel
# Needed on Windows CI to compile with Visual Studio compiler
# otherwise Meson detects a MINGW64 platform and use MINGW64
# toolchain
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
# Include free-threaded support
CIBW_ENABLE: cpython-freethreading
# Numpy, scipy, Cython only have free-threaded wheels on scientific-python-nightly-wheels
CIBW_BUILD_FRONTEND: 'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --only-binary :all:'
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
uses: ./.github/workflows/wheel.yml
20 changes: 20 additions & 0 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Emscripten/Pyodide build

on:
workflow_call:

jobs:
build-wasm-wheel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build WASM wheel
uses: pypa/[email protected]
env:
CIBW_PLATFORM: pyodide
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: wasm_wheel
path: ./wheelhouse/*_wasm32.whl
if-no-files-found: error
15 changes: 15 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ jobs:
with:
path: dist/
merge-multiple: true
pattern: cibw-*

- name: Publish distribution to PyPI
if: github.event.release.prerelease == false
uses: pypa/gh-action-pypi-publish@release/v1

- name: get wasm dist artifacts
uses: actions/download-artifact@v4
with:
name: wasm_wheel
path: wasm/

- name: upload to github release
uses: softprops/action-gh-release@v2
with:
files: |
wasm/*.whl
prerelease: ${{ contains(github.ref, '-pre') }}
57 changes: 57 additions & 0 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Wheel build

on:
workflow_call:

jobs:
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: dev
cache: true
- name: Re-install local
run: |
pixi reinstall -e dev --frozen fastcan
- name: Build SDist
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

build-wheels:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp3*-*
CIBW_SKIP: pp* *i686* *musllinux* *-macosx_universal2 *-manylinux_ppc64le *-manylinux_s390x
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: auto64
CIBW_BEFORE_ALL_LINUX: yum install -y ninja-build python3-devel
# Needed on Windows CI to compile with Visual Studio compiler
# otherwise Meson detects a MINGW64 platform and use MINGW64
# toolchain
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
# Include free-threaded support
CIBW_ENABLE: cpython-freethreading
# Numpy, scipy, Cython only have free-threaded wheels on scientific-python-nightly-wheels
CIBW_BUILD_FRONTEND: 'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --only-binary :all:'
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'fastcan',
'c', 'cython',
version: '0.3.2',
version: '0.4.0',
license: 'MIT',
meson_version: '>= 1.1.0',
default_options: [
Expand Down
Loading