tooling: Fix building vc_bridge #632
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
################################################################################ | |
# This workflow will do a clean install of project dependencies, build the | |
# source code and run tests. | |
################################################################################ | |
name: OASIS ROS | |
# Controls when the action will run. Triggers the workflow on push or pull | |
# request events | |
on: [push, pull_request] | |
# A workflow run is made up of one or more jobs that can run sequentially or in | |
# parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
ros1_distro: noetic | |
ros2_distro: iron | |
#- os: macbook | |
# ros1_distro: noetic | |
# ros2_distro: galactic | |
# Steps represent a sequence of tasks that will be executed as part of the | |
# job | |
steps: | |
- name: Build environment information | |
run: 'echo "Matrix OS: ${{ matrix.os }} on $HOSTNAME with $(getconf _NPROCESSORS_ONLN) cores"' | |
# Check-out the repository under $GITHUB_WORKSPACE, so the job can | |
# access it | |
- name: Checkout main repo | |
uses: actions/checkout@v2 | |
- name: Restore Python | |
id: restore-python | |
if: matrix.os != 'macbook' | |
uses: actions/cache@v2 | |
with: | |
path: | | |
ros-ws/python/install | |
key: restore-python-${{ matrix.os }}-${{ hashFiles('oasis_tooling/scripts/*python.sh') }} | |
- name: Restore CMake | |
id: restore-cmake | |
if: matrix.os != 'macbook' | |
uses: actions/cache@v2 | |
with: | |
path: | | |
ros-ws/cmake/install | |
key: restore-cmake-${{ matrix.os }}-${{ hashFiles('oasis_tooling/scripts/*cmake.sh') }} | |
# Skip ROS 1 on ubuntu-18.04, ubuntu-20.04 and macbook | |
#- name: Restore ROS 1 Desktop | |
# id: restore-ros1-desktop | |
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' | |
# uses: actions/cache@v2 | |
# with: | |
# path: | | |
# ros-ws/ros1-desktop-${{ matrix.ros1_distro }}/install | |
# key: restore-ros1-desktop-${{ matrix.os }}-${{ matrix.ros1_distro }}-${{ hashFiles('oasis_tooling/scripts/*ros1_desktop.sh') }} | |
- name: Restore ROS 2 Desktop | |
id: restore-ros2-desktop | |
uses: actions/cache@v2 | |
with: | |
path: | | |
ros-ws/ros2-desktop-${{ matrix.ros2_distro }}/install | |
key: restore-ros2-desktop-${{ matrix.os }}-${{ matrix.ros2_distro }}-${{ hashFiles('oasis_tooling/config/iceoryx/**', 'oasis_tooling/config/ros2_desktop/**', 'oasis_tooling/config/rviz/**', 'oasis_tooling/config/yaml_cpp_vendor/**', 'oasis_tooling/scripts/*ros2_desktop.sh') }} | |
- name: Restore OASIS dependencies | |
id: restore-oasis-depends | |
uses: actions/cache@v2 | |
with: | |
path: | | |
ros-ws/oasis-depends-${{ matrix.ros2_distro }}/install | |
key: restore-oasis-depends-${{ matrix.os }}-${{ matrix.ros2_distro }}-${{ hashFiles('oasis_tooling/config/iceoryx/**', 'oasis_tooling/config/ros2_desktop/**', 'oasis_tooling/config/rviz/**', 'oasis_tooling/config/yaml_cpp_vendor/**', 'oasis_tooling/scripts/*ros2_desktop.sh') }}-${{ hashFiles('oasis_tooling/config/depends.repos', 'oasis_tooling/config/image_transport_plugins/**', 'oasis_tooling/config/libcec/**', 'oasis_tooling/config/libfreenect2/**', 'oasis_tooling/config/OpenNI/**', 'oasis_tooling/config/orb-slam3/**', 'oasis_tooling/config/p8-platform/**', 'oasis_tooling/config/pangolin/**', 'oasis_tooling/config/vision_opencv/**', 'oasis_tooling/scripts/*oasis_deps.sh') }} | |
- name: Restore Arduino IDE | |
id: restore-arduino-ide | |
uses: actions/cache@v2 | |
with: | |
path: | | |
oasis_avr/arduino-* | |
key: restore-arduino-ide-${{ matrix.os }}-${{ hashFiles('oasis_avr/bootstrap.sh') }} | |
- name: Install system dependencies | |
if: matrix.os != 'starship' && matrix.os != 'cinder' && matrix.os != 'macbook' | |
run: | | |
sudo apt update | |
sudo apt install -y build-essential cmake git | |
# TODO: This was needed to link oasis_drivers_cpp | |
- name: Install libspdlog-dev | |
if: matrix.os != 'ubuntu-18.04' | |
run: | | |
sudo apt install -y libspdlog-dev | |
# | |
# TODO: This is needed because rosdep fails with error: | |
# | |
# The following packages have unmet dependencies: | |
# libomp-dev : Depends: libomp5 (= 5.0.1-1) | |
# E: Unable to correct problems, you have held broken packages. | |
# | |
- name: Install oasis_kinect2 dependencies | |
if: matrix.os == 'ubuntu-18.04' | |
run: | | |
sudo apt install -y libomp5 | |
- name: Install Python dependencies | |
if: matrix.os != 'macbook' && steps.restore-python.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/depinstall_python.sh | |
- name: Build Python | |
if: matrix.os != 'macbook' && steps.restore-python.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/build_python.sh | |
- name: Install CMake dependencies | |
if: matrix.os != 'macbook' && steps.restore-cmake.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/depinstall_cmake.sh | |
- name: Build CMake | |
if: matrix.os != 'macbook' && steps.restore-cmake.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/build_cmake.sh | |
#- name: Install ROS 1 Desktop dependencies | |
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true' | |
# run: ./oasis_tooling/scripts/depinstall_ros1_desktop.sh | |
#- name: Fix empy install for ROS 1 | |
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true' | |
# run: | | |
# sudo apt install -y python3-empy | |
# sudo ln -s -f /usr/bin/empy3 /usr/bin/empy | |
#- name: Fix missing Python 2 packages for ROS 1 | |
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true' | |
# run: | | |
# sudo apt install python2 | |
# curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | |
# sudo python2 get-pip.py | |
# python2 -m pip install --upgrade catkin_pkg empy pip PyYAML setuptools | |
#- name: Build ROS 1 Desktop | |
# if: matrix.os != 'ubuntu-18.04' && matrix.os != 'ubuntu-20.04' && matrix.os != 'macbook' && steps.restore-ros1-desktop.outputs.cache-hit != 'true' | |
# run: ./oasis_tooling/scripts/build_ros1_desktop.sh | |
- name: Install ROS 2 Desktop dependencies | |
if: steps.restore-ros2-desktop.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/depinstall_ros2_desktop.sh | |
- name: Build ROS 2 Desktop | |
if: steps.restore-ros2-desktop.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/build_ros2_desktop.sh | |
- name: Install OASIS dependency rosdeps | |
if: steps.restore-oasis-depends.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/depinstall_oasis_deps.sh | |
- name: Build OASIS dependencies | |
if: steps.restore-oasis-depends.outputs.cache-hit != 'true' | |
run: ./oasis_tooling/scripts/build_oasis_deps.sh | |
- name: Install OASIS rosdeps | |
run: ./oasis_tooling/scripts/depinstall_oasis.sh | |
- name: colcon build | |
run: ./oasis_tooling/scripts/build_oasis.sh | |
- name: Install OASIS files | |
run: ./oasis_tooling/scripts/install_oasis.sh | |
#- name: Upload Ardino hex to /dev/ttyACM0 | |
# if: matrix.os == 'cinder' | |
# run: | | |
# ./oasis_avr/scripts/reset_leonardo.py /dev/ttyACM0 | |
# sleep 2 | |
# source oasis_tooling/scripts/env_ros2_desktop.sh && cmake --build "build/oasis_avr" --target upload -- TARGET=firmata_node SERIAL_PORT=/dev/ttyACM0 | |
# sleep 2 | |
#- name: Test Ardino | |
# if: matrix.os == 'cinder' | |
# run: | | |
# source install/setup.bash && ros2 run oasis_drivers_py firmata_test |