Skip to content

Firmware Build

Firmware Build #222

name: Firmware Build
on:
push:
branches:
- master
- v2.2x
paths:
- '.github/workflows/build-firmware.yml'
- 'firmware/src/**'
pull_request:
branches:
- master
paths:
- '.github/workflows/build-firmware.yml'
- 'firmware/src/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
container:
image: shaguarger/platformio
volumes:
- ${{ github.workspace }}:/src
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
# Runs a single command using the runners shell
- name: Workaround bug in github actions issue 6775
run: |
git config --global --add safe.directory '*'
- name: Build Firmware Nano 33 BLE
run: |
cd /src/firmware/src
pio run -e Head_Tracker-Nano33_BLE
- name: Build Firmware DTQSYS Ht
run: |
cd /src/firmware/src
pio run -e Head_Tracker-DTQSys
- name: Build Firmware Arduino Nano 33 BLE Sense Rev 2
run: |
cd /src/firmware/src
pio run -e Head_Tracker-Nano33_BLE_Sense_Rev_2
- name: Build XIAO Sense Firmware
run: |
cd /src/firmware/src
pio run -e Head_Tracker-XIAOSense
- name: Build XIAO 52840 Firmware
run: |
cd /src/firmware/src
pio run -e Head_Tracker-XIAO52840
# Runs a set of commands using the runners shell
- name: Package Firmware
uses: 'actions/upload-artifact@v2'
with:
name: Firmware_Binaries
path: |
/src/firmware/src/.pio/build/*/*.bin
/src/firmware/src/.pio/build/*/*.uf2
retention-days: 90
if-no-files-found: error