Re-works the build system to use Zephyr's West tool #214
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: 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 | |
# 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 |