forked from dyne/Zenroom
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.28 KB
/
python.yml
File metadata and controls
87 lines (75 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build and upload nightly to PyPI
on:
push:
paths-ignore:
- 'docs/**'
- 'examples/**'
- '*.md'
jobs:
python-test:
name: Run unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: bindings/python3
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- run: sudo apt-get update && sudo apt-get install -y cmake vim zsh
- run: pip install -e .[test]
- run: pytest -s tests
build_wheels:
needs: [python-test]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Build wheels
run: |
date +%s > current_time
# Remove shared library
rm bindings/golang/zenroom/lib/libzenroom.so
cp bindings/python3/setup.py .
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto aarch64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_24
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_24
# Skip building on Python 2.7, Python 3.5 and PyPy on all platforms
CIBW_SKIP: cp27-* cp35-* pp*
CIBW_BEFORE_BUILD_LINUX: apt-get update && apt-get install -y cmake vim zsh
CIBW_BEFORE_BUILD_MACOS: brew install cmake vim zsh
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
upload_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}