Skip to content

Make build sdist seperate #80

Make build sdist seperate

Make build sdist seperate #80

Workflow file for this run

# Taken from osqp-python
name: Build Wheels
on:
# Triggers the workflow on push or pull request events
push:
branches:
- "*"
- "*/*"
- "**"
pull_request:
branches: [main]
jobs:
build_sdist:
name: Build source
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@master
with:
submodules: "recursive"
- name: Build source and wheel
run: |
python -m pip install build
python -m build --sdist -o wheelhouse
build_wheels:
name: Building wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: pypa/cibuildwheel@v2.21
env:
CIBW_SKIP: "pp38-*"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheelhouse
path: wheelhouse/*.whl
# publish-qoco-to-pypi:
# name: >-
# Publish QOCO Wheels to PyPI
# if: startsWith(github.ref, 'refs/tags/')
# needs:
# - build_sdist
# - build_wheels
# runs-on: ubuntu-latest
# environment:
# name: pypi
# url: https://pypi.org/p/qoco
# permissions:
# id-token: write
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v6
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution 📦 to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
publish-qoco-to-testpypi:
name: Publish QOCO Wheels to TestPyPI
needs:
- build_wheels
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/qoco
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: wheelhouse
path: wheelhouse/*.whl
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/