Skip to content

Commit

Permalink
Added github action to build extension wheels and push to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhiggott committed Jan 22, 2021
1 parent f94a27e commit 4abdc35
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ jobs:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
Expand All @@ -36,6 +39,9 @@ jobs:
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*"
CIBW_SKIP: "*-win32"
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
cmake_minimum_required(VERSION 2.8.12)
project(mwpm)

if(NOT DEFINED CMAKE_MODULE_LINKER_FLAGS_MAINTAINER)
set(
CMAKE_MODULE_LINKER_FLAGS_MAINTAINER ""
CACHE STRING ""
)
endif()

file(GLOB SOURCES "src/pymatching/*.cpp")

add_subdirectory(lib/pybind11)
Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include LICENSE
include MANIFEST.in
include README.in
include CMakeLists.txt
recursive-include src *.txt *.py *.cpp *.h
recursive-include src *.txt *.py *.cpp *.h
graft lib
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def download_and_extract(pkg_url, pkg_fn, pkg_orig_dir=None, pkg_new_dir=None):
if os.path.isfile(pkg_fn):
os.remove(pkg_fn)

lemon_url = "http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz"
lemon_fn = os.path.join(root_dir, "lemon-1.3.1.tar.gz")
lemon_old_dir = os.path.join(lib_dir, "lemon-1.3.1")
lemon_url = "http://lemon.cs.elte.hu/hg/lemon-1.3/archive/e5af35e6c93f.tar.gz"
# lemon_url = "http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz"
lemon_fn = os.path.join(root_dir, "lemon-1-3-e5af35e6c93f.tar.gz")
lemon_old_dir = os.path.join(lib_dir, "lemon-1-3-e5af35e6c93f")
lemon_new_dir = os.path.join(lib_dir, "lemon")

if not os.path.isfile(os.path.join(lemon_new_dir, "CMakeLists.txt")):
Expand Down Expand Up @@ -125,6 +126,7 @@ def build_extension(self, ext):
"License :: OSI Approved :: Apache Software License"
],
long_description=long_description,
long_description_content_type='text/markdown',
python_requires='>=3.6',
zip_safe=False,
)

0 comments on commit 4abdc35

Please sign in to comment.