Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -12,3 +16,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
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ include(GNUInstallDirs)
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)
endif()

file(GLOB ProtoFiles "protobuf_definitions/*.proto")

foreach(ProtoFile ${ProtoFiles})
Expand All @@ -19,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})
Expand Down