-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (32 loc) · 1.08 KB
/
firmware.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: PlatformIO CI
on: [pull_request, push]
defaults:
run:
working-directory: ./
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set FIRMWARE_VERSION variable
run: |
FIRMWARE_VER=$(cat VERSION)
echo "FIRMWARE_VERSION=$FIRMWARE_VER" >> $GITHUB_ENV
- name: Set FIRMWARE_COMMIT_HASH variable
run: echo "FIRMWARE_COMMIT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Build
run: pio run
- name: Rename firmware
run: mv .pio/build/rpipicow/firmware.uf2 .pio/build/rpipicow/xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ env.FIRMWARE_COMMIT_SHA }}.uf2
- uses: actions/upload-artifact@v3
with:
name: xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ env.FIRMWARE_COMMIT_SHA }}
path: .pio/build/rpipicow/xrp-wpilib-firmware-*.uf2