diff --git a/.github/workflows/carbonix_build.yml b/.github/workflows/carbonix_build.yml index 411a6bed2e..9c83a8cd5c 100644 --- a/.github/workflows/carbonix_build.yml +++ b/.github/workflows/carbonix_build.yml @@ -1,4 +1,4 @@ -name: Build and Archive +name: Carbonix Build on: push: @@ -125,6 +125,9 @@ on: - '.vscode/**' - '.github/ISSUE_TEMPLATE/**' + release: + types: [published] + workflow_dispatch: concurrency: @@ -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 diff --git a/ArduPlane/ReleaseNotes.txt b/ArduPlane/ReleaseNotes.txt index 245d131a32..fe0d8ffb46 100644 --- a/ArduPlane/ReleaseNotes.txt +++ b/ArduPlane/ReleaseNotes.txt @@ -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 diff --git a/libraries/AP_Common/AP_FWVersionDefine.h b/libraries/AP_Common/AP_FWVersionDefine.h index 1b00045c80..6e1407fb88 100644 --- a/libraries/AP_Common/AP_FWVersionDefine.h +++ b/libraries/AP_Common/AP_FWVersionDefine.h @@ -24,7 +24,7 @@ #include #ifdef CARBOPILOT -#define AP_CUSTOM_FIRMWARE_STRING "CxPilot 5.1.2" +#define AP_CUSTOM_FIRMWARE_STRING "CxPilot-5.1.3" #endif /* diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Volanti-M5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Volanti-M5/hwdef.dat index 5957be31a8..fe9a90cfbf 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Volanti-M5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Volanti-M5/hwdef.dat @@ -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