use docker base image in CI #1234
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |