Skip to content

use docker base image in CI #1238

use docker base image in CI

use docker base image in CI #1238

Workflow file for this run

name: Test
on:
pull_request:
workflow_dispatch:
inputs:
clang-tidy:
type: boolean
default: true
jobs:
run-tests:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
container: ghcr.io/viamrobotics/cpp-base:bullseye-amd64
strategy:
matrix:
include:
- BUILD_SHARED: ON
- BUILD_SHARED: OFF
steps:
- uses: actions/checkout@v4
- name: cmake
run: |
mkdir build
cd build
cmake .. -G Ninja \
-DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED }} \
-DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON \
-DVIAMCPPSDK_BUILD_TESTS=ON \
-DVIAMCPPSDK_BUILD_EXAMPLES=ON \
-DVIAMCPPSDK_CLANG_TIDY=${{ inputs.clang-tidy && 'ON' || 'OFF' }} \
-DVIAMCPPSDK_SANITIZED_BUILD=${{ matrix.BUILD_SHARED }}
- name: build
run: |
cmake --build build --target install
cmake --install build
- name: test
working-directory: build
run: ../etc/docker/tests/run_test.sh