Updated with working Docker containers and CLI application #11
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: Setup and build packages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
USER: github.actor | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: px4io/px4-dev-ros-noetic:latest | |
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined | |
steps: | |
- name: Check environment | |
run: | | |
export | |
ulimit -a | |
- name: Create dependency workspace | |
run: | | |
mkdir -p ~/dependencies | |
cd ~/dependencies | |
- name: Install PX4 Dependencies | |
run: | | |
cd ~/dependencies | |
wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/main/Tools/setup/ubuntu.sh | |
wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/main/Tools/setup/requirements.txt | |
ls -l | |
chmod +x ubuntu.sh && . ubuntu.sh | |
- name: Install MAVROS using binaries | |
run: | | |
cd ~/dependencies | |
sudo apt-get install ros-$ROS_DISTRO-mavros ros-$ROS_DISTRO-mavros-extras | |
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | |
ls -l | |
chmod +x install_geographiclib_datasets.sh && . install_geographiclib_datasets.sh | |
- name: Install ROS building dependencies | |
run: | | |
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential | |
sudo apt install python3-catkin-tools python3-rosinstall-generator python3-osrf-pycommon | |
sudo apt-get install ros-$ROS_DISTRO-rqt ros-$ROS_DISTRO-rqt-common-plugins | |
pip install scipy | |
- name: Create new workspace | |
run: | | |
cd ~ | |
mkdir -p sarax_ws/src | |
- name: Initialise catkin workspace | |
run: | | |
cd ~/sarax_ws/ | |
. /opt/ros/$ROS_DISTRO/setup.sh | |
catkin init | |
wstool init src | |
- name: Clone Sarax project | |
run: | | |
cd ~/sarax_ws/src | |
git clone ${{ github.server_url }}/${{ github.repository }}.git | |
ls -l | |
- name: Get dependencies using rosdep | |
run: | | |
cd ~/sarax_ws/ | |
. /opt/ros/$ROS_DISTRO/setup.sh | |
rosdep install --from-paths src --ignore-src -r -y --skip-keys="python-scipy" | |
- name: Build workspace | |
if: always() | |
run: | | |
cd ~/sarax_ws/ | |
. /opt/ros/$ROS_DISTRO/setup.sh | |
catkin build |