Update setup.py #61
Workflow file for this run
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
name: Generate Code | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '!v*' | |
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 | |
- 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 |