-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tentative manual merge with develop, conflicts in .proto resolved by …
…keeping everything from woth sides
- Loading branch information
Showing
58 changed files
with
7,212 additions
and
1,800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
name: Generate Code | ||
|
||
on: [push] | ||
|
||
jobs: | ||
generate-python: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install grpcio-tools==1.59.3 mypy-protobuf==3.5.0 | ||
- name: Generate Protobuf Python Code | ||
run: | | ||
python -m grpc_tools.protoc -I./protos --python_out=./python/reachy2_sdk_api --grpc_python_out=./python/reachy2_sdk_api --mypy_out=./python/reachy2_sdk_api --mypy_grpc_out=./python/reachy2_sdk_api ./protos/*.proto | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add . | ||
git commit -m "Generated Protobuf Python Code" || echo "No changes to commit" | ||
git push | ||
generate-csharp: | ||
runs-on: windows-2022 | ||
needs: generate-python | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
vs-version: '[17.10,17.11)' | ||
|
||
- name: Restore NuGet packages | ||
run: nuget restore 'csharp/reachy_sdk/reachy_sdk.sln' | ||
|
||
- name: Build solution | ||
run: msbuild 'csharp\reachy_sdk\reachy_sdk.sln' /p:Configuration=Release | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add . | ||
git commit -m "Generated Protobuf C# Code" || echo "No changes to commit" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
# Protobuf for Reachy 2 SDK | ||
|
||
## Generate gRPC code | ||
|
||
Code for Python and C# is generated automatically by the CI. You just need to `git pull` to get the generated code after any pushed changes to the .proto. If you still need to generate these files locally, you can do the following commands | ||
|
||
### For Python: | ||
|
||
Install `pip install mypy-protobuf` to generate the mypy stubs | ||
Just install `pip install mypy-protobuf` to generate the mypy stubs, and run: | ||
|
||
```python | ||
python -m grpc_tools.protoc -I./protos --python_out=./python/reachy2_sdk_api --grpc_python_out=./python/reachy2_sdk_api --mypy_out=./python/reachy2_sdk_api --mypy_grpc_out=./python/reachy2_sdk_api ./protos/*.proto | ||
``` | ||
|
||
### For C# | ||
|
||
On a Windows computer, open `reachy_sdk.sln`` in Visual Studio. | ||
`Click Build > Build Solution` | ||
Open `reachy_sdk.sln` in Visual Studio, and `Click Build > Build Solution` |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.