Skip to content

Commit

Permalink
Added github actions and README
Browse files Browse the repository at this point in the history
  • Loading branch information
govindchari committed Jan 19, 2025
1 parent 946f947 commit ce084ce
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 --outdir=wheelhouse
- name: Upload sdist and wheel to github
uses: actions/upload-artifact@v4
with:
name: wheels-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]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- uses: pypa/cibuildwheel@v2.21

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: wheelhouse/*.whl
51 changes: 51 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This is a basic workflow to help you get started with Actions

name: Unit Tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
branches:
- "*"
- "*/*"
- "**"
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

matrix:
os: [ubuntu-latest]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: >
pip install pytest pytest-xdist cvxpy
- name: Install qocogen
run: >
pip install .
- name: Run Pytest
run: >
pytest -n 12
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# QOCOGEN
<p align="center">
<img src="https://github.com/user-attachments/assets/7bd44fa7-d198-4739-bb79-a5c15e04a8de" alt="drawing" width="500"/>
</p>

<p align="center">
<a href=https://github.com/qoco-org/qocogen/actions/workflows/unit_tests.yml/badge.svg"><img src="https://github.com/qoco-org/qocogen/actions/workflows/unit_tests.yml/badge.svg"/></a>
<a href="https://img.shields.io/pypi/dm/qoco.svg?label=Pypi%20downloads"><img src="https://img.shields.io/pypi/dm/qoco.svg?label=Pypi%20downloads" alt="PyPI Downloads" /></a>
<a href="https://qoco-org.github.io/qoco/"><img src="https://img.shields.io/badge/docs-online-brightgreen?logo=read-the-docs&style=flat" alt="Documentation" /></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-green.svg" alt="License" /></a>
</p>

QOCOGEN is a code generator which takes in an second-order cone program problem family and generates a customized C solver (called qoco_custom) for the specified problem family which implements the same algorithm as QOCO. This customized solver is library-free, only uses static memory allocation, and can be a few times faster than QOCO.

## Installation and Usage

You can install `qocogen` by running `pip install qocogen`.

For instructions on using QOCOGEN, refer to the [documentation](https://qoco-org.github.io/qoco/codegen/index.html).

## Bug reports

File any issues or bug reports using the [issue tracker](https://github.com/qoco-org/qocogen/issues).

## Citing
```
@misc{chari2025qoco,
author = {Chari, Govind M. and Acikmese, Behcet},
title = {QOCO},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/qoco-org/qoco}},
}
```

## License
QOCOGEN is licensed under the BSD-3-Clause license.

0 comments on commit ce084ce

Please sign in to comment.