mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
ci: build targets using px4-dev container
This commit is contained in:
parent
0cb7b8b525
commit
d60d760eb4
14
.github/workflows/build_all_targets.yml
vendored
14
.github/workflows/build_all_targets.yml
vendored
@ -71,6 +71,11 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install ccache
|
||||
run: |
|
||||
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
|
||||
ccache
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
@ -92,9 +97,16 @@ jobs:
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Missing dependencies for ${{ matrix.arch }}
|
||||
if: contains(fromJSON('["aarch64", "armhf"]'), matrix.arch)
|
||||
run: |
|
||||
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
|
||||
g++-aarch64-linux-gnu \
|
||||
g++-arm-linux-gnueabihf
|
||||
|
||||
- name: Building [${{ matrix.group }}]
|
||||
run: |
|
||||
./Tools/ci/build_all_runner.sh ${{matrix.targets}}
|
||||
./Tools/ci/build_all_runner.sh ${{matrix.targets}} ${{matrix.arch}}
|
||||
|
||||
- name: Arrange Build Artifacts
|
||||
run: |
|
||||
|
||||
@ -87,20 +87,17 @@ def process_target(px4board_file, target_name):
|
||||
|
||||
if platform not in excluded_platforms:
|
||||
# get the container based on the platform and toolchain
|
||||
container = 'ghcr.io/px4/px4-dev:main'
|
||||
if platform == 'posix':
|
||||
container = 'px4io/px4-dev-base-focal:2021-09-08'
|
||||
group = 'base'
|
||||
if toolchain:
|
||||
if toolchain.startswith('aarch64'):
|
||||
container = 'px4io/px4-dev-aarch64:2022-08-12'
|
||||
group = 'aarch64'
|
||||
elif toolchain == 'arm-linux-gnueabihf':
|
||||
container = 'px4io/px4-dev-armhf:2023-06-26'
|
||||
group = 'armhf'
|
||||
else:
|
||||
if verbose: print(f'unmatched toolchain: {toolchain}')
|
||||
elif platform == 'nuttx':
|
||||
container = 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
||||
group = 'nuttx'
|
||||
else:
|
||||
if verbose: print(f'unmatched platform: {platform}')
|
||||
@ -124,7 +121,7 @@ if(verbose):
|
||||
# - Events
|
||||
metadata_targets = ['airframe_metadata', 'parameters_metadata', 'extract_events']
|
||||
grouped_targets['base'] = {}
|
||||
grouped_targets['base']['container'] = 'px4io/px4-dev-base-focal:2021-09-08'
|
||||
grouped_targets['base']['container'] = 'ghcr.io/px4/px4-dev:main'
|
||||
grouped_targets['base']['manufacturers'] = {}
|
||||
grouped_targets['base']['manufacturers']['px4'] = []
|
||||
grouped_targets['base']['manufacturers']['px4'] += metadata_targets
|
||||
|
||||
@ -4,8 +4,9 @@ mkdir artifacts
|
||||
cp **/**/*.px4 artifacts/
|
||||
cp **/**/*.elf artifacts/
|
||||
for build_dir_path in build/*/ ; do
|
||||
build_dir_path=${build_dir_path::${#build_dir_path}-1}
|
||||
build_dir=${build_dir_path#*/}
|
||||
build_dir=${build_dir::${#build_dir}-1}
|
||||
target_name=$build_dir
|
||||
mkdir artifacts/$build_dir
|
||||
find artifacts/ -maxdepth 1 -type f -name "*$build_dir*"
|
||||
# Airframe
|
||||
@ -26,21 +27,23 @@ for build_dir_path in build/*/ ; do
|
||||
echo "----------"
|
||||
done
|
||||
|
||||
# general metadata
|
||||
mkdir artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
|
||||
# Airframe
|
||||
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
|
||||
# Parameters
|
||||
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/parameters.json.xz artifacts/_general/
|
||||
# Actuators
|
||||
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
|
||||
# Events
|
||||
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
|
||||
# ROS 2 msgs
|
||||
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
|
||||
# Module Docs
|
||||
ls -la artifacts/_general/
|
||||
if [ -d artifacts/px4_sitl_default ]; then
|
||||
# general metadata
|
||||
mkdir artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
|
||||
# Airframe
|
||||
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
|
||||
# Parameters
|
||||
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/parameters.json.xz artifacts/_general/
|
||||
# Actuators
|
||||
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
|
||||
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
|
||||
# Events
|
||||
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
|
||||
# ROS 2 msgs
|
||||
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
|
||||
# Module Docs
|
||||
ls -la artifacts/_general/
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user