forked from pantor/frankx
-
Notifications
You must be signed in to change notification settings - Fork 9
128 lines (107 loc) · 3.56 KB
/
publish.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
name: Publish
on:
push:
tags:
- "v*"
env:
PYBIN_SUPPORTED_VERSIONS: "cp3(6m|7m|8|9|10)"
jobs:
publish:
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Log Python versions
run: |
echo "Found the following Python versions:"
for PYBIN in /opt/python/*/bin; do
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
echo "${PYBIN}" | cut -d / -f 4
fi
done
- name: Install build essentials
run: |
yum -y install poco-devel*
for PYBIN in /opt/python/*/bin; do
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
"${PYBIN}/pip" install cmake setuptools wheel --user
fi
done
ln -f -s $HOME/.local/bin/cmake /usr/bin/cmake
- name: Install Eigen3
run: |
echo $PATH
git clone https://gitlab.com/libeigen/eigen.git
cd eigen
git checkout 3.4.0
mkdir build && cd build
cmake ..
make install -j2
- name: Install libfranka
run: |
git clone --recursive https://github.com/frankaemika/libfranka.git
cd libfranka
git checkout 0.10.0
git submodule update
mkdir build && cd build
cmake -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF ..
make -j2
make install
- name: Install pybind11
run: |
git clone https://github.com/pybind/pybind11.git
cd pybind11
git checkout v2.9.1
mkdir build && cd build
cmake -DPYBIND11_TEST=OFF ..
make -j2
make install
- name: Install Catch2
run: |
git clone https://github.com/catchorg/Catch2.git
cd Catch2
git checkout v2.13.8
mkdir build && cd build
cmake -DCATCH_BUILD_TESTING=OFF -DCATCH_ENABLE_WERROR=OFF -DCATCH_INSTALL_DOCS=OFF -DCATCH_INSTALL_HELPERS=OFF ..
make install
- name: Python package
run: |
mkdir -p wheels
mkdir -p dist
mkdir -p dist_full
# Compile wheels
for PYBIN in /opt/python/*/bin; do
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
"${PYBIN}/pip" wheel . -w wheels/
fi
done
# Bundle external shared libraries into the wheels
for whl in wheels/*.whl; do
if [[ "$whl" =~ wheels/franky_panda-.*\.whl ]]; then
auditwheel repair "$whl" -w dist_full/
else
cp "$whl" dist_full/
fi
done
# Install packages and test
for PYBIN in /opt/python/*/bin/; do
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
"${PYBIN}/pip" install franky-panda --no-index -f dist_full
# (cd "$HOME"; "${PYBIN}/nosetests" -w /io/tests)
fi
done
cp dist_full/franky_panda-*.whl dist/
ls dist
- name: Publish python package
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}