Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protocol and generate stubs on CI #152

Merged
merged 9 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build-protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,41 @@ env:
PACKAGE_DIR: ./livekit-protocol

jobs:
generate_protobuf:
runs-on: ubuntu-latest
name: Generating protobuf
if: github.event_name == 'pull_request'

defaults:
run:
working-directory: ${{ env.PACKAGE_DIR }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref }}

- uses: actions/setup-python@v4

- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "25.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: install mypy-protobuf
run: pip3 install mypy-protobuf

- name: generate python stubs
run: ./generate_proto.sh

- name: Add changes
uses: EndBug/add-and-commit@v9
with:
add: '["livekit-protocol/"]'
default_author: github_actions
message: generated protobuf

build_wheels:
name: Build Protocol wheel/sdist
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions livekit-protocol/generate_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

# This script requires protobuf-compiler and https://github.com/nipunn1313/mypy-protobuf

set -e

API_PROTOCOL=./protocol
API_OUT_PYTHON=./livekit/protocol

Expand Down
2 changes: 1 addition & 1 deletion livekit-protocol/livekit/protocol/agent.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions livekit-protocol/livekit/protocol/analytics.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading