mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Replace make quick_check with two explicit build targets: px4_sitl_default (validates native SITL toolchain) and px4_fmu-v5_default (validates NuttX cross-compile toolchain). quick_check built four targets: px4_sitl_test, px4_fmu-v5_default, tests, and check_format. The tests and check_format targets are redundant with checks.yml which already runs them on 8cpu RunsOn with ccache. The purpose of this workflow is to validate that PX4 builds from a fresh ubuntu.sh install on both Ubuntu 22.04 and 24.04, not to run tests or check formatting. Two targeted builds are sufficient. px4_fmu-v5_default is kept as the hardware target (same as quick_check) since it builds with the arm-none-eabi-gcc version that ubuntu.sh installs on both 22.04 and 24.04. Expected duration drop from 16-17 min to 6-8 min per matrix entry. Signed-off-by: Ramon Roche <mrpollo@gmail.com>
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
name: Ubuntu environment build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'stable'
|
|
- 'beta'
|
|
- 'release/**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
|
|
env:
|
|
RUNS_IN_DOCKER: true
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version: ['ubuntu:22.04', 'ubuntu:24.04']
|
|
runs-on: [runs-on,runner=4cpu-linux-x64,"image=ubuntu24-full-x64","run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
|
container:
|
|
image: ${{ matrix.version }}
|
|
volumes:
|
|
- /github/workspace:/github/workspace
|
|
steps:
|
|
- uses: runs-on/action@v2
|
|
|
|
- name: Fix git in container
|
|
run: |
|
|
# we only need this because we are running the job in a container
|
|
# when checkout pulls git it does it in a shared volume
|
|
# and file ownership changes between steps
|
|
# first we install git since its missing from the base image
|
|
# then we mark the directory as safe for other instances
|
|
# of git to use.
|
|
apt update && apt install git -y
|
|
git config --global --add safe.directory $(realpath .)
|
|
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Use AWS regional apt mirror
|
|
if: startsWith(runner.name, 'runs-on--')
|
|
run: ./Tools/ci/use_aws_apt_mirror.sh
|
|
|
|
- name: Install Deps
|
|
run: ./Tools/setup/ubuntu.sh
|
|
|
|
- uses: ./.github/actions/setup-ccache
|
|
id: ccache
|
|
with:
|
|
cache-key-prefix: ccache-ubuntu-${{ matrix.version }}
|
|
max-size: 200M
|
|
|
|
- name: Build px4_sitl_default
|
|
run: make px4_sitl_default
|
|
|
|
- name: Build px4_fmu-v5_default
|
|
run: make px4_fmu-v5_default
|
|
|
|
- uses: ./.github/actions/save-ccache
|
|
if: always()
|
|
with:
|
|
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
|