Skip to content

protos-updated

protos-updated #340

Workflow file for this run

name: Update Protos + Open PR
on:
workflow_dispatch:
repository_dispatch:
types:
- protos-updated
jobs:
update-protos:
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
steps:
- uses: actions/checkout@v3
- name: setup-grpc
run: |
git clone https://github.com/Microsoft/vcpkg.git \
&& cd vcpkg && ./bootstrap-vcpkg.sh && ./vcpkg integrate install \
&& ./vcpkg install grpc \
&& ./vcpkg install upb
- name: setup-openssl
run: apt-get update && sudo apt-get -y --no-install-recommends install libssl-dev
- uses: MarkusJx/[email protected]
with:
boost_version: 1.81.0
platform_version: 22.04
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.25.2
ninjaVersion: 1.11.1
- uses: bufbuild/[email protected]
- uses: arduino/setup-protoc@v1
- name: Update buf
run: |
cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON -DCMAKE_PREFIX_PATH=./vcpkg/installed/x64-linux/share \
&& cmake --build ./build --target update-buf
env:
BOOST_ROOT: ${{ github.workspace }}/boost/boost
- name: Generate buf
run: |
cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON -DCMAKE_PREFIX_PATH=./vcpkg/installed/x64-linux/share \
&& cmake --build ./build --target update-static-protos
env:
BOOST_ROOT: ${{ github.workspace }}/boost/boost
- name: cleanup
run: rm -rf boost/ && rm -rf vcpkg/
- name: Add + Commit + Open PR
uses: peter-evans/create-pull-request@v3
with:
commit-message: '[WORKFLOW] Updating protos from ${{ github.event.client_payload.repo_name }}, commit: ${{ github.event.client_payload.sha }}'
branch: 'workflow/update-protos'
add-paths: src/viam/api/*
delete-branch: true
title: Automated Protos Update
body: This is an auto-generated PR to update proto definitions. Check the commits to see which repos and commits are responsible for the changes
assignees: stuqdog
reviewers: stuqdog