Skip to content

Commit 0758765

Browse files
committed
add ci workflow to check sketches deps
1 parent 60f1504 commit 0758765

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check sketches dependencies
2+
on:
3+
pull_request:
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
check-sketches-deps:
9+
runs-on: ubuntu-latest
10+
env:
11+
ARDUINO_CLI_PATH: '/home/runner/bin'
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install the latest version of Arduino CLI
17+
run: |
18+
mkdir -p ${{ env.ARDUINO_CLI_PATH }}
19+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=${{ env.ARDUINO_CLI_PATH }} sh
20+
21+
- name: Update Arduino cores and libraries and install Zephyr core
22+
run: |
23+
export PATH="${{ env.ARDUINO_CLI_PATH }}:$PATH"
24+
arduino-cli update
25+
arduino-cli core install arduino:zephyr
26+
27+
- name: Verify sketches
28+
run: |
29+
export PATH="${{ env.ARDUINO_CLI_PATH }}:$PATH"
30+
SKETCHES=$(find . -name "*.ino")
31+
for SKETCH in $SKETCHES; do
32+
echo "Verifying $SKETCH"
33+
arduino-cli compile --fqbn arduino:zephyr:unoq "$SKETCH"
34+
done

0 commit comments

Comments
 (0)