Firmware: revise readme and add instructions for Mac #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PlatformIO firmware CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Build PlatformIO Project | |
run: pio run | |
- name: Upload Build Artifacts for Debug Environment | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-debug | |
path: .pio/build/debug/firmware.* | |
- name: Zip 3D files and CSVs | |
run: | | |
mkdir -p artifacts | |
zip -r artifacts/firmware_build_artifacts.zip .pio/build/debug/firmware.* | |
- name: Configure AWS Credentials | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Sync artifacts to S3 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
aws s3 sync artifacts s3://atopile/swoop/firmware --delete --cache-control max-age=0,no-cache |