Skip to content

Commit

Permalink
👷 (Arduino): Build examples and lint library
Browse files Browse the repository at this point in the history
  • Loading branch information
leon0399 committed Jul 24, 2024
1 parent 49a580e commit 11a1d41
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
pull_request:
paths-ignore:
- "**/*.md"
push:
branches:
- master
- main
- develop
- support/*
paths-ignore:
- "**/*.md"

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: arduino/arduino-lint-action@v1

build-examples:
runs-on: ubuntu-latest

strategy:
matrix:
fqbn:
- "esp32:esp32:esp32"
- "esp32:esp32:esp32s3"
- "esp32:esp32:esp32c3"
nimble: [ false, true ]

steps:
- uses: actions/checkout@v4

- uses: arduino/compile-sketches@v1
with:
fqbn: ${{ matrix.fqbn }}
cli-compile-flags: --build-property build.extra_flags=-DBLESERIAL_USE_NIMBLE=${{ matrix.nimble }}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- "SerialToSerialBLE"
boards:
- [ esp32dev, esp32-s3-devkitc-1, esp32-c3-devkitm-1 ]
nimble: [ true, false ]
nimble: [ false, true ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
pio ci --lib="." --board=${{ join(matrix.boards, ' --board=') }} ${{ matrix.nimble && '--project-option="lib_deps=h2zero/NimBLE-Arduino@^1.4.0"' || '' }}
env:
PLATFORMIO_CI_SRC: "./examples/${{ matrix.example }}/*.ino"
PLATFORMIO_BUILD_FLAGS: "-D BLESERIAL_USE_NIMBLE=${{ matrix.nimble && 'true' || 'false' }}"
PLATFORMIO_BUILD_FLAGS: "-D BLESERIAL_USE_NIMBLE=${{ matrix.nimble }}"

0 comments on commit 11a1d41

Please sign in to comment.