mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
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:
committed by
JaeyoungLim
parent
fabf702264
commit
ceb8c0271c
@@ -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
|
||||
@@ -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
|
||||
|
||||
Submodule
+1
Submodule Tools/rotors_simulator added at 06fb8b271e
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user