Skip to content

Commit

Permalink
Add protobuf and struct structured data support
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Oct 10, 2023
1 parent cf1afac commit 0c96bce
Show file tree
Hide file tree
Showing 142 changed files with 13,539 additions and 99 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,23 @@ jobs:
- os: macOS-12
name: macOS
container: ""
flags: "-DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=ON"
env: "PATH=\"/usr/local/opt/protobuf@3/bin:$PATH\""
flags: "-DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=ON -DCMAKE_LIBRARY_PATH=/usr/local/opt/protobuf@3/lib -DProtobuf_INCLUDE_DIR=/usr/local/opt/protobuf@3/include -DProtobuf_PROTOC_EXECUTABLE=/usr/local/opt/protobuf@3/bin/protoc"

name: "Build - ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3 ninja-build
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3 libprotobuf-dev protobuf-compiler ninja-build

- name: Install QuickBuffers (Linux)
if: runner.os == 'Linux'
run: wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.2/protoc-gen-quickbuf_1.3.2_amd64.deb && sudo apt install ./protoc-gen-quickbuf_1.3.2_amd64.deb

- name: Install opencv (macOS)
run: brew install opencv ninja
run: brew install opencv protobuf@3 ninja
if: runner.os == 'macOS'

- name: Set up Python 3.8 (macOS)
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3 clang-14
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3 clang-14 libprotobuf-dev protobuf-compiler ninja-build

- name: Install QuickBuffers
if: runner.os == 'Linux'
run: wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.2/protoc-gen-quickbuf_1.3.2_amd64.deb && sudo apt install ./protoc-gen-quickbuf_1.3.2_amd64.deb

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
Expand All @@ -40,7 +44,7 @@ jobs:
- uses: actions/checkout@v3

- name: configure
run: mkdir build && cd build && cmake -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-14 ${{ matrix.cmake-flags }} ..
run: mkdir build && cd build && cmake -G Ninja -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-14 ${{ matrix.cmake-flags }} ..
env:
SCCACHE_GHA_ENABLED: "true"

Expand Down
1 change: 1 addition & 0 deletions .styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ includeOtherLibs {
^cscore
^fmt/
^gtest/
^google/
^hal/
^imgui
^implot
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ endif()

find_package(LIBSSH 0.7.1)

find_package(Protobuf REQUIRED)
find_program(Quickbuf_EXECUTABLE
NAMES protoc-gen-quickbuf
DOC "The Quickbuf protoc plugin"
)

if (WITH_FLAT_INSTALL)
set(WPIUTIL_DEP_REPLACE "include($\{SELF_DIR\}/wpiutil-config.cmake)")
set(WPINET_DEP_REPLACE "include($\{SELF_DIR\}/wpinet-config.cmake)")
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.diffplug.spotless' version '6.20.0' apply false
id 'com.github.spotbugs' version '5.1.3' apply false
id 'com.google.protobuf' version '0.9.3' apply false
}

wpilibVersioning.buildServerMode = project.hasProperty('buildServer')
Expand Down
2 changes: 2 additions & 0 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ doxygen {
//TODO: building memory docs causes search to break
exclude 'wpi/memory/**'

exclude '*.pb.h'

aliases 'effects=\\par <i>Effects:</i>^^',
'notes=\\par <i>Notes:</i>^^',
'requires=\\par <i>Requires:</i>^^',
Expand Down
1 change: 1 addition & 0 deletions glass/.styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ includeOtherLibs {
^fmt/
^fields/
^frc/
^google/
^imgui
^networktables/
^ntcore
Expand Down
Loading

0 comments on commit 0c96bce

Please sign in to comment.