Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
loki077 committed Dec 30, 2024
1 parent 200928c commit 7b1793f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/carbonix_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ jobs:
shell: sh -e {0}

- name: Run aircraft_config.py
id: aircraft_config
run: |
python Tools/Carbonix_scripts/aircraft_config.py "libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/aircraft_configuration/${{ matrix.xml_file }}.xml" "${{ env.commit_id }}"
# Check if the folder exists if not skip the next steps
if [ ! -d "final-output" ]; then
echo "No final-output folder found, skipping the next steps"
exit 0
if [ -d "final-output" ]; then
echo "exists=true" >> $GITHUB_ENV
else
echo "exists=false" >> $GITHUB_ENV
fi
- name: Install AWS CLI
if: steps.aircraft_config.outputs.exists == 'true'
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y curl unzip
Expand All @@ -336,23 +338,27 @@ jobs:
./aws/install --update
- name: Configure AWS credentials
if: steps.aircraft_config.outputs.exists == 'true'
uses: aws-actions/configure-aws-credentials@v4
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: Upload to S3
if: steps.aircraft_config.outputs.exists == 'true'
run: |
PATH_TO_S3=${{ needs.setup-s3-path.outputs.s3_path }}
echo "Uploading Artifacts to: $PATH_TO_S3"
aws s3 cp final-output/ $PATH_TO_S3 --recursive
- name: Upload build artifacts
if: steps.aircraft_config.outputs.exists == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.xml_file }}
path: final-output/${{ matrix.xml_file }}/


build-sitl:
runs-on: 'windows-latest'
Expand Down

0 comments on commit 7b1793f

Please sign in to comment.