77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
name: Firmware
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
paths:
|
|
- "Firmware/**"
|
|
- ".github/workflows/**"
|
|
|
|
#
|
|
jobs:
|
|
make_firmware:
|
|
runs-on: ubuntu-latest
|
|
name: Firmware Builder
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Cache PlatformIO
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.platformio
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
- name: Install PlatformIO
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --upgrade platformio
|
|
|
|
- name: Run PlatformIO
|
|
run: cd Firmware && make build
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Display_Binaries
|
|
path: Firmware/.pio/build/ATmega328P/firmware.*
|
|
|
|
delint:
|
|
runs-on: ubuntu-latest
|
|
name: Delinter
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Cache PlatformIO
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.platformio
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
- name: Install PlatformIO
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --upgrade platformio
|
|
|
|
- name: Run Delinter
|
|
run: cd Firmware && pio check
|
|
#
|