-
Notifications
You must be signed in to change notification settings - Fork 13
381 lines (377 loc) · 14.4 KB
/
wheels.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
name: Python Wheels
on:
push:
branches:
- master
- 'dev**'
pull_request:
release:
types:
- created
env:
VCPKG_PKGS: >-
boost-dll boost-program-options
boost-serialization boost-filesystem
tinyxml2 console-bridge assimp
urdfdom octomap orocos-kdl pcl
gtest benchmark flann jsoncpp
yaml-cpp eigen3
openblas
fcl ompl taskflow
bullet3[multithreading,double-precision,rtti]
ccd[double-precision] gperftools
jobs:
build-ubuntu:
runs-on: ${{ matrix.config.runs_on }}
container: ${{ matrix.config.container }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.8"
docs: true
docs_cmake: ON
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.9"
docs: true
docs_cmake: ON
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.10"
docs: true
docs_cmake: ON
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.11.0"
docs: true
docs_cmake: ON
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.12.0"
docs: true
docs_cmake: ON
- os: ubuntu-22.04
runs_on: ubuntu-22.04
container: ubuntu:22.04
py_platform: manylinux_2_35_x86_64
python_version: "3.13.0"
docs: true
docs_cmake: ON
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v2
with:
path: ws/src/tesseract_python
- name: install sudo, tzdata, keyboard-configuration
shell: bash
run: |
echo -en "XKBMODEL=\"pc105\"\nXKBLAYOUT=\"us\"\nXKBVARIANT=\"\"\nXKBOPTIONS=\"\"\nBACKSPACE=\"guess\"\n" > /etc/default/keyboard
apt update
apt install sudo tzdata python3 keyboard-configuration -y -qq
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
- name: apt
run: >
sudo apt-get install python3-pip libboost-all-dev
libeigen3-dev libtinyxml2-dev libconsole-bridge-dev libassimp-dev
liburdfdom-dev liboctomap-dev liborocos-kdl-dev libpcl-dev
libflann-dev libjsoncpp-dev libyaml-cpp-dev git cmake ninja-build
build-essential autoconf automake libtool bison libpcre2-dev libpcre3-dev
lcov libbullet-dev libbullet-extras-dev python3-venv curl libfcl-dev -y -qq
- name: build-swig
uses: johnwason/swig-build-action@v1
with:
cache-key: ${{ matrix.config.os }}-${{ matrix.config.python_version }}
version: "4.1.1"
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: '${{ matrix.config.python_version }}'
- name: pip
run: |
python -m pip install --upgrade pip
python -m pip install auditwheel wheel numpy setuptools colcon-common-extensions vcstool patchelf
- name: pip
if: matrix.config.docs == true
run: |
python -m pip install -r ws/src/tesseract_python/docs/requirements.txt
- name: vcs import
working-directory: ws/src
run: vcs import --input tesseract_python/dependencies_with_ext.rosinstall
- name: colcon build
working-directory: ws
run: >
colcon build --packages-up-to tesseract_python --merge-install
--cmake-force-configure
--packages-ignore bullet
--event-handlers console_cohesion+
--cmake-args -DCMAKE_BUILD_TYPE=Release
-DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF
-DPYTHON_EXECUTABLE="${{ steps.setup-python.outputs.python-path }}"
-DTESSERACT_PYTHON_BUILD_WHEEL=ON
-DTESSERACT_PYTHON_WHEEL_PLATFORM=${{ matrix.config.py_platform }}
-DTESSERACT_ENABLE_EXAMPLES=OFF -DTESSERACT_PLUGIN_FACTORY_CALLBACKS=ON
-DTESSERACT_PYTHON_BUILD_DOCUMENTATION=${{ matrix.config.docs_cmake }}
- name: test
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install ws/build/tesseract_python/python/wheelhouse/*
python -m pip install pytest
export TESSERACT_SUPPORT_DIR=$GITHUB_WORKSPACE/ws/src/tesseract/tesseract_support
export TESSERACT_TASK_COMPOSER_DIR=$GITHUB_WORKSPACE/ws/src/tesseract_planning/tesseract_task_composer
cd ws/src/tesseract_python/tesseract_python
pytest -s
- name: build docs
if: matrix.config.docs == true
shell: bash
working-directory: ws/build/tesseract_python
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ws/install/lib
cmake --build . --config Release --target tesseract_python_doc
- name: archive wheels
uses: actions/upload-artifact@v4
with:
name: 'python-wheels-${{ matrix.config.os }}-${{ matrix.config.python_version }}'
path: ws/build/tesseract_python/python/*
- name: archive docs
uses: actions/upload-artifact@v4
with:
name: 'python-docs-${{ matrix.config.os }}-${{ matrix.config.python_version }}'
path: ws/build/tesseract_python/docs/*
build-win:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
config:
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.7"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.8"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.9"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.10"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.11.0"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.12.0"
- arch: x64
vcpkg_triplet: x64-windows-release
cmake_arch: x64
python_version: "3.13.0"
steps:
- uses: actions/checkout@v2
with:
path: ws/src/tesseract_python
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: '${{ matrix.config.python_version }}'
architecture: ${{ matrix.config.arch }}
- name: vcpkg build
uses: johnwason/vcpkg-action@v5
with:
pkgs: >-
${{ env.VCPKG_PKGS }}
triplet: ${{ matrix.config.vcpkg_triplet }}
extra-args: --clean-after-build
token: ${{ github.token }}
cache-key: win-${{ matrix.config.arch }}-python-${{ matrix.config.python_version }}
- name: pip3
run: |
python -m pip install numpy setuptools wheel pytest delvewheel colcon-common-extensions vcstool
- name: choco
run: |
choco install swig ninja -r
- name: vcs import
working-directory: ws/src
run: vcs import --input tesseract_python\dependencies.rosinstall
- name: colcon build
working-directory: ws
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
set CXXFLAGS=%CXXFLAGS% -DEIGEN_DONT_ALIGN=1 -DEIGEN_DONT_VECTORIZE=1
set CMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\vcpkg\installed\${{ matrix.config.vcpkg_triplet }}
set PATH=%PATH%;%GITHUB_WORKSPACE%\vcpkg\installed\${{ matrix.config.vcpkg_triplet }}\bin
set CC=cl
set CCX=cl
colcon build --packages-up-to tesseract_python --merge-install ^
--cmake-force-configure ^
--event-handlers console_cohesion+ ^
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp gtest ^
--cmake-args -GNinja -DCMAKE_BUILD_TYPE=Release ^
-DPYTHON_EXECUTABLE="${{ steps.setup-python.outputs.python-path }}" ^
-DTESSERACT_PYTHON_BUILD_WHEEL=ON ^
-DTESSERACT_ENABLE_EXAMPLES=OFF -DTESSERACT_PLUGIN_FACTORY_CALLBACKS=ON ^
-DVCPKG_APPLOCAL_DEPS=OFF ^
-DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF
if %ERRORLEVEL% GEQ 1 exit 1
- name: test
shell: cmd
run: |
python -m venv venv
if %errorlevel% neq 0 exit /b %errorlevel%
call venv\Scripts\activate
if %errorlevel% neq 0 exit /b %errorlevel%
python --version
python -m pip install --upgrade pip
if %errorlevel% neq 0 exit /b %errorlevel%
for %%I in ("%GITHUB_WORKSPACE%\ws\build\tesseract_python\python\wheelhouse\*") do set WHEEL_FILE=%%~I
if %errorlevel% neq 0 exit /b %errorlevel%
echo WHEEL_FILE=%WHEEL_FILE%
python -m pip install %WHEEL_FILE%
if %errorlevel% neq 0 exit /b %errorlevel%
python -m pip install pytest
if %errorlevel% neq 0 exit /b %errorlevel%
set TESSERACT_SUPPORT_DIR=%GITHUB_WORKSPACE%\ws\src\tesseract\tesseract_support
set TESSERACT_TASK_COMPOSER_DIR=%GITHUB_WORKSPACE%\ws\src\tesseract_planning\tesseract_task_composer
if %errorlevel% neq 0 exit /b %errorlevel%
cd %GITHUB_WORKSPACE%\ws\src\tesseract_python\tesseract_python
if %errorlevel% neq 0 exit /b %errorlevel%
python -m pytest -s
if %errorlevel% neq 0 exit /b %errorlevel%
- name: archive wheels
if: always()
uses: actions/upload-artifact@v4
with:
name: 'python-wheels-win-${{matrix.config.python_version}}'
path: ws/build/tesseract_python/python
- name: archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'build-logs-win-${{ matrix.config.arch }}-python-${{ matrix.config.python_version }}'
path: "**/*.log"
retention-days: 2
build-macos:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
config:
- py_platform: macosx-10.9-x86_64
python_version: "3.12"
steps:
- uses: actions/checkout@v2
with:
path: ws/src/tesseract_python
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: '${{ matrix.config.python_version }}'
- name: brew
run: |
brew install libomp cmake automake autoconf libtool gcc ninja
- name: vcpkg build
uses: johnwason/vcpkg-action@v5
with:
pkgs: >-
${{ env.VCPKG_PKGS }}
triplet: x64-osx-dynamic-release
extra-args: --clean-after-build --overlay-triplets=${{ github.workspace }}/ws/src/tesseract_python/.github/workflows/vcpkg_triplets
token: ${{ github.token }}
cache-key: osx-x64-vcpkg
- name: pip3
run: |
python3 -m pip install numpy setuptools wheel pytest delvewheel colcon-common-extensions vcstool delocate
- name: vcs import
working-directory: ws/src
run: vcs import --input tesseract_python/dependencies.rosinstall
- name: colcon build
working-directory: ws
run: |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release/lib:$GITHUB_WORKSPACE/ws/install/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release
colcon build --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd \
--event-handlers console_cohesion+ \
--cmake-force-configure \
--cmake-args -GNinja -DCMAKE_BUILD_TYPE=Release \
-DINSTALL_OMPL=OFF -DINSTALL_OMPL_TAG=master -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF \
-DBUILD_SHARED_LIBS=ON -DTESSERACT_ENABLE_EXAMPLES=OFF -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF \
-DVCPKG_APPLOCAL_DEPS=OFF -DTESSERACT_ENABLE_TESTING=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DOpenMP_CXX_INCLUDE_DIR=/usr/local/opt/libomp/include \
-DOpenMP_C_INCLUDE_DIR=/usr/local/opt/libomp/include \
-DOpenMP_CXX_LIB_NAMES=libomp -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" \
-DOpenMP_C_LIB_NAMES=libomp -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp" \
-DOpenMP_libomp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib \
-Dtcmalloc_minimal_LIBRARY=${{ github.workspace }}/vcpkg/installed/x64-osx-dynamic-release/lib/libtcmalloc_minimal.dylib \
-DPYTHON_EXECUTABLE="${{ steps.setup-python.outputs.python-path }}" \
-DTESSERACT_PYTHON_WHEEL_PLATFORM=${{ matrix.config.py_platform }} \
-DTESSERACT_PYTHON_BUILD_WHEEL=ON
- name: test
shell: bash
run: |
${{ steps.setup-python.outputs.python-path }} -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install ws/build/tesseract_python/python/wheelhouse/*
python -m pip install pytest
export TESSERACT_SUPPORT_DIR=$GITHUB_WORKSPACE/ws/src/tesseract/tesseract_support
export TESSERACT_TASK_COMPOSER_DIR=$GITHUB_WORKSPACE/ws/src/tesseract_planning/tesseract_task_composer
cd ws/src/tesseract_python/tesseract_python
pytest -s
- name: archive wheels
if: always()
uses: actions/upload-artifact@v4
with:
name: 'python-macos-win-${{matrix.config.python_version}}'
path: ws/build/tesseract_python/python
- name: archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'build-logs-macos-${{ matrix.config.arch }}-python-${{ matrix.config.python_version }}'
path: "**/*.log"
retention-days: 2
collect-wheels:
needs:
- build-win
- build-ubuntu
- build-macos
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
path: robotraconteur
- name: Download CI artifacts
uses: actions/download-artifact@v2
with:
path: artifacts/main
- name: archive wheels
uses: actions/upload-artifact@v4
with:
name: 'python-wheels-all'
path: artifacts/**/wheelhouse/*.whl