Fix some cibw things

This commit is contained in:
Justin Traglia 2024-02-27 16:48:54 -06:00
parent 4f44fc6757
commit 1f2a749f39
2 changed files with 14 additions and 13 deletions

View File

@ -1,9 +1,6 @@
name: Python Package
on:
push:
branches:
- main
release:
branches:
- main
@ -31,23 +28,27 @@ jobs:
with:
platforms: all
- name: Build CKZG
working-directory: src
run: make
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
- name: Build wheels
working-directory: bindings/python
run: python -m cibuildwheel --output-dir wheelhouse
run: python -m cibuildwheel --output-dir wheelhouse bindings/python
env:
CIBW_ARCHS_LINUX: auto aarch64
CIBW_ARCHS_LINUX: x86_64 i686 aarch64
# musllinux uses apk & manylinux uses yum
CIBW_BEFORE_BUILD_LINUX: |
if command -v apk > /dev/null; then
apk add --update clang && make -C src c_kzg_4844.o
elif command -v yum > /dev/null; then
yum install -y clang && make -C src c_kzg_4844.o
fi
CIBW_BEFORE_BUILD_WINDOWS: |
make -C src c_kzg_4844.o
CIBW_BEFORE_BUILD_MACOS: |
make -C src c_kzg_4844.o
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

View File

@ -20,7 +20,7 @@ ifeq ($(PLATFORM),Darwin)
endif
# The base compiler flags. More can be added on command line.
CFLAGS += -I../inc -O2 -Wall -Wextra
CFLAGS += -I../inc -O2 -Wall -Wextra -Wno-missing-braces
# Cross-platform compilation settings.
ifeq ($(PLATFORM),Windows)