60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: Proto Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, protobuf-playground ]
|
|
pull_request:
|
|
branches: [ master, protobuf-playground ]
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./
|
|
env:
|
|
BASE_PATH: /SpotMicroESP32-Leika
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install Python dependencies
|
|
run: pip install protobuf grpcio-tools
|
|
|
|
- name: Build Protocol Buffers (nanopb)
|
|
run: python ./submodules/nanopb/generator/nanopb_generator.py -I "./platform_shared/" -D esp32/src/platform_shared ./platform_shared/websocket_message.proto ./platform_shared/rest_message.proto
|
|
|
|
- name: Setup Protocol Buffers compiler
|
|
uses: arduino/setup-protoc@v3
|
|
with:
|
|
version: "25.x"
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "pnpm"
|
|
cache-dependency-path: "./app/pnpm-lock.yaml"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: ./app
|
|
|
|
- name: Build Protocol Buffers (Typescript)
|
|
run: pnpm proto
|
|
working-directory: ./app |