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

Feature/sw 223 group of issues range finder relay servo #144

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 58 additions & 10 deletions .github/workflows/carbonix_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Archive
name: Carbonix Build

on:
push:
Expand Down Expand Up @@ -125,6 +125,9 @@ on:
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'

release:
types: [published]

workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -196,16 +199,61 @@ jobs:
with:
files: "build/CubeOrange/*, build/CarbonixCubeOrange/*, build/sitl/*, build/CarbonixF405/*, build/CarbonixF405-NoCrystal/* , build/Volanti-M1/*, build/Volanti-M2/*, build/Volanti-M3/*, build/Volanti-M4/*, build/Volanti-M5/*, build/Volanti-LWing/*, build/Volanti-RWing/*, build/Volanti-LTail/*, build/Volanti-RTail/*, build/Ottano-M1/*, build/Ottano-M2/*, build/Ottano-M3/*, build/Ottano-M4/*, build/Ottano-M5/*, build/Ottano-LWing/*, build/Ottano-RWing/*, build/Ottano-LTail/*, build/Ottano-RTail/*"
fail: true
- name: Install zip utility
run: sudo apt-get install zip
- name: Archive build output
- name: Extract firmware version and commit id
id: extract_info
run: |
echo build/*/bin/ | xargs -n 1 cp -v ArduPlane/ReleaseNotes.txt
cp -v ArduPlane/ReleaseNotes.txt build/
zip -r build-output.zip build/*/bin/*
FIRMWARE_VERSION=$(grep -oP '#define AP_CUSTOM_FIRMWARE_STRING "\K(.*)(?=")' libraries/AP_Common/AP_FWVersionDefine.h)
COMMIT_ID=$(git rev-parse --short HEAD)
echo "firmware_version=$FIRMWARE_VERSION" >> $GITHUB_ENV
echo "commit_id=$COMMIT_ID" >> $GITHUB_ENV
shell: sh -e {0}
- name: Gather build output
run: |
mkdir -p temp
for dir in CubeOrange CarbonixCubeOrange sitl CarbonixF405 Volanti-M1 Volanti-M2 Volanti-M3 Volanti-M4 Volanti-M5 Volanti-LWing Volanti-RWing Volanti-LTail Volanti-RTail Ottano-M1 Ottano-M2 Ottano-M3 Ottano-M4 Ottano-M5 Ottano-LWing Ottano-RWing Ottano-LTail Ottano-RTail; do
mkdir -p temp/$dir/bin
cp -v build/$dir/bin/* temp/$dir/bin/
done
cp -v ArduPlane/ReleaseNotes.txt temp/
shell: sh -e {0}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: compiled-output
path: build-output.zip
name: ${{ env.firmware_version }}_${{ env.commit_id }}
path: temp
retention-days: 90

- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y curl unzip
curl "https://d1vvhvl2y92vvt.cloudfront.net/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Set BRANCH_NAME
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV

- name: Upload artifacts to S3
run: |
DATE_HR=$(date +%Y%m%d_%H%M)
if ${{ github.event_name == 'release' }}; then
PATH_TO_S3=s3://carbonix-firmware-release-files/Carbopilot_V2/${DATE_HR}_${{ env.firmware_version }}_${{ env.commit_id }}/
echo "Uploading to: $PATH_TO_S3"
aws s3 cp temp/ $PATH_TO_S3 --recursive
elif ${{ github.event_name == 'push' && startsWith(env.BRANCH_NAME, 'CxPilot') }}; then
PATH_TO_S3=s3://carbonix-firmware-dev-files/Carbopilot_V2/${{ env.BRANCH_NAME }}/${DATE_HR}_${{ env.firmware_version }}_${{ env.commit_id }}/
echo "Uploading to: $PATH_TO_S3"
aws s3 cp temp/ $PATH_TO_S3 --recursive
elif ${{ github.event_name == 'pull_request' }}; then
PATH_TO_S3=s3://carbonix-firmware-dev-files/Carbopilot_V2/PR/${DATE_HR}_${{ env.firmware_version }}_${{ env.commit_id }}_${{ github.event.pull_request.number }}/
echo "Uploading to: $PATH_TO_S3"
aws s3 cp temp/ $PATH_TO_S3 --recursive
fi
6 changes: 6 additions & 0 deletions ArduPlane/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Release 5.1.3 29th May 2024
------------------------------
- Volanti-M5 CPN added Range Finder Support
- workflow: Carbonix_build: push data to AWS S3
- workflow: carbonix_build rename artifacts and cleanup

Release 5.1.2 6th May 2024
------------------------------
- .github: added no crystal build for Carbonix AP_Periph boards
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Common/AP_FWVersionDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <AP_Vehicle/AP_Vehicle_Type.h>

#ifdef CARBOPILOT
#define AP_CUSTOM_FIRMWARE_STRING "CxPilot 5.1.2"
#define AP_CUSTOM_FIRMWARE_STRING "CxPilot-5.1.3"
#endif

/*
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/Volanti-M5/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ COMPASS IST8310 I2C:ALL_EXTERNAL:0x0E true ROTATION_NONE
#enable baro
define HAL_PERIPH_ENABLE_BARO
BARO MS56XX I2C:0:0x76

# enable Rangefinder
define HAL_PERIPH_ENABLE_RANGEFINDER 1
Loading