Skip to content

Commit

Permalink
CI: upload Cygwin SITL to AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Jun 25, 2024
1 parent 578c178 commit 4ded27f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/carbonix_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ jobs:
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "build/CubeOrange/*, build/CubeOrange-Volanti/*, build/CubeOrange-Ottano/*, build/sitl/*, build/CarbonixF405/*, build/CarbonixF405-no-crystal/*"
files: "build/CubeOrange/*, build/CubeOrange-Volanti/*, build/CubeOrange-Ottano/*, build/CarbonixF405/*, build/CarbonixF405-no-crystal/*"
fail: true
- name: Extract firmware version and commit id
id: extract_info
Expand All @@ -192,7 +192,7 @@ jobs:
- name: Gather build output
run: |
mkdir -p temp/others
for dir in CubeOrange CubeOrange-Volanti CubeOrange-Ottano sitl CarbonixF405 CarbonixF405-no-crystal; do
for dir in CubeOrange CubeOrange-Volanti CubeOrange-Ottano CarbonixF405 CarbonixF405-no-crystal; do
mkdir -p temp/others/$dir/bin
cp -vr build/$dir/bin/* temp/others/$dir/bin/
done
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/cygwin_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,24 @@ jobs:
name: binaries
path: artifacts
retention-days: 90

- name: Upload artifacts to S3
env:
PATH: /usr/bin:$(cygpath ${SYSTEMROOT})/system32
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
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 }}/sitl/
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 }}/sitl/
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 }}/sitl/
echo "Uploading to: $PATH_TO_S3"
aws s3 cp temp/ $PATH_TO_S3 --recursive
fi
2 changes: 1 addition & 1 deletion Tools/Carbonix_scripts/carbonix_waf_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
echo "Running distclean..."
./waf distclean

main_boards=("CubeOrange" "CubeOrange-Volanti" "CubeOrange-Ottano" "sitl")
main_boards=("CubeOrange" "CubeOrange-Volanti" "CubeOrange-Ottano")
for board in "${main_boards[@]}"; do
echo "Compiling ArduPlane for $board..."
./waf configure --board "$board" --define=CARBOPILOT=1
Expand Down

0 comments on commit 4ded27f

Please sign in to comment.