diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml new file mode 100644 index 0000000000..9f8c3e6670 --- /dev/null +++ b/.github/workflows/test_macos.yml @@ -0,0 +1,18 @@ +name: MacOS Build + +# Controls when the action will run. +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: macos-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + + - name: Setup + run: ./setup.sh + + - name: Build AirLib + run: ./build.sh diff --git a/.github/workflows/test_ubuntu.yml b/.github/workflows/test_ubuntu.yml new file mode 100644 index 0000000000..131c04bf1a --- /dev/null +++ b/.github/workflows/test_ubuntu.yml @@ -0,0 +1,30 @@ +name: Ubuntu Build + +# Controls when the action will run. +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + + - name: Setup + run: ./setup.sh + + - name: Build AirLib + run: ./build.sh + + - name: Unity Build + run: | + sudo apt-get install libboost-all-dev + cd Unity + ./build.sh + + - name: Build ROS Wrapper + run: | + ./tools/install_ros_deps.sh + source /opt/ros/*/setup.bash + cd ros + catkin build -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 0000000000..39bcf91171 --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,25 @@ +name: Windows Build + +# Controls when the action will run. +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.4.1 + + - name: Build AirLib + shell: cmd + run: build.cmd + + - name: Unity build + shell: cmd + run: | + cd Unity + build.cmd diff --git a/docs/airsim_ros_pkgs.md b/docs/airsim_ros_pkgs.md index dcddcc0ffe..f075a8196b 100644 --- a/docs/airsim_ros_pkgs.md +++ b/docs/airsim_ros_pkgs.md @@ -8,11 +8,11 @@ Verify installation by `gcc-8 --version` - Ubuntu 16.04 * Install [ROS kinetic](https://wiki.ros.org/kinetic/Installation/Ubuntu) - * Install tf2 sensor and mavros packages: `sudo apt-get install ros-kinetic-tf2-sensor-msgs ros-kinetic-mavros*` + * Install tf2 sensor and mavros packages: `sudo apt-get install ros-kinetic-tf2-sensor-msgs ros-kinetic-tf2-geometry-msgs ros-kinetic-mavros*` - Ubuntu 18.04 * Install [ROS melodic](https://wiki.ros.org/melodic/Installation/Ubuntu) - * Install tf2 sensor and mavros packages: `sudo apt-get install ros-melodic-tf2-sensor-msgs ros-melodic-mavros*` + * Install tf2 sensor and mavros packages: `sudo apt-get install ros-melodic-tf2-sensor-msgs ros-melodic-tf2-geometry-msgs ros-melodic-mavros*` - Install [catkin_tools](https://catkin-tools.readthedocs.io/en/latest/installing.html) `sudo apt-get install python-catkin-tools` or diff --git a/ros/src/airsim_ros_pkgs/CMakeLists.txt b/ros/src/airsim_ros_pkgs/CMakeLists.txt index c4c1c89413..22a7d3459e 100644 --- a/ros/src/airsim_ros_pkgs/CMakeLists.txt +++ b/ros/src/airsim_ros_pkgs/CMakeLists.txt @@ -40,6 +40,7 @@ find_package(catkin REQUIRED COMPONENTS tf2 tf2_ros tf2_sensor_msgs + tf2_geometry_msgs ) add_message_files( diff --git a/tools/install_ros_deps.sh b/tools/install_ros_deps.sh index 0830d59c3c..88f3edc583 100755 --- a/tools/install_ros_deps.sh +++ b/tools/install_ros_deps.sh @@ -14,25 +14,30 @@ fi sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 -sudo apt update -sudo apt install -qq ros-$ROS_DISTRO-desktop-full +sudo apt-get update +sudo apt-get install -qq ros-$ROS_DISTRO-ros-base echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc -sudo apt install python3-pip python3-yaml python3-setuptools +sudo apt-get install python3-pip python3-yaml python3-setuptools sudo pip3 install rosdep rosinstall rospkg catkin-pkg sudo rosdep init rosdep update # AirSim ROS Wrapper dependencies +# Only needed for CI due to base install +sudo apt-get install ros-$ROS_DISTRO-vision-opencv \ + ros-$ROS_DISTRO-image-transport \ + libyaml-cpp-dev + if [[ "$DISTRO" == "xenial" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update fi sudo apt-get install gcc-8 g++-8 -sudo apt-get install ros-$ROS_DISTRO-mavros* ros-$ROS_DISTRO-tf2-sensor-msgs +sudo apt-get install ros-$ROS_DISTRO-mavros* ros-$ROS_DISTRO-tf2-sensor-msgs ros-$ROS_DISTRO-tf2-geometry-msgs # TODO: Remove this if-block when new 0.7.0 release of catkin_tools is available if [[ "$DISTRO" == "focal" ]]; then