Skip to content

Commit

Permalink
Bump version to 0.0.2. Add packaging workflow (#167)
Browse files Browse the repository at this point in the history
* Add packaging and publishing workflow
* Fix package dependencies (thank you, CI!)
* Bump version to 0.0.2
  • Loading branch information
alexreinking authored Mar 1, 2022
1 parent b8c675b commit 09e666e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Lint
on:
pull_request:
jobs:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Packaging
on:
release:
types: [ created ]
push:
branches: [ 'master' ]
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Python dependencies
run: |
python -m pip install -U pip
python -m pip install setuptools wheel twine build
- name: Build Python package
run: python -m build --sdist --wheel --outdir dist/ .

- name: Install Python package
run: python -m pip install dist/*.whl

- name: Test that exocc runs
run: exocc -o tmp --stem conv apps/x86_demo/conv/conv.py

- name: Show generated C code (manual inspection for now)
run: cat tmp/conv.c

# Will only run on release.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 6 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ packages = find:
package_dir =
=src
install_requires =
PySMT==0.9.0
asdl-adt==0.1.0
astor==0.8.1
numpy==1.21.2
yapf==0.31.0
PySMT>=0.9
asdl-adt>=0.1,<0.2
astor>=0.8
numpy>=1.21.2
yapf>=0.31
z3-solver>=4.8.12.0

[options.packages.find]
where = src
Expand Down
2 changes: 1 addition & 1 deletion src/exo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .memory import Memory, DRAM
from . import query_asts as QAST

__version__ = '0.0.1'
__version__ = '0.0.2'

__all__ = [
"LoopIR_pprint",
Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ envlist = py39

[testenv]
deps =
# This list is maintained separately from requirements.txt to make it
# harder to accidentally forget a package dependency in setup.cfg.
Pillow
pytest
pytest-cov
-r{toxinidir}/requirements.txt
scipy
torch
commands = pytest --cov=./ --cov-report=xml
passenv =
SDE_PATH

0 comments on commit 09e666e

Please sign in to comment.