Skip to content

Commit

Permalink
Merge branch 'main' into feature/RSDK-8828-remove-int
Browse files Browse the repository at this point in the history
  • Loading branch information
lia-viam committed Sep 23, 2024
2 parents 2a2dc92 + f152998 commit 77c2637
Show file tree
Hide file tree
Showing 7 changed files with 297 additions and 194 deletions.
369 changes: 187 additions & 182 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:

jobs:
prepare:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.which_version.outputs.version }}
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
if: steps.release_exists.outputs.id != ''

build_macos:
if: github.repository_owner == 'viamrobotics'
needs: [prepare]
runs-on: macos-latest
strategy:
Expand All @@ -44,8 +46,8 @@ jobs:
include:
- target: aarch64-apple-darwin
platform: macosx_arm64
# - target: x86_64-apple-darwin
# platform: macosx_x86_64
- target: x86_64-apple-darwin
platform: macosx_x86_64
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -86,188 +88,191 @@ jobs:
name: viam-cpp-sdk-${{ matrix.platform }}.tar.gz
path: builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz

# build_linux_ubuntu_jammy:
# needs: [prepare]
# runs-on: ${{ matrix.runs_on }}
# container:
# image: ${{ matrix.image }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: aarch64-ubuntu-jammy-gnu
# platform: linux_aarch64-ubuntu-jammy
# image: ubuntu:22.04
# runs_on: buildjet-8vcpu-ubuntu-2204-arm
# - target: x86_64-ubuntu-jammy-gnu
# platform: linux_x86_64-ubuntu-jammy
# image: ubuntu:22.04
# runs_on: buildjet-8vcpu-ubuntu-2204

# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# with:
# ref: ${{ needs.prepare.outputs.sha }}

# - name: Install dependencies
# run: |
# apt-get update
# apt-get -y dist-upgrade
# DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
# build-essential \
# ca-certificates \
# curl \
# doxygen \
# g++ \
# gdb \
# git \
# gnupg \
# gpg \
# less \
# libabsl-dev \
# libboost-all-dev \
# libgrpc++-dev \
# libprotobuf-dev \
# libssl-dev \
# ninja-build \
# pkg-config \
# protobuf-compiler \
# protobuf-compiler-grpc \
# software-properties-common \
# sudo \
# wget \

# sudo wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
# sudo echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null

# apt-get update
# apt-get -y install cmake

# - name: Setup build directory
# run: mkdir builds

# - name: Build
# shell: bash
# run: |
# mkdir build
# /usr/bin/cmake -S . -B build -G Ninja
# /usr/bin/cmake --build build --target all install -- -v -j 3

# - name: Copy
# run: |
# /usr/bin/cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}

# - name: Create tar
# run: |
# tar -czvf builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz builds/viam-cpp-sdk-${{ matrix.platform }}

# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: viam-cpp-sdk-${{ matrix.platform }}.tar.gz
# path: builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz


# build_linux_debian:
# needs: [prepare]
# runs-on: ${{ matrix.runs_on }}
# container:
# image: ${{ matrix.image }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: aarch64-debian-bullseye
# platform: linux_aarch64-debian-bullseye
# image: debian:bullseye
# runs_on: buildjet-8vcpu-ubuntu-2204-arm
# - target: x86_64-debian-bullseye
# platform: linux_x86_64-debian-bullseye
# image: debian:bullseye
# runs_on: buildjet-8vcpu-ubuntu-2204
# - target: aarch64-debian-bookworm
# platform: linux_aarch64-debian-bookworm
# image: debian:bookworm
# runs_on: buildjet-8vcpu-ubuntu-2204-arm
# - target: x86_64-debian-bookworm
# platform: linux_x86_64-debian-bookworm
# image: debian:bookworm
# runs_on: buildjet-8vcpu-ubuntu-2204

# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# with:
# ref: ${{ needs.prepare.outputs.sha }}

# - name: Install dependencies
# run: |
# apt-get update
# apt-get -y dist-upgrade
# DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
# build-essential \
# ca-certificates \
# cmake \
# curl \
# doxygen \
# g++ \
# gdb \
# git \
# gnupg \
# gpg \
# less \
# libabsl-dev \
# libboost-all-dev \
# libc-ares-dev \
# libgrpc++-dev \
# libprotobuf-dev \
# libre2-dev \
# libssl-dev \
# ninja-build \
# pkg-config \
# protobuf-compiler-grpc \
# software-properties-common \
# sudo \
# wget \
# zlib1g-dev

# - name: Update CMake for bullseye
# if: ${{ matrix.image == 'debian:bullseye' }}
# run: |
# apt-add-repository -y 'deb http://deb.debian.org/debian bullseye-backports main'

# apt-get update
# apt-get -y install cmake

# apt-get -y --no-install-recommends install -t bullseye-backports cmake

# - name: Setup build directory
# run: mkdir builds

# - name: Build
# shell: bash
# run: |
# mkdir build
# /usr/bin/cmake -S . -B build -G Ninja
# /usr/bin/cmake --build build --target all install -- -v -j 3

# - name: Copy
# run: |
# /usr/bin/cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}

# - name: Create tar
# run: |
# tar -czvf builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz builds/viam-cpp-sdk-${{ matrix.platform }}

# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: viam-cpp-sdk-${{ matrix.platform }}.tar.gz
# path: builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz
build_linux_ubuntu_jammy:
if: github.repository_owner == 'viamrobotics'
needs: [prepare]
runs-on: ${{ matrix.runs_on }}
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-ubuntu-jammy-gnu
platform: linux_aarch64-ubuntu-jammy
image: ubuntu:22.04
runs_on: buildjet-8vcpu-ubuntu-2204-arm
- target: x86_64-ubuntu-jammy-gnu
platform: linux_x86_64-ubuntu-jammy
image: ubuntu:22.04
runs_on: buildjet-8vcpu-ubuntu-2204

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.sha }}

- name: Install dependencies
run: |
apt-get update
apt-get -y dist-upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
curl \
doxygen \
g++ \
gdb \
git \
gnupg \
gpg \
less \
libabsl-dev \
libboost-all-dev \
libgrpc++-dev \
libprotobuf-dev \
libssl-dev \
ninja-build \
pkg-config \
protobuf-compiler \
protobuf-compiler-grpc \
software-properties-common \
sudo \
wget \
sudo wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
sudo echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
apt-get update
apt-get -y install cmake
- name: Setup build directory
run: mkdir builds

- name: Build
shell: bash
run: |
mkdir build
/usr/bin/cmake -S . -B build -G Ninja
/usr/bin/cmake --build build --target all install -- -v -j 3
- name: Copy
run: |
/usr/bin/cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}
- name: Create tar
run: |
tar -czvf builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz builds/viam-cpp-sdk-${{ matrix.platform }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: viam-cpp-sdk-${{ matrix.platform }}.tar.gz
path: builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz


build_linux_debian:
if: github.repository_owner == 'viamrobotics'
needs: [prepare]
runs-on: ${{ matrix.runs_on }}
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-debian-bullseye
platform: linux_aarch64-debian-bullseye
image: debian:bullseye
runs_on: buildjet-8vcpu-ubuntu-2204-arm
- target: x86_64-debian-bullseye
platform: linux_x86_64-debian-bullseye
image: debian:bullseye
runs_on: buildjet-8vcpu-ubuntu-2204
- target: aarch64-debian-bookworm
platform: linux_aarch64-debian-bookworm
image: debian:bookworm
runs_on: buildjet-8vcpu-ubuntu-2204-arm
- target: x86_64-debian-bookworm
platform: linux_x86_64-debian-bookworm
image: debian:bookworm
runs_on: buildjet-8vcpu-ubuntu-2204

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.sha }}

- name: Install dependencies
run: |
apt-get update
apt-get -y dist-upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
cmake \
curl \
doxygen \
g++ \
gdb \
git \
gnupg \
gpg \
less \
libabsl-dev \
libboost-all-dev \
libc-ares-dev \
libgrpc++-dev \
libprotobuf-dev \
libre2-dev \
libssl-dev \
ninja-build \
pkg-config \
protobuf-compiler-grpc \
software-properties-common \
sudo \
wget \
zlib1g-dev
- name: Update CMake for bullseye
if: ${{ matrix.image == 'debian:bullseye' }}
run: |
apt-add-repository -y 'deb http://deb.debian.org/debian bullseye-backports main'
apt-get update
apt-get -y install cmake
apt-get -y --no-install-recommends install -t bullseye-backports cmake
- name: Setup build directory
run: mkdir builds

- name: Build
shell: bash
run: |
mkdir build
/usr/bin/cmake -S . -B build -G Ninja
/usr/bin/cmake --build build --target all install -- -v -j 3
- name: Copy
run: |
/usr/bin/cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}
- name: Create tar
run: |
tar -czvf builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz builds/viam-cpp-sdk-${{ matrix.platform }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: viam-cpp-sdk-${{ matrix.platform }}.tar.gz
path: builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz

release:
needs: [prepare, build_macos]
needs: [prepare, build_macos, build_linux_debian, build_linux_ubuntu_jammy]
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest

steps:
Expand Down
Loading

0 comments on commit 77c2637

Please sign in to comment.