Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build

on:
push:
pull_request:
branches: [ master ]

jobs:
Expand All @@ -10,32 +10,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
example: [examples/ACUnit/ACUnit.ino, examples/AirQualitySensor/AirQualitySensor/AirQualitySensor.ino, examples/Blinds/Blinds.ino, examples/ContactSensor/ContactSensor.ino, examples/DimSwitch/DimSwitch.ino, examples/doorbell/doorbell.ino, examples/Fan/Fan.ino, examples/GarageDoor/GarageDoor.ino, examples/Light/Light/Light.ino, examples/Lock/Lock/Lock.ino, examples/Lock/Lock_with_feedback/Lock_with_feedback.ino, examples/MotionSensor/MotionSensor.ino, examples/PowerSensor/PowerSensor.ino, examples/Relay/MultiRelays_advance/MultiRelays_advance.ino, examples/Relay/Relay/Relay.ino, examples/Speaker/Speaker.ino, examples/Switch/MultiSwitch_advance/MultiSwitch_advance.ino, examples/Switch/MultiSwitch_beginner/MultiSwitch_beginner.ino, examples/Switch/MultiSwitch_intermediate/MultiSwitch_intermediate.ino, examples/Switch/Switch/Switch.ino, examples/Thermostat/Thermostat.ino, examples/TV/TV.ino]
example: [examples/ACUnit, examples/AirQualitySensor/AirQualitySensor, examples/Blinds, examples/ContactSensor, examples/DimSwitch, examples/doorbell, examples/Fan, examples/GarageDoor, examples/Light/Light, examples/Lock/Lock, examples/Lock/Lock_with_feedback, examples/MotionSensor, examples/PowerSensor, examples/Relay/MultiRelays_advance, examples/Relay/Relay, examples/Speaker, examples/Switch/MultiSwitch_advance, examples/Switch/MultiSwitch_beginner, examples/Switch/MultiSwitch_intermediate, examples/Switch/Switch, examples/Thermostat, examples/TV]

steps:
- uses: actions/checkout@v2
- name: Cache pip

- name: Step 1 - Checkout Repo
uses: actions/checkout@v2
- name: Step 2 - 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
- name: Step 3 - Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
- name: Step 4 - Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
- name: Step 5 - Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Install library dependencies
- name: Step 6 - Install library dependencies
run: |
pio lib --global install "bblanchon/ArduinoJson"
pio lib --global install "links2004/WebSockets"
- name: Run build test using PlatformIO
- name: Step 7 - Run build test using PlatformIO
run: pio ci --lib="." -b esp12e -b esp32dev
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}