-
-
Notifications
You must be signed in to change notification settings - Fork 172
162 lines (137 loc) · 4.39 KB
/
integrate.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Test and publish toppra (Python)
name: Python package
on: [push, pull_request]
jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
cpp:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# This is because of pinocchio version on apt
- python-version: 3.6
os: ubuntu-18.04
- python-version: 3.8
os: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dep
run: |
echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg" \
| sudo tee /etc/apt/sources.list.d/robotpkg.list
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key \
| sudo apt-key add -
sudo apt update
PY_VER_LONG=${{ matrix.python-version }}
PY_VER="${PY_VER_LONG:0:1}${PY_VER_LONG:2:1}"
sudo apt install -y cmake \
clang-tidy \
libeigen3-dev \
robotpkg-pinocchio \
robotpkg-qpoases \
libglpk-dev \
robotpkg-py${PY_VER}-pinocchio \
robotpkg-py${PY_VER}-example-robot-data
cd ~/ && git clone https://github.com/pybind/pybind11
cd pybind11 && git checkout v2.5.0
mkdir build && cd build && cmake -DPYBIND11_TEST=false .. && sudo make install
- name: Build
run: |
export LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}
export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH
mkdir -p cpp/build
cd cpp/build
cmake \
-DBUILD_WITH_PINOCCHIO=ON \
-DBUILD_WITH_qpOASES=ON \
-DBUILD_WITH_GLPK=ON \
-DPYTHON_BINDINGS=ON \
-DPYTHON_VERSION=${{ matrix.python-version }} \
-DBUILD_WITH_PINOCCHIO_PYTHON=true \
-DBoost_NO_BOOST_CMAKE=ON \
..
make -j4
- name: Test
run: |
cd cpp/build
./tests/all_tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
build-wheels:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.1
- uses: actions/upload-artifact@v2
with:
name: dist
path: ./wheelhouse/*.whl
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cython numpy setuptools wheel
python setup.py sdist
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist
release:
needs: ["build-sdist", "build-wheels", "python", "cpp"]
runs-on: ubuntu-latest
environment: PYPI_PASSWORD
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- run: echo "Deploying to pypi on branch $GITHUB_REF"
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
- run: ls dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true