Skip to content

wip

wip #9

Workflow file for this run

name: ci
on:
push:
branches: [main, develop]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
platformio:
runs-on: ubuntu-latest
name: PlatformIO build and test.
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: Build
run: pio run
- name: Static code analysis
run: pio check
- name: Unittests
run: pio test
clang-format:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
name: Format check.
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
with:
source: './'
extensions: 'h,hpp,c,cpp'
clangFormatVersion: 12