Add rotorS mavlink build test for PX4

This commit adds rotorS as a submodule of PX4 and adds a build test
This commit is contained in:
Jaeyoung-Lim
2021-04-30 08:04:19 +02:00
committed by JaeyoungLim
parent fabf702264
commit ceb8c0271c
4 changed files with 79 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
name: RotorS PX4 Build Test
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- 'px4io/px4-dev-simulation-bionic:2020-11-18' # Gazebo 9
container:
image: ${{ matrix.container }}
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: rotors_tests-RelWithDebInfo-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: rotors_tests-RelWithDebInfo-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 5" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Install glog
run: apt update && apt install -y libgoogle-glog-dev libyaml-cpp-dev
- name: Build PX4 RotorS
env:
PX4_CMAKE_BUILD_TYPE: RelWithDebInfo
DONT_RUN: 1
run: make px4_sitl rotors
- name: ccache post-run px4/firmware
run: ccache -s
+3
View File
@@ -63,3 +63,6 @@
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
path = src/drivers/uavcannode_gps_demo/libcanard
url = https://github.com/UAVCAN/libcanard
[submodule "Tools/rotors_simulator"]
path = Tools/rotors_simulator
url = https://github.com/ethz-asl/rotors_simulator.git
+20
View File
@@ -85,11 +85,29 @@ ExternalProject_Add(jsbsim_bridge
BUILD_ALWAYS 1
)
px4_add_git_submodule(TARGET git_rotors PATH "${PX4_SOURCE_DIR}/Tools/rotors_simulator")
ExternalProject_Add(rotors_simulator
SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/rotors_simulator/rotors_gazebo_plugins
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DNO_ROS=true
BINARY_DIR ${PX4_BINARY_DIR}/build_rotors
INSTALL_COMMAND ""
DEPENDS
git_rotors
USES_TERMINAL_CONFIGURE true
USES_TERMINAL_BUILD true
EXCLUDE_FROM_ALL true
BUILD_ALWAYS 1
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> -- -j1
)
# create targets for each viewer/model/debugger combination
set(viewers
none
jmavsim
gazebo
rotors
)
set(debuggers
@@ -178,6 +196,8 @@ foreach(viewer ${viewers})
add_dependencies(${_targ_name} px4 sitl_gazebo)
elseif(viewer STREQUAL "jmavsim")
add_dependencies(${_targ_name} px4 git_jmavsim)
elseif(viewer STREQUAL "rotors")
add_dependencies(${_targ_name} px4 rotors_simulator)
endif()
else()
if(viewer STREQUAL "gazebo")