Skip to content

Commit

Permalink
debian packaging workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Oct 20, 2023
1 parent da72d8b commit 1d6bba7
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
push:

env:
CMAKE_VERSION: 3.27.4

jobs:
build-deb:
strategy:
matrix:
include:
- container: debian:bookworm
label: bookworm-aarch64
runs-on: buildjet-8vcpu-ubuntu-2204-arm
- container: debian:bookworm
label: bookworm-x86_64
runs-on: buildjet-8vcpu-ubuntu-2204
container: ${{ matrix.container }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- name: depends
run: |
apt-get update
apt-get install -qqy \
build-essential \
libabsl-dev \
libboost-all-dev \
libgrpc++-dev \
libprotobuf-dev \
pkg-config \
ninja-build \
protobuf-compiler-grpc \
git \
wget
- name: download cmake
run: |
ARCH=$(uname -m)
wget --quiet https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$ARCH.sh
chmod +x cmake-${CMAKE_VERSION}-linux-$ARCH.sh
./cmake-${CMAKE_VERSION}-linux-$ARCH.sh --skip-license --prefix=/usr
- name: remove examples
run: sed -i '/add_subdirectory.examples/d' src/viam/CMakeLists.txt
- name: create build
run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G Ninja
- name: build
working-directory: ./build
run: ninja libviamsdk.so && cpack
- uses: actions/upload-artifact@v3
with:
name: debian-${{ matrix.label }}
path: build/viam-cpp-sdk-*.deb
1 change: 1 addition & 0 deletions src/viam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

add_subdirectory(api)
add_subdirectory(sdk)
add_subdirectory(examples)

# Generate CMake configs to enable importing this project
# into others via `find_package`.
Expand Down
3 changes: 2 additions & 1 deletion src/viam/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,6 @@ add_subdirectory(tests)
set(CPACK_GENERATOR "DEB")
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL viam-cpp-sdk_dev)
set(CPACK_PACKAGE_CONTACT "OY TIS")
set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libprotobuf32, libgrpc++1.51, libabsl20220623")
include(CPack)

0 comments on commit 1d6bba7

Please sign in to comment.