mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-12 11:14:42 +00:00
Add workflow to publish python package
This commit is contained in:
parent
0bbededd08
commit
31c9b3269f
53
.github/workflows/python-release.yml
vendored
Normal file
53
.github/workflows/python-release.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ${{ matrix.host }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
# Linux
|
||||
- host: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- host: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
# MacOS
|
||||
- host: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
- host: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
# Windows
|
||||
- host: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Build CKZG
|
||||
run: |
|
||||
cd src
|
||||
make
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||
run: |
|
||||
cd bindings/python
|
||||
python setup.py bdist_wheel
|
||||
twine upload dist/*
|
1
.github/workflows/python-tests.yml
vendored
1
.github/workflows/python-tests.yml
vendored
@ -20,7 +20,6 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install py_ecc
|
||||
pip install PyYAML
|
||||
- name: Build BLST
|
||||
run: |
|
||||
|
3
bindings/python/.gitignore
vendored
3
bindings/python/.gitignore
vendored
@ -1 +1,4 @@
|
||||
build/
|
||||
dist/
|
||||
ckzg.egg-info/
|
||||
src/
|
||||
|
@ -1,10 +1,12 @@
|
||||
from distutils.core import setup, Extension
|
||||
from setuptools import setup, Extension
|
||||
|
||||
|
||||
def main():
|
||||
setup(
|
||||
name="ckzg",
|
||||
version="1.0.0",
|
||||
description="Python interface for C-KZG-4844",
|
||||
version="1.4.2",
|
||||
author="Ethereum Foundation",
|
||||
description="Python bindings for C-KZG-4844",
|
||||
ext_modules=[
|
||||
Extension(
|
||||
"ckzg",
|
||||
@ -13,5 +15,6 @@ def main():
|
||||
library_dirs=["../../lib"],
|
||||
libraries=["blst"])])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user