-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (76 loc) · 2.5 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Setup and build packages
# To manually run the workflow on GH, use the workflow_dispatch event trigger
# on: workflow_dispatch
# To automatically run on every push to GH, use the push and pull_request event trigger
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: Update ROS dependencies
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
rosdep update
- name: Create dependency workspace
run: |
mkdir -p ~/dependencies
cd ~/dependencies
- name: Install PX4 Dependencies
run: |
mkdir -p ~/dependencies
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
chmod +x ~/dependencies/ubuntu.sh && . ~/dependencies/ubuntu.sh
- name: Install MAVROS using binaries
run: |
mkdir -p ~/dependencies
cd ~/dependencies
sudo apt-get install ros-$ROS_DISTRO-mavros ros-$ROS_DISTRO-mavros-extras
- name: Install ROS building dependencies
run: |
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential -y
sudo apt install python3-catkin-tools python3-rosinstall-generator python3-osrf-pycommon -y
sudo apt-get install ros-$ROS_DISTRO-rqt ros-$ROS_DISTRO-rqt-common-plugins -y
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