-
-
Notifications
You must be signed in to change notification settings - Fork 8
78 lines (64 loc) · 3.13 KB
/
compile_arduino_library.yml
File metadata and controls
78 lines (64 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Arduino CLI Library Compile
on:
push:
paths-ignore:
- '**.md'
- '.github/workflows/compile_examples.yml'
pull_request:
paths-ignore:
- '**.md'
- '.github/workflows/compile_examples.yml'
jobs:
compile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board_config:
# --- Arduino SAMD/Renesas (Official Core) ---
- { name: 'MKR WiFi 1010', board: 'arduino:samd:mkrwifi1010', platform: 'arduino:samd', category: 'standard' }
- { name: 'UNO R4 WiFi', board: 'arduino:renesas_uno:unor4wifi', platform: 'arduino:renesas_uno', category: 'standard' }
# --- ESP32 Family (Requires Custom URL) ---
- { name: 'ESP32 Dev Module', board: 'esp32:esp32:esp32doit-devkit-v1', platform: 'esp32:esp32', url: 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json', category: 'standard' }
- { name: 'LOLIN32', board: 'esp32:esp32:lolin32', platform: 'esp32:esp32', url: 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json', category: 'standard' }
# --- ESP8266 (Requires Custom URL) ---
- { name: 'D1 Mini', board: 'esp8266:esp8266:d1_mini', platform: 'esp8266:esp8266', url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', category: 'standard' }
name: Compile ${{ matrix.board_config.name }}
steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@v4
# 1. Install Arduino CLI
- name: 🛠️ Setup Arduino CLI
uses: arduino/setup-arduino-cli@v2
# 2. Add custom platform URLs for ESP cores
- name: 🌐 Configure & Update Index
run: |
# Only adding reliable ESP URLs
arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core update-index
# 3. Install All Platforms
- name: 📥 Install All Platforms
run: |
arduino-cli core install ${{ matrix.board_config.platform }}
# 4. Create the test sketch containing your provided code
- name: 📝 Create test sketch
run: |
mkdir -p test_sketch
cat << EOF > test_sketch/test_sketch.ino
#include <ESP_SSLClient.h>
ESP_SSLClient ssl_client;
void setup()
{
ssl_client.setInsecure();
ssl_client.setBufferSizes(2048, 512);
ssl_client.connect("mock.com", 443);
ssl_client.stop();
}
void loop()
{
}
EOF
# 5. Compile the sketch against the FQBN
- name: ⚙️ Compile Sketch for ${{ matrix.board_config.name }}
run: arduino-cli compile --fqbn ${{ matrix.board_config.board }} --library . test_sketch