Skip to content

Commit

Permalink
Merge pull request #3180 from rajat2004/github-action-ci
Browse files Browse the repository at this point in the history
Add Github Actions CI Checks
  • Loading branch information
Jonathan authored Dec 15, 2020
2 parents 6a37eb2 + 9bba333 commit b3e55f7
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions .github/workflows/test_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- name: Build AirLib
shell: cmd
run: build.cmd

- name: Unity build
shell: cmd
run: |
cd Unity
build.cmd
4 changes: 2 additions & 2 deletions docs/airsim_ros_pkgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ros/src/airsim_ros_pkgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ find_package(catkin REQUIRED COMPONENTS
tf2
tf2_ros
tf2_sensor_msgs
tf2_geometry_msgs
)

add_message_files(
Expand Down
13 changes: 9 additions & 4 deletions tools/install_ros_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3e55f7

Please sign in to comment.