Skip to content

Build wrapper for cuda backend #91

Build wrapper for cuda backend

Build wrapper for cuda backend #91

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
- name: Upload sdist to github
uses: actions/upload-artifact@v4
with:
name: wheelhouse-sdist
path: wheelhouse/*
if-no-files-found: error
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-${{ matrix.os }}
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 wheels
# uses: actions/download-artifact@v6
# with:
# pattern: wheelhouse-*
# merge-multiple: true
# path: wheelhouse
# - name: Move wheels into dist directory
# run: |
# mkdir -p dist
# cp wheelhouse/* 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
- build_sdist
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/qoco
permissions:
id-token: write
steps:
- name: Download all wheels
uses: actions/download-artifact@v6
with:
pattern: wheelhouse-*
merge-multiple: true
path: wheelhouse
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: wheelhouse