Skip to content

Commit

Permalink
Unify python setuptools workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
AllSeeingEyeTolledEweSew committed Dec 16, 2020
1 parent 0a36060 commit 10d30fd
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 53 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,32 +165,6 @@ jobs:
cd simulation
b2 -j2 debug-iterators=on invariant-checks=full asserts=on picker-debugging=on
python:
name: Python bindings
runs-on: ubuntu-20.04

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

- name: install dependencies
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev python3
- name: build python module
run: |
cd bindings/python
python3 setup.py build_ext --libtorrent-link=static install --user
- name: run python tests
run: |
cd bindings/python
python3 test.py
dist:
name: build dist
runs-on: ubuntu-20.04
Expand Down
30 changes: 3 additions & 27 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ jobs:
b2 ${{ matrix.config }} -j2 -l400 cxxstd=11
python_setuptools:
name: Python bindings (setup.py)
python:
name: Python bindings
runs-on: macos-latest

steps:
Expand All @@ -93,31 +93,7 @@ jobs:
with:
submodules: recursive

- name: install dependencies
run: |
brew install boost-build boost boost-python3 python@3.9
- name: build and install python module
run: |
cd bindings/python
/usr/local/opt/python@3.9/bin/python3.9 setup.py build_ext -j3 --libtorrent-link=static install
- name: run python tests
run: |
cd bindings/python
/usr/local/opt/python@3.9/bin/python3.9 test.py
python_b2:
name: Python bindings (boost-build)
runs-on: macos-latest

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

- name: install dependencies
- name: install boost
run: |
brew install boost-build boost boost-python3 python@3.9
export PYTHON_INCLUDE=`echo /usr/local/Cellar/python@3.9/*/Frameworks/Python.framework/Versions/3.9/include/python3.9` ;
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python bindings
on: [push, pull_request]

jobs:
build:
name: build and test python bindings using setuptools
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

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

- name: install dependencies (mac)
if: runner.os == 'macOS'
run: |
brew install boost-build boost boost-python3 python@3.9
- name: install dependencies (linux)
if: runner.os == 'Linux'
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev python3 python3-setuptools
- name: build and install python module
run: |
cd bindings/python
python3 setup.py build_ext -j3 --libtorrent-link=static install --user
- name: run python tests
run: |
cd bindings/python
python3 test.py

0 comments on commit 10d30fd

Please sign in to comment.