Skip to content

Commit

Permalink
add ci build to validate external deps
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Mar 22, 2024
1 parent 9107442 commit 69dec79
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/cmake_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 2.2.1

- name: Create default profile
run: conan profile new default --detect

- name: Update profile
run: conan profile update settings.compiler.libcxx=libstdc++11 default
run: conan profile detect

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand All @@ -57,3 +54,39 @@ jobs:

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

unvendor_build:
# Validate the CMake option BTCPP_VENDOR_3RDPARTY. Should be able to external dependencies only.
# cppzmq is the only exception because is patched by us.
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.2.1

- name: Create default profile
run: conan profile detect

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Install conan dependencies
working-directory: ${{github.workspace}}/build
run: conan install ${{github.workspace}}/conanfile.txt -s build_type=${{env.BUILD_TYPE}} --build=missing

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBTCPP_VENDOR_3RDPARTY=OFF -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake

- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{env.BUILD_TYPE}}
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(BT_TESTS
set(TEST_DEPENDECIES
${BTCPP_LIBRARY}
foonathan::lexy
$<IF:$<NOT:$<BOOL:${BTCPP_VENDOR_3RDPARTY}>>,wildcards::wildcards,>
bt_sample_nodes)

if(ament_cmake_FOUND AND BUILD_TESTING)
Expand Down

0 comments on commit 69dec79

Please sign in to comment.