Skip to content

Commit

Permalink
Merge branch 'main' into centralize-yaw-margin
Browse files Browse the repository at this point in the history
  • Loading branch information
somebody-once-told-me authored Nov 19, 2024
2 parents b154c62 + 7a7240c commit dd0e187
Show file tree
Hide file tree
Showing 2,599 changed files with 153,400 additions and 30,735 deletions.
31 changes: 25 additions & 6 deletions .ci/Jenkinsfile-compile
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,27 @@ pipeline {

def nuttx_builds_archive = [
target: [
"3dr_ctrl-zero-h7-oem-revg_default",
"airmind_mindpx-v2_default",
"ark_can-flow_canbootloader",
"ark_can-flow_default",
"ark_can-gps_canbootloader",
"ark_can-gps_default",
"ark_cannode_canbootloader",
"ark_cannode_default",
"ark_can-rtk-gps_canbootloader",
"ark_can-rtk-gps_default",
"ark_cannode_canbootloader",
"ark_cannode_default",
"ark_fmu-v6x_bootloader",
"ark_fmu-v6x_default",
"ark_fpv_bootloader",
"ark_fpv_default",
"ark_pi6x_bootloader",
"ark_pi6x_default",
"atl_mantis-edu_default",
"av_x-v1_default",
"bitcraze_crazyflie_default",
"bitcraze_crazyflie21_default",
"bitcraze_crazyflie_default",
"cuav_7-nano_default",
"cuav_can-gps-v1_canbootloader",
"cuav_can-gps-v1_default",
"cuav_nora_default",
Expand All @@ -66,19 +72,21 @@ pipeline {
"holybro_durandal-v1_default",
"holybro_kakutef7_default",
"holybro_kakuteh7_default",
"holybro_kakuteh7v2_default",
"holybro_kakuteh7mini_default",
"holybro_kakuteh7v2_default",
"holybro_pix32v5_default",
"matek_gnss-m9n-f4_canbootloader",
"matek_gnss-m9n-f4_default",
"matek_h743-mini_default",
"matek_h743-slim_default",
"matek_h743_default",
"micoair_h743_default",
"micoair_h743-aio_default",
"modalai_fc-v1_default",
"modalai_fc-v2_default",
"mro_ctrl-zero-classic_default",
"mro_ctrl-zero-f7_default",
"mro_ctrl-zero-f7-oem_default",
"mro_ctrl-zero-f7_default",
"mro_ctrl-zero-h7-oem_default",
"mro_ctrl-zero-h7_default",
"mro_pixracerpro_default",
Expand All @@ -89,8 +97,10 @@ pipeline {
"nxp_fmuk66-v3_default",
"nxp_fmuk66-v3_socketcan",
"nxp_mr-canhubk3_default",
"nxp_mr-canhubk3_fmu",
"nxp_ucans32k146_canbootloader",
"nxp_ucans32k146_default",
"nxp_tropic-community_default",
"omnibus_f4sd_default",
"px4_fmu-v2_default",
"px4_fmu-v2_fixedwing",
Expand All @@ -104,22 +114,31 @@ pipeline {
"px4_fmu-v5_debug",
"px4_fmu-v5_default",
"px4_fmu-v5_lto",
"px4_fmu-v5_rover",
"px4_fmu-v5_stackcheck",
"px4_fmu-v5_uavcanv0periph",
"px4_fmu-v5x_default",
"px4_fmu-v5x_rover",
"px4_fmu-v6c_default",
"px4_fmu-v6c_rover",
"px4_fmu-v6u_default",
"px4_fmu-v6u_rover",
"px4_fmu-v6x_default",
"px4_fmu-v6x_rover",
"px4_fmu-v6xrt_bootloader",
"px4_fmu-v6xrt_default",
"px4_fmu-v6xrt_rover",
"px4_io-v2_default",
"raspberrypi_pico_default",
"siyi_n7_default",
"sky-drones_smartap-airlink_default",
"spracing_h7extreme_default",
"thepeach_k1_default",
"thepeach_r1_default",
"uvify_core_default",
"siyi_n7_default"
"x-mav_ap-h743v2_default",
"zeroone_x6_bootloader",
"zeroone_x6_default",
],
image: docker_images.nuttx,
archive: true
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"extensions": [
"chiehyu.vscode-astyle",
"dan-c-underwood.arm",
"editorconfig.editorconfig",
"fredericbonnet.cmake-test-adapter",
"github.vscode-pull-request-github",
"marus25.cortex-debug",
Expand Down
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
insert_final_newline = true

[{*.{c,cpp,cc,h,hpp},CMakeLists.txt,Kconfig}]
indent_style = tab
tab_width = 8
# Not in the official standard, but supported by many editors
max_line_length = 120

[*.yaml, *.yml]
indent_style = space
indent_size = 2
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ body:
3. Took off '....'
4. See error
validations:
required: true
required: false

- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
required: false

- type: textarea
attributes:
Expand All @@ -45,7 +45,7 @@ body:
placeholder: |
# PASTE HERE THE LINK TO THE LOG
validations:
required: true
required: false

- type: markdown
attributes:
Expand All @@ -60,14 +60,14 @@ body:
placeholder: |
# If you don't know the version, paste the output of `ver all` in the MAVLink Shell of QGC
validations:
required: true
required: false

- type: input
attributes:
label: Flight controller
description: Specify your flight controller model (what type is it, where was it bought from, ...).
validations:
required: true
required: false

- type: dropdown
attributes:
Expand Down
174 changes: 174 additions & 0 deletions .github/workflows/build_all_targets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com

name: Build all targets

on:
workflow_dispatch:
inputs:
tag:
required: true
description: release version
push:
tags:
- 'v*'
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/**'
pull_request:
branches:
- '*'

jobs:
group_targets:
name: Scan for Board Targets
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
tagname: ${{ steps.set-tag.outputs.tagname }}
branchname: ${{ steps.set-branch.outputs.branchname }}
steps:
- uses: actions/checkout@v4

- name: Install Python Dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "./Tools/setup/requirements.txt"

- id: set-matrix
run: echo "::set-output name=matrix::$(./Tools/ci/generate_board_targets_json.py --group)"

- id: set-timestamp
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"

# This job is also triggered with versioned tags
# Creating a and pushing a tag starting with "v" just as "v1.0.0"
# will trigger this workflow and when all builds are done create a Github Release
# then it will upload all binaries built as assets
# Additionally, we can also trigger this step manually
# From the Github Actions tab for this repository:
# https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml
# You can now click a "Run Workflow" button that will prompt you for a tag name
# This tag name has to match an existing tag otherwise the new release will be detached
# Note: Only developers with "write" permission to the repository can use this feature
- id: set-tag
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
run: echo "::set-output name=tagname::${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}"

- id: set-branch
run: echo "::set-output name=branchname::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"

- name: Debug Matrix Output
if: runner.debug == '1'
run: echo "$(./Tools/ci/generate_board_targets_json.py --group --verbose)"

setup:
name: Build Group [${{ matrix.group }}]
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
needs: group_targets
strategy:
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
fail-fast: false
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Git ownership workaround
run: git config --system --add safe.directory '*'

- name: Setup ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
restore-keys: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}

- name: Configure ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Building [${{ matrix.group }}]
run: |
./Tools/ci/build_all_runner.sh ${{matrix.targets}}
- name: Arrange Build Artifacts
run: |
./Tools/ci/package_build_artifacts.sh
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: px4_${{matrix.group}}_build_artifacts
path: artifacts/

- name: Cache Save
run: ccache -s

artifacts:
name: Upload Artifacts to S3
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
needs: [setup, group_targets]
if: contains(fromJSON('["main", "stable", "beta"]'), needs.group_targets.outputs.branchname)
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
merge-multiple: true

- name: Branch Name
run: |
echo "${{ needs.group_targets.outputs.branchname }}"
- name: Uploading Artifacts to S3 [${{ needs.group_targets.outputs.branchname == 'main' && 'master' || needs.group_targets.outputs.branchname }}]
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: artifacts/
DEST_DIR: Firmware/${{ needs.group_targets.outputs.branchname == 'main' && 'master' || needs.group_targets.outputs.branchname }}/

release:
name: Create Release and Upload Artifacts
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
needs: [setup, group_targets]
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4

- name: Arrange Binaries
run: |
mkdir artifacts
cp **/**/*.px4 artifacts/
- name: Upload Binaries to Release
uses: softprops/action-gh-release@v2
with:
name: ${{ needs.group_targets.outputs.tagname }}
tag_name: ${{ needs.group_targets.outputs.tagname }}
draft: true
files: artifacts/*.px4
2 changes: 2 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ jobs:
matrix:
check: [
"check_format",
"check_newlines",
"tests",
"tests_coverage",
"px4_fmu-v2_default stack_check",
"validate_module_configs",
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"px4_sitl_allyes",
"airframe_metadata",
"module_documentation",
"parameters_metadata",
Expand Down
Loading

0 comments on commit dd0e187

Please sign in to comment.