From 35b5cfeed48bf1194223d0c85b234feda4fc6eda Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Wed, 24 Apr 2024 07:50:29 +0200 Subject: [PATCH] Update compile_examples.yml --- .github/workflows/compile_examples.yml | 35 +++++++++++++++++++------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index d44bd97..42e799d 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -1,16 +1,33 @@ name: Compile Examples -on: - - push - - pull_request +on: [push, pull_request] jobs: - compile-examples: + build-arduino: runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[arduino]') + steps: + - uses: actions/checkout@v3 + - uses: arduino/compile-sketches@v1 + with: + libraries: | + - source-path: ./ + build-esp8266: + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[esp8266]') steps: - - uses: actions/checkout@v3 - - uses: arduino/compile-sketches@v1 - with: - libraries: | - - source-path: ./ + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + - name: Install ESP8266 platform + run: | + arduino-cli core update-index + arduino-cli core install esp8266:esp8266 + + - name: Compile code + run: | + arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 ./path-to-your-sketch