-
Notifications
You must be signed in to change notification settings - Fork 11
143 lines (122 loc) · 3.84 KB
/
Copy pathbuild_wheels.yaml
File metadata and controls
143 lines (122 loc) · 3.84 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
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
name: Build and Publish Wheels
on:
workflow_dispatch:
release:
types: [published]
jobs:
build_core_wheels:
name: Build core wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build core wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD: cp311-* cp312-* cp313-*
- uses: actions/upload-artifact@v4
with:
name: core-wheels
path: ./wheelhouse/*.whl
build_cpp_extension_wheels:
name: Build C++ extension wheels for ${{ matrix.extension }}
needs: [build_core_wheels]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
extension:
- rcs_fr3
- rcs_panda
- rcs_robotics_library
- rcs_so101
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: core-wheels
path: dist/core
- name: Install root Debian dependencies
run: |
sudo apt-get update
sudo xargs -a debian_deps.txt apt-get install -y
- name: Install extension Debian dependencies
run: |
deps_file="extensions/${{ matrix.extension }}/debian_deps.txt"
if [ -f "${deps_file}" ]; then
sudo xargs -a "${deps_file}" apt-get install -y
fi
- name: Build C++ extension wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD: cp311-* cp312-* cp313-*
PIP_FIND_LINKS: /project/dist/core
with:
package-dir: extensions/${{ matrix.extension }}
output-dir: extensions/${{ matrix.extension }}/wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.extension }}
path: extensions/${{ matrix.extension }}/wheelhouse/*.whl
build_python_extension_wheels:
name: Build pure Python wheel for ${{ matrix.extension }}
needs: [build_core_wheels]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
extension:
- rcs_realsense
- rcs_robotiq2f85
- rcs_tacto
- rcs_ur5e
- rcs_usb_cam
- rcs_xarm7
- rcs_zed
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: core-wheels
path: dist/core
- name: Install root Debian dependencies
run: |
sudo apt-get update
sudo xargs -a debian_deps.txt apt-get install -y
- name: Install extension Debian dependencies
run: |
deps_file="extensions/${{ matrix.extension }}/debian_deps.txt"
if [ -f "${deps_file}" ]; then
sudo xargs -a "${deps_file}" apt-get install -y
fi
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Build pure Python wheel
env:
PIP_FIND_LINKS: ${{ github.workspace }}/dist/core
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build --wheel "extensions/${{ matrix.extension }}"
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.extension }}
path: extensions/${{ matrix.extension }}/dist/*.whl
upload_pypi:
needs: [build_core_wheels, build_cpp_extension_wheels, build_python_extension_wheels]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: "*wheels*"
merge-multiple: true
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1