Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conda-based Continuous Integration and fix compilation with Gazebo on Windows installed via conda #33

Merged
merged 3 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: C++ CI Workflow with conda dependencies

on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'

jobs:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Dependencies
shell: bash -l {0}
run: |
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
mamba install -c robotology yarp icub-main gazebo icub-contrib-common qt opencv

# Additional dependencies useful only on Linux when using Qt
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Linux
# See https://github.com/robotology/robotology-superbuild/issues/477
mamba install expat-cos6-x86_64 libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesalib mesa-libgl-cos6-x86_64


- name: Configure [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake -GNinja -DBUILD_TESTING:BOOL=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..

- name: Configure [Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake -G"Visual Studio 16 2019" -DBUILD_TESTING:BOOL=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..

- name: Build
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}

- name: Test
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}
1 change: 1 addition & 0 deletions demoRedBall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if (GAZEBO_FOUND)
add_library(${PROJECT_NAME}-world SHARED src/world.cpp)
target_compile_definitions(${PROJECT_NAME}-world PRIVATE _USE_MATH_DEFINES)
target_include_directories(${PROJECT_NAME}-world PRIVATE ${GAZEBO_INCLUDE_DIRS})
target_link_directories(${PROJECT_NAME}-world PRIVATE ${GAZEBO_LIBRARY_DIRS})
target_link_libraries(${PROJECT_NAME}-world PRIVATE ${GAZEBO_LIBRARIES} ${YARP_LIBRARIES})
install(TARGETS ${PROJECT_NAME}-world LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib)
add_subdirectory(gazebo)
Expand Down