Skip to content

protos-updated

protos-updated #485

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: ubuntu-latest
container:
image: ghcr.io/viamrobotics/canon:amd64
steps:
- uses: actions/checkout@v4
# note (erodkin): these dependencies were cribbed from what we use to build the SDK
# in the release job. Only very cursory effort was made to prune.
- name: install dependencies
run: |
apt-get update
apt-get -y dist-upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
curl \
g++ \
gdb \
gnupg \
gpg \
less \
libboost-all-dev \
libgrpc++-dev \
libprotobuf-dev \
libssl-dev \
ninja-build \
pkg-config \
protobuf-compiler \
protobuf-compiler-grpc \
software-properties-common \
sudo \
wget \
- uses: MarkusJx/install-boost@v2.4.4
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/buf-setup-action@v1.9.0
- uses: arduino/setup-protoc@v1
- name: Update buf
run: |
cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON && 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 && cmake --build ./build --target update-static-protos
env:
BOOST_ROOT: ${{ github.workspace }}/boost/boost
- name: cleanup
run: rm -rf boost/
- name: Update proto tag
run: echo "${{ github.event.client_payload.tag }}" > src/viam/api/api_proto_tag.lock
- 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