Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compile examples #11

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
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
35 changes: 26 additions & 9 deletions .github/workflows/compile_examples.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions compile_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Compile Arduino Code

on: [push, pull_request]

jobs:
build-arduino:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[arduino]')
steps:
- uses: actions/checkout@v2
- uses: arduino/compile-sketches@v1
with:
libraries: |
- source-path: ./
build-esp8266:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[esp8266]')
steps:
- name: Checkout code
uses: actions/checkout@v2

- 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:d1_mini ./examples/Wemos_D1_mini_AM2302_Sensor_Array_Example/Wemos_D1_mini_AM2302_Sensor_Array_Example.ino