Skip to content

Commit

Permalink
update GitHub Actions workflow for publishing to PyPI and enhance set…
Browse files Browse the repository at this point in the history
…up.py dependencies
  • Loading branch information
quantumgizmos committed Jan 10, 2025
1 parent 8e6025e commit aa61420
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
55 changes: 25 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
name: Build
name: Publish to PyPI

on:
push:
branches:
- release
- main
workflow_dispatch:

jobs:

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
publish:
name: Build and Publish bp_osd
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

# - name: Build wheels
# uses: pypa/[email protected]
# env:
# CIBW_SKIP: '*musllinux* pp*'
# Check out the repository
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/setup-python@v2
name: Install Python
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.9' # Minimum Python version required

- name: Update build tools
# Install build dependencies
- name: Install build tools
run: |
python -m pip install -U pip setuptools wheel
python -m pip install --upgrade pip
python -m pip install build
- name: Build wheel
# Build the package
- name: Build package
run: |
python -m pip wheel -w ./wheelhouse/ .
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/bposd*.whl
python -m build --wheel --outdir ./wheelhouse
# Install twine
- name: Install twine
run: |
python -m pip install -U twine
- name: Build and publish
python -m pip install --upgrade twine
# Publish to PyPI
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.BPOSD_PYPI_PASSWORD }}
run: |
twine upload ./wheelhouse/bposd*whl
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
packages=["bposd"],
package_dir={"": "src"},
classifiers=["Intended Audience :: Science/Research"],
install_requires=["ldpc"],
install_requires=["ldpc>=2.0.0", "numpy", "scipy"],
include_package_data=True,
zip_safe=False,
)

0 comments on commit aa61420

Please sign in to comment.