Repository navigation
Add CI workflow building vehicle and vehicle_v4 firmware #1
This file contains hidden or 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: 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 |