mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
The Google C++ protobuf implementation has issues with dynamic linkage across DLL boundaries because it uses global variables. It also has a compile-time dependency because the protoc version must exactly match the libprotobuf version. Using nanopb with a customized generator fixes both of these issues. Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: Check Pregenerated Files
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches-ignore:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
update:
|
|
name: "Update"
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Install jinja and protobuf
|
|
run: python -m pip install jinja2 protobuf grpcio-tools
|
|
- name: Install protobuf dependencies
|
|
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler && wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.3/protoc-gen-quickbuf-1.3.3-linux-x86_64.exe && chmod +x protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
|
|
- name: Regenerate all
|
|
run: python ./.github/workflows/pregen_all.py --quickbuf_plugin protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
|
|
- name: Add untracked files to index so they count as changes
|
|
run: git add -A
|
|
- name: Check output
|
|
run: git --no-pager diff --exit-code HEAD
|
|
- name: Generate diff
|
|
run: git diff HEAD > pregenerated-files-fixes.patch
|
|
if: ${{ failure() }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pregenerated-files-fixes
|
|
path: pregenerated-files-fixes.patch
|
|
if: ${{ failure() }}
|