Skip to content

Commit 87f4a19

Browse files
committed
Add GitHub Actions CI for Arduino sketch compilation
- Test compilation on Arduino Uno, ESP8266, and ESP32 boards - Verify both ir_sender and ir_receiver sketches build successfully - Install IRremote library v4.1.2 as required by the code - Run on all pushes and pull requests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cf1a66d commit 87f4a19

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Arduino Build CI
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
branches: [ "**" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
sketch:
16+
- ac_control/ir_sender/ir_sender.ino
17+
- ac_control/ir_receiver/ir_receiver.ino
18+
board:
19+
- fqbn: "arduino:avr:uno"
20+
platform: "arduino:avr"
21+
name: "Arduino Uno"
22+
- fqbn: "esp8266:esp8266:nodemcuv2"
23+
platform: "esp8266:esp8266"
24+
platform-url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json"
25+
name: "ESP8266"
26+
- fqbn: "esp32:esp32:esp32"
27+
platform: "esp32:esp32"
28+
platform-url: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
29+
name: "ESP32"
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Arduino CLI
36+
uses: arduino/setup-arduino-cli@v1
37+
38+
- name: Install Arduino platform
39+
run: |
40+
if [ -n "${{ matrix.board.platform-url }}" ]; then
41+
arduino-cli config init
42+
arduino-cli config add board_manager.additional_urls ${{ matrix.board.platform-url }}
43+
fi
44+
arduino-cli core update-index
45+
arduino-cli core install ${{ matrix.board.platform }}
46+
47+
- name: Install IRremote library
48+
run: |
49+
arduino-cli lib install "[email protected]"
50+
51+
- name: Compile sketch for ${{ matrix.board.name }}
52+
run: |
53+
arduino-cli compile --fqbn ${{ matrix.board.fqbn }} ${{ matrix.sketch }}
54+
55+
- name: Build summary
56+
run: |
57+
echo "✅ Successfully built ${{ matrix.sketch }} for ${{ matrix.board.name }}"

0 commit comments

Comments
 (0)