Skip to content

MacOS Conan build fix #1837

MacOS Conan build fix

MacOS Conan build fix #1837

Workflow file for this run

name: Test
on:
pull_request:
paths-ignore:
- conanfile.py
- '**.md'
workflow_dispatch:
inputs:
no-tidy:
type: boolean
description: set to true to build without clang-tidy (2x faster)
jobs:
test_ubuntu:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
container: ghcr.io/viamrobotics/cpp-base:bullseye-amd64
strategy:
fail-fast: false
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.no-tidy && 'OFF' || 'ON' }} \
-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
test_windows:
if: github.repository_owner == 'viamrobotics'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-windows
platform: windows_x86_64
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.sha }}
- name: Install dependencies
run: choco install -y conan git
- name: Build SDK
shell: powershell
run: |
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
conan profile detect
conan install . --build=missing -o "&:shared=False"
cmake . --preset conan-default -DVIAMCPPSDK_BUILD_EXAMPLES=ON
cmake --build --preset=conan-release --target ALL_BUILD install -j 8
env:
CONAN_USER_HOME: c:/cache
CONAN_USER_HOME_SHORT: c:/cache/conan_shortpaths
- name: Test examples
shell: powershell
run: |
Start-Job -Init ([ScriptBlock]::Create("Set-Location '$pwd/build/install/bin'")) -ScriptBlock { .\simple_module.exe asdf 2>&1 > output.txt} | Wait-Job -Timeout 2 | Receive-Job
if (-not $(Select-String -Pattern "Module listening" -Path ./build/install/bin/output.txt)) { throw "Module did not start listening" }