Skip to content

Commit

Permalink
Update protocol and generate stubs on CI (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
davidzhao and github-actions[bot] authored Jan 23, 2024
1 parent 569c24d commit 2544008
Show file tree
Hide file tree
Showing 12 changed files with 161 additions and 113 deletions.
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

0 comments on commit 2544008

Please sign in to comment.