Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: speed up Carbonix build script #225

Merged
merged 13 commits into from
Dec 29, 2024

Conversation

robertlong13
Copy link
Collaborator

SW-420

@robertlong13 robertlong13 force-pushed the feature/SW-420-speed-up-build-ci branch 2 times, most recently from de4bf03 to 4ba1132 Compare October 9, 2024 00:54
@robertlong13 robertlong13 marked this pull request as draft October 15, 2024 02:29
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch from 959fd7f to 618eef4 Compare October 15, 2024 02:40
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch from f58e397 to 5e19531 Compare November 27, 2024 03:20
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch from 9b8e03a to 748abd3 Compare December 9, 2024 09:13
@loki077 loki077 added SKIP_BUILD This is to skip carbonix build and removed SKIP_BUILD This is to skip carbonix build labels Dec 10, 2024
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch 2 times, most recently from 437c6ec to c7f039e Compare December 17, 2024 02:50
@robertlong13 robertlong13 force-pushed the feature/SW-420-speed-up-build-ci branch 3 times, most recently from ec2b927 to ec37828 Compare December 24, 2024 21:01
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch 9 times, most recently from 1660762 to 690367b Compare December 27, 2024 05:46
@robertlong13 robertlong13 force-pushed the feature/SW-420-speed-up-build-ci branch from efe4745 to 24fe418 Compare December 28, 2024 00:18
Copy link
Collaborator Author

@robertlong13 robertlong13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@loki077 can give it the green check for me since github counts this as my PR (since I opened it way back when it was a smaller scope)

This commit introduces a new script, `aircraft_config.py`, which
automates the process of packaging Aircraft firmware according to the
xml file provided.
The script reads an XML file containing the aircraft configuration and
peripheral firmware information, replaces the 'cx_pilot_commit_id'
placeholder with the actual commit ID, and copies the XML file to the
hwdef directory to embed it in @RomfS. It then builds the ArduPlane
firmware for the specified flight controller and organizes the output
files into a directory structure suitable for AFQT tool.

Key features:
- Parses the XML configuration file to extract the flight controller's
board name.
- Replaces the 'cx_pilot_commit_id' placeholder in the XML file with the
provided commit ID.
- Copies the modified XML file to the ROMFS_custom directory.
- Copies the Carbonix Common lua script into ROMFS_custom directory.
- Organizes the output files into a structured directory easy for AFQT.

Usage:
    python aircraft_config.py <xml_file> <commit_id>

This script simplifies the firmware build process and ensures that all
necessary files are correctly organized for AFQT.
As the scripts are going to be used from CarbonixCommon and are going to
be added to the hwdef files during build from CI.
This is a major change to the Carbonix CI build process.
features:
 - Build periph, and Flight controller boards in parallel.
 - Generate Aircraft Configuration packages using xml file in
 CarbonixCommo/aircraft_configuration folder. This is donw using the new
 aircraft_config.py script.
 - Upload the generated AC packages to the S3 server in parallel.
This fixes the bug where the PR commit in the folder name does not
matches the one in the build.
Add lua script in aircraft models to allow for customisation of the
aircraft configuration. T
his willl allow us to individualise the lua script for each aircraft
model and also rename the lua script if needed.
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch from 24fe418 to 7e58d93 Compare December 28, 2024 23:47
@loki077 loki077 marked this pull request as ready for review December 28, 2024 23:50
@loki077 loki077 force-pushed the feature/SW-420-speed-up-build-ci branch from 7e58d93 to 3fd27a2 Compare December 28, 2024 23:51
Copy link
Contributor

@loki077 loki077 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - skipping the changes which cause long job name.

@loki077 loki077 merged commit c1132c8 into CxPilot-7 Dec 29, 2024
55 checks passed
@loki077 loki077 deleted the feature/SW-420-speed-up-build-ci branch December 29, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants