Add ROSEnv example #4
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: ROS and Conan Integration Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: osrf/ros:humble-desktop | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pip and Conan | |
run: | | |
apt-get update && apt-get install -y python3 python3-pip | |
python3 -m pip install conan | |
- name: Run example | |
shell: bash | |
run: | | |
source /opt/ros/humble/setup.bash | |
conan profile detect | |
cd examples/tools/ros/rosenv/workspace | |
conan install str_printer/conanfile.txt --build=missing --output-folder install/conan | |
source install/conan/conanrosenv.sh | |
cat install/conan/conanrosenv.sh | |
echo "CMAKE_TOOLCHAIN_FILE is set to: $CMAKE_TOOLCHAIN_FILE" | |
colcon build --packages-select str_printer | |
colcon build --packages-select consumer | |
source install/setup.bash | |
ros2 run consumer main |