Skip to content

Commit fc91503

Browse files
authored
livekit-rtc: add proto generation to the build CI (#295)
1 parent 8d402e0 commit fc91503

22 files changed

+3575
-2788
lines changed

.github/workflows/build-protocol.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install Protoc
3939
uses: arduino/setup-protoc@v2
4040
with:
41-
version: "25.3"
41+
version: "25.1"
4242
repo-token: ${{ secrets.GITHUB_TOKEN }}
4343

4444
- name: generate python stubs

.github/workflows/build-rtc.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,43 @@ env:
1919
PACKAGE_DIR: ./livekit-rtc
2020

2121
jobs:
22+
generate_protobuf:
23+
runs-on: ubuntu-latest
24+
name: Generating protobuf
25+
if: github.event_name == 'pull_request'
26+
27+
defaults:
28+
run:
29+
working-directory: ${{ env.PACKAGE_DIR }}
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
submodules: true
34+
ref: ${{ github.event.pull_request.head.ref }}
35+
36+
- uses: actions/setup-python@v4
37+
38+
- name: Install Protoc
39+
uses: arduino/setup-protoc@v2
40+
with:
41+
version: "25.1"
42+
repo-token: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Install deps
45+
run: |
46+
pip3 install mypy-protobuf==3.6.0
47+
48+
- name: generate python stubs
49+
run: ./generate_proto.sh
50+
51+
- name: Add changes
52+
uses: EndBug/add-and-commit@v9
53+
with:
54+
add: '["livekit-rtc/"]'
55+
default_author: github_actions
56+
message: generated protobuf
57+
58+
2259
build_wheels:
2360
name: Build RTC wheels (${{ matrix.archs }})
2461
runs-on: ${{ matrix.os }}

livekit-rtc/generate_proto.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
#
1516
# This script requires protobuf-compiler and https://github.com/nipunn1313/mypy-protobuf
17+
# (Used by the build-rtc CI)
1618

1719
FFI_PROTOCOL=./rust-sdks/livekit-ffi/protocol
1820
FFI_OUT_PYTHON=./livekit/rtc/_proto

livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py

Lines changed: 79 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)