Skip to content

Add Github action : Create platformio.yml #1

Add Github action : Create platformio.yml

Add Github action : Create platformio.yml #1

Workflow file for this run

name: PlatformIO CI
description: Build the project with PlatformIO for every environment
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
pio-env: [ "Example1_FastStartup", "Example2_Debug", "Example3_WithWifi", "Example4_HandleCommand"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
# install the libraries before compiling
# otherwise compilation might fail to find the just-installed libraries
# - name: Install platformIO libraries
# run: pio lib install
- name: Build PlatformIO Project
run: pio run --environment ${{ matrix.pio-env }}