From 77ea17bc80e757e603aceb86058db148378bfd3a Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Wed, 25 Feb 2026 13:05:59 +0100 Subject: [PATCH 1/5] Enhance CMake configuration to support Protobuf version 6.x and link Abseil libraries conditionally --- .github/workflows/ci-build.yaml | 32 ++++++++++++++++++++++++++++++++ CMakeLists.txt | 9 +++++++++ 2 files changed, 41 insertions(+) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 9428ca0c..dfd04c81 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -12,3 +12,35 @@ jobs: uses: plexsystems/protolint-action@v0.4.0 with: configDirectory: . + + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libprotobuf-dev protobuf-compiler + - name: Build + run: > + mkdir build + && cd build + && cmake .. + && make all + + build-macos: + runs-on: macos-latest + steps: + - name: Checkout source + uses: actions/checkout@v4 + - name: Install dependencies + run: | + brew update + brew install protobuf + - name: Build + run: > + mkdir build + && cd build + && cmake .. + && make all diff --git a/CMakeLists.txt b/CMakeLists.txt index 0107aefe..dd03e342 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,15 @@ include(GNUInstallDirs) find_package(Protobuf REQUIRED) find_package(Python3 COMPONENTS Interpreter REQUIRED) +message(STATUS "Using protobuf ${Protobuf_VERSION}") + +# We need to link abseil if protobuf version is 6.x or higher +if(Protobuf_VERSION VERSION_GREATER_EQUAL "6.0.0") + message(STATUS "Protobuf version is ${Protobuf_VERSION}, linking abseil") + find_package(absl REQUIRED) + set(PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES} absl::log absl::strings absl::base absl::status absl::log_internal_check_op absl::log_internal_message) +endif() + file(GLOB ProtoFiles "protobuf_definitions/*.proto") foreach(ProtoFile ${ProtoFiles}) From 8954ccd0ec67d854962c21000cdcde34279e2b97 Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Wed, 25 Feb 2026 13:09:20 +0100 Subject: [PATCH 2/5] Ensure project builds in blunux-ubuntu devcontainers --- .github/workflows/ci-build.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index dfd04c81..e5665ad4 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -44,3 +44,28 @@ jobs: && cd build && cmake .. && make all + + build-container: + runs-on: ubuntu-24.04 + + container: + image: blueyerobotics/blunux-ubuntu + credentials: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Set default shell for all steps in this job + defaults: + run: + shell: zsh -e {0} + + steps: + - name: Checkout source + uses: actions/checkout@v4 + - name: Build + run: > + source /opt/ros/jazzy/setup.zsh + && mkdir build + && cd build + && cmake .. + && make all From ae90397b270b0dd8ffb53827d0da1068170d064d Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Wed, 25 Feb 2026 13:12:58 +0100 Subject: [PATCH 3/5] Update CI build workflow to trigger only on push events --- .github/workflows/ci-build.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index e5665ad4..cda35c46 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -1,6 +1,10 @@ name: CI build -on: [push, pull_request] +on: [push] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: protolint: @@ -47,7 +51,6 @@ jobs: build-container: runs-on: ubuntu-24.04 - container: image: blueyerobotics/blunux-ubuntu credentials: From be8052c368622f189d591ef76aa1dcac0c12fefc Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Wed, 25 Feb 2026 13:15:48 +0100 Subject: [PATCH 4/5] Remove blunux-ubuntu build since secret is not available in public repos --- .github/workflows/ci-build.yaml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index cda35c46..082eb0de 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -48,27 +48,3 @@ jobs: && cd build && cmake .. && make all - - build-container: - runs-on: ubuntu-24.04 - container: - image: blueyerobotics/blunux-ubuntu - credentials: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - # Set default shell for all steps in this job - defaults: - run: - shell: zsh -e {0} - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - name: Build - run: > - source /opt/ros/jazzy/setup.zsh - && mkdir build - && cd build - && cmake .. - && make all From 7154bb0332b5a301a65757bbafedbb8b840842a4 Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Wed, 25 Feb 2026 13:19:29 +0100 Subject: [PATCH 5/5] Fix Protobuf library variable name in CMake configuration --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd03e342..2eca60a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,13 @@ find_package(Protobuf REQUIRED) find_package(Python3 COMPONENTS Interpreter REQUIRED) message(STATUS "Using protobuf ${Protobuf_VERSION}") +message(STATUS "Protobuf libraries: ${Protobuf_LIBRARIES}") # We need to link abseil if protobuf version is 6.x or higher if(Protobuf_VERSION VERSION_GREATER_EQUAL "6.0.0") message(STATUS "Protobuf version is ${Protobuf_VERSION}, linking abseil") find_package(absl REQUIRED) - set(PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES} absl::log absl::strings absl::base absl::status absl::log_internal_check_op absl::log_internal_message) + set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} absl::log absl::strings absl::base absl::status absl::log_internal_check_op absl::log_internal_message) endif() file(GLOB ProtoFiles "protobuf_definitions/*.proto") @@ -28,7 +29,7 @@ protobuf_generate_python(PROTO_PY ${ProtoFiles}) add_library(blueyeprotocol SHARED ${ProtoSources} ${ProtoHeaders}) set(EXT_LIBS - ${PROTOBUF_LIBRARIES} + ${Protobuf_LIBRARIES} ) target_link_libraries(blueyeprotocol PUBLIC ${EXT_LIBS})