Skip to content

Commit

Permalink
Merge pull request #68 from liufang-robot/master
Browse files Browse the repository at this point in the history
添加arm64的action
  • Loading branch information
liufang-robot authored Mar 19, 2024
2 parents d4fde1d + d008f3c commit 46a417e
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 29 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/linux_python_aarch64_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Linux python aarch64 build
run-name: ${{ github.actor }} Linux python aarch64 build
on:
workflow_dispatch:
pull_request:
jobs:
linux_python_aarch64_build:
runs-on: [self-hosted, Linux, ARM64]
container: quay.io/pypa/manylinux2014_aarch64
steps:
- name: Checkout
uses: actions/checkout@v1

- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0.0 markdown

- name: create-whl-dir
run: mkdir -p whl

- name: build with python
run: for PY in /opt/python/*;do
rm -rf build;
cmake -S. -Bbuild -DBUILD_PYTHON=ON -DPYTHONPATH=${PY};
cmake --build build;
cp build/python/dist/*.whl whl/;
done;

- name: repair
run: for PYWHL in whl/*.whl;do
auditwheel repair ${PYWHL};
done;

- name: list Pypi
run: ls wheelhouse/*
45 changes: 45 additions & 0 deletions .github/workflows/linux_python_aarch64_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Linux python aarch64 release
run-name: ${{ github.actor }} Linux python aarch64 release
on:
workflow_dispatch:
push:
tags:
- v1.*.*
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
pull-requests: read

jobs:
linux_python_aarch64_build_and_release:
runs-on: [self-hosted, Linux, ARM64]
container: quay.io/pypa/manylinux2014_aarch64
steps:
- name: Checkout
uses: actions/checkout@v1
- run: ls /opt/python/
- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0 urllib3==1.24. markdown
- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON
- name: build
run: cmake --build build
- name: create-whl-dir
run: mkdir -p whl
- name: build with python
run: for PY in /opt/python/*;do
rm -rf build;
cmake -S. -Bbuild -DBUILD_PYTHON=ON -DPYTHONPATH=${PY};
cmake --build build;
cp build/python/dist/*.whl whl/;
done;

- name: repair
run: for PYWHL in whl/*.whl;do
auditwheel repair ${PYWHL};
done;

- name: upload Pypi
run: /opt/python/cp310-cp310/bin/twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} wheelhouse/*.whl
3 changes: 1 addition & 2 deletions .github/workflows/linux_python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ on:
jobs:
linux_python_build:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Checkout
uses: actions/checkout@v1

- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0.0 markdown

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/linux_python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ permissions:
jobs:
linux_python_build_and_release:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Checkout
uses: actions/checkout@v1
- run: ls /opt/python/
- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp37-cp37m/bin/pip install twine==2.0 urllib3==1.24. markdown
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0 urllib3==1.24. markdown
- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON
- name: build
Expand All @@ -42,4 +41,4 @@ jobs:
done;

- name: upload Pypi
run: /opt/python/cp37-cp37m/bin/twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} wheelhouse/*.whl
run: /opt/python/cp310-cp310/bin/twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} wheelhouse/*.whl
2 changes: 1 addition & 1 deletion .github/workflows/windows_python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand Down
42 changes: 31 additions & 11 deletions .github/workflows/windows_python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ permissions:
id-token: write
pull-requests: read

jobs:
windows_python310_release:
runs-on: windows-latest
jobs:
windows_cp38_release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.8'
- name: Check cmake
run: cmake --version
- name: Install python-dev-tools
Expand All @@ -32,14 +32,14 @@ jobs:
run: cmake --build build --config release
- name: Upload Pypi
run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl
windows_python38_release:
runs-on: windows-latest
windows_cp39_release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- name: Check cmake
run: cmake --version
- name: Install python-dev-tools
Expand All @@ -51,14 +51,14 @@ jobs:
run: cmake --build build --config release
- name: Upload Pypi
run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl
windows_python39_release:
windows_cp310_release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Check cmake
run: cmake --version
- name: Install python-dev-tools
Expand All @@ -70,7 +70,7 @@ jobs:
run: cmake --build build --config release
- name: Upload Pypi
run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl
windows_python311_release:
windows_cp311_release:
runs-on: windows-latest
steps:
- name: Checkout
Expand All @@ -89,7 +89,27 @@ jobs:
run: cmake --build build --config release
- name: Upload Pypi
run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl

windows_cp312_release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Check cmake
run: cmake --version
- name: Install python-dev-tools
run: python.exe -m pip install python-dev-tools setuptools wheel twine markdown

- name: CMake configure
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DBUILD_PYTHON=ON -DBUILD_DOCUMENTATION=OFF
- name: CMake build
run: cmake --build build --config release
- name: Upload Pypi
run: twine upload --skip-existing -u __token__ -p ${{ secrets.PYLEBAI }} build/python/dist/*.whl

# pypy3.8
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile command" TRUE)


project(lebai VERSION 1.1.14 LANGUAGES CXX)
project(lebai VERSION 1.1.15 LANGUAGES CXX)
set(PROJECT_NAMESPACE lebai)
message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}")
# message(STATUS "major: ${PROJECT_VERSION_MAJOR}")
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "lebai sdk"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.1.14
PROJECT_NUMBER = 1.1.15

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@

lebai-sdk的源代码仓库,可以用于控制乐白机械臂.

## amd64架构

| OS | C++ | Python | C# | Java |
|:-------|-----|--------|----|------|
| Linux | [![Status][cpp_linux_svg]][cpp_linux_link] | [![Status][python_linux_svg]][python_linux_link] | [![Status][dotnet_linux_svg]][dotnet_linux_link] | TODO |
| Windows | TODO | [![Status][python_windows_svg]][python_windows_link] | [![Status][dotnet_windows_svg]][dotnet_windows_link] | TODO |

## aarch64架构
| OS | Python |
|:-------|--------|
| Linux | [![Status][python_linux_aarch64_svg]][python_linux_aarch64_link] |


**上图中显示TODO的地方表示该平台该语言的实现还存在问题,没有完全测试通过,后续会陆续完成。**

[cpp_linux_svg]: https://github.com/lebai-robotics/lebai-sdk/actions/workflows/linux_cpp_release.yml/badge.svg
Expand All @@ -22,6 +30,9 @@ lebai-sdk的源代码仓库,可以用于控制乐白机械臂.
[dotnet_windows_svg]: https://github.com/lebai-robotics/lebai-sdk/actions/workflows/windows_dotnet_release.yaml/badge.svg
[dotnet_windows_link]: https://github.com/lebai-robotics/lebai-sdk/actions/workflows/windows_dotnet_release.yaml

[python_linux_aarch64_svg]: https://github.com/lebai-robotics/lebai-sdk/actions/workflows/linux_python_aarch64_release.yml/badge.svg
[python_linux_aarch64_link]: https://github.com/lebai-robotics/lebai-sdk/actions/workflows/linux_python_aarch64_release.yml

**SDK使用需要乐白机械臂的控制器软件版本大于等于`3.1.5`,您可以在机械臂WEB界面左上方查看当前版本号.**

[SDK在线文档](http://help.lebai.ltd/sdk/)中包含了lua语言的接口(本项目参考了lua语言进行接口设置,但是本项目和lua语言的接口无直接关系)
Expand All @@ -31,23 +42,30 @@ lebai-sdk的源代码仓库,可以用于控制乐白机械臂.
## python
python开发可以直接从[PyPI](https://pypi.org/project/pylebai/)安装.

**目前python仅支持linux平台,windows平台还存在问题.**
python2理论上可以从源代码编译生成包(不再持续维护)

```
pip install pylebai
```
目前Linux平台支持的Python版本有
- `3.6`
- `3.7`
- `3.8`
- `3.9`
- `3.10`

目前Windows平台支持的Python版本有
目前Linux平台(amd64, aarch64)支持的Python版本有:
- `cp3.6`
- `cp3.7`
- `cp3.8`
- `cp3.9`
- `cp3.10`
- `cp3.11`
- `cp3.12`
- `pp3.7`
- `pp3.8`
- `pp3.9`
- `pp3.10`

目前Windows平台支持的Python版本有:
- `3.8`
- `3.9`
- `3.10`
- `3.11`
- `3.12`



Expand Down
4 changes: 4 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## 1.1.15

完善文档,python支持更多版本,python生成aarch64的包。

## 1.1.14

修正IK的bug
Expand Down

0 comments on commit 46a417e

Please sign in to comment.