Skip to content

Add CI workflow building vehicle and vehicle_v4 firmware #1

Add CI workflow building vehicle and vehicle_v4 firmware

Add CI workflow building vehicle and vehicle_v4 firmware #1

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment: [vehicle, vehicle_v4]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
.pio
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini') }}
restore-keys: |
pio-${{ runner.os }}-${{ matrix.environment }}-
- name: Install PlatformIO
run: pip install platformio
- name: Build ${{ matrix.environment }}
run: pio run -e ${{ matrix.environment }}
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.environment }}-firmware
path: |
.pio/build/${{ matrix.environment }}/firmware.bin
.pio/build/${{ matrix.environment }}/firmware.elf