Skip to content

Commit 79e1733

Browse files
committed
Split SimpleServer in multiple examples
1 parent a1e7550 commit 79e1733

File tree

35 files changed

+2604
-1541
lines changed

35 files changed

+2604
-1541
lines changed

.github/workflows/arduino-lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: Arduino Lint
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
- release/*
11+
pull_request:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
arduino-lint:
19+
name: Arduino Lint
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: arduino/arduino-lint-action@v2
24+
with:
25+
library-manager: update

.github/workflows/build-arduino.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: Build (Arduino)
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
- release/*
11+
pull_request:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
arduino-esp32:
19+
name: Arduino ESP32
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- core: esp32:esp32
26+
board: esp32:esp32:esp32
27+
index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
28+
# - core: esp32:esp32
29+
# board: esp32:esp32:esp32
30+
# index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
31+
32+
steps:
33+
- name: Install arduino-cli
34+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
35+
36+
- name: Update core index
37+
run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}"
38+
39+
- name: Install core
40+
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
41+
42+
- name: Install ArduinoJson
43+
run: arduino-cli lib install ArduinoJson
44+
45+
- name: Install AsyncTCP (ESP32)
46+
if: ${{ matrix.core == 'esp32:esp32' }}
47+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.3.3
48+
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
52+
- name: Build Examples
53+
run: |
54+
for i in `ls examples`; do
55+
echo "============================================================="
56+
echo "Building examples/$i..."
57+
echo "============================================================="
58+
arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/$i/$i.ino"
59+
done
60+
61+
arduino-esp8266:
62+
name: Arduino ESP8266
63+
runs-on: ubuntu-latest
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
include:
68+
- core: esp8266:esp8266
69+
board: esp8266:esp8266:huzzah
70+
index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
71+
72+
steps:
73+
- name: Install arduino-cli
74+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
75+
76+
- name: Update core index
77+
run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}"
78+
79+
- name: Install core
80+
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
81+
82+
- name: Install ArduinoJson
83+
run: arduino-cli lib install ArduinoJson
84+
85+
- name: Install ESPAsyncTCP (ESP8266)
86+
if: ${{ matrix.core == 'esp8266:esp8266' }}
87+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncTCP#v2.0.0
88+
89+
- name: Checkout
90+
uses: actions/checkout@v4
91+
92+
- name: Build Examples
93+
run: |
94+
for i in `ls examples`; do
95+
echo "============================================================="
96+
echo "Building examples/$i..."
97+
echo "============================================================="
98+
arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/$i/$i.ino"
99+
done
100+
101+
arduino-rp2040:
102+
name: Arduino RP2040
103+
runs-on: ubuntu-latest
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
include:
108+
- name: package_rp2040_index.json
109+
core: rp2040:rp2040
110+
board: rp2040:rp2040:rpipicow
111+
index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
112+
steps:
113+
- name: Install arduino-cli
114+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
115+
116+
- name: Update core index
117+
run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}"
118+
119+
- name: Install core
120+
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
121+
122+
- name: Install ArduinoJson
123+
run: arduino-cli lib install ArduinoJson
124+
125+
- name: Install AsyncTCP (RP2040)
126+
if: ${{ matrix.core == 'rp2040:rp2040' }}
127+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/khoih-prog/AsyncTCP_RP2040W#v1.2.0
128+
129+
- name: Checkout
130+
uses: actions/checkout@v4
131+
132+
- name: Build Examples
133+
run: |
134+
for i in `ls examples`; do
135+
echo "============================================================="
136+
echo "Building examples/$i..."
137+
echo "============================================================="
138+
arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/$i/$i.ino"
139+
done
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: Build (pioarduino)
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
- release/*
11+
pull_request:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
platformio-esp32-arduino-3:
19+
name: PIO Arduino 3
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
board:
25+
- esp32dev
26+
- esp32-s2-saola-1
27+
- esp32-s3-devkitc-1
28+
- esp32-c3-devkitc-02
29+
- esp32-c6-devkitc-1
30+
- esp32-h2-devkitm-1
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Cache PlatformIO
37+
uses: actions/cache@v4
38+
with:
39+
key: ${{ runner.os }}-pio
40+
path: |
41+
~/.cache/pip
42+
~/.platformio
43+
44+
- name: Python
45+
uses: actions/setup-python@v5
46+
with:
47+
python-version: "3.x"
48+
49+
- name: Install PIO
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install --upgrade platformio
53+
54+
- name: Build Examples
55+
run: |
56+
for i in `ls examples`; do
57+
echo "============================================================="
58+
echo "Building examples/$i..."
59+
echo "============================================================="
60+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3
61+
done
62+
63+
platformio-esp32-arduino2:
64+
name: PIO Arduino 2
65+
runs-on: ubuntu-latest
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
board:
70+
- esp32dev
71+
- esp32-s2-saola-1
72+
- esp32-s3-devkitc-1
73+
- esp32-c3-devkitc-02
74+
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Cache PlatformIO
80+
uses: actions/cache@v4
81+
with:
82+
key: ${{ runner.os }}-pio
83+
path: |
84+
~/.cache/pip
85+
~/.platformio
86+
87+
- name: Python
88+
uses: actions/setup-python@v5
89+
with:
90+
python-version: "3.x"
91+
92+
- name: Install PIO
93+
run: |
94+
python -m pip install --upgrade pip
95+
pip install --upgrade platformio
96+
97+
- name: Build Examples
98+
run: |
99+
for i in `ls examples`; do
100+
echo "============================================================="
101+
echo "Building examples/$i..."
102+
echo "============================================================="
103+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-2
104+
done
105+
106+
platformio-specials:
107+
name: PIO No Json
108+
runs-on: ubuntu-latest
109+
strategy:
110+
fail-fast: false
111+
matrix:
112+
env:
113+
- ci-arduino-3-latest-asynctcp
114+
- ci-arduino-3-no-json
115+
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@v4
119+
120+
- name: Cache PlatformIO
121+
uses: actions/cache@v4
122+
with:
123+
key: ${{ runner.os }}-pio
124+
path: |
125+
~/.cache/pip
126+
~/.platformio
127+
128+
- name: Python
129+
uses: actions/setup-python@v5
130+
with:
131+
python-version: "3.x"
132+
133+
- name: Install PIO
134+
run: |
135+
python -m pip install --upgrade pip
136+
pip install --upgrade platformio
137+
138+
- name: Build Examples
139+
run: |
140+
for i in `ls examples`; do
141+
echo "============================================================="
142+
echo "Building examples/$i..."
143+
echo "============================================================="
144+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=esp32dev pio run -e ${{ matrix.env }}
145+
done
146+
147+
platformio-esp8266:
148+
name: PIO ESP8266
149+
runs-on: ubuntu-latest
150+
strategy:
151+
fail-fast: false
152+
matrix:
153+
board:
154+
- huzzah
155+
- d1_mini
156+
157+
steps:
158+
- name: Checkout
159+
uses: actions/checkout@v4
160+
161+
- name: Cache PlatformIO
162+
uses: actions/cache@v4
163+
with:
164+
key: ${{ runner.os }}-pio
165+
path: |
166+
~/.cache/pip
167+
~/.platformio
168+
169+
- name: Python
170+
uses: actions/setup-python@v5
171+
with:
172+
python-version: "3.x"
173+
174+
- name: Install PIO
175+
run: |
176+
python -m pip install --upgrade pip
177+
pip install --upgrade platformio
178+
179+
- name: Build Examples
180+
run: |
181+
for i in `ls examples`; do
182+
echo "============================================================="
183+
echo "Building examples/$i..."
184+
echo "============================================================="
185+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-esp8266
186+
done
187+
188+
platformio-rp2040:
189+
name: PIO RP2040
190+
runs-on: ubuntu-latest
191+
strategy:
192+
fail-fast: false
193+
matrix:
194+
board:
195+
- rpipicow
196+
197+
steps:
198+
- name: Checkout
199+
uses: actions/checkout@v4
200+
201+
- name: Cache PlatformIO
202+
uses: actions/cache@v4
203+
with:
204+
key: ${{ runner.os }}-pio
205+
path: |
206+
~/.cache/pip
207+
~/.platformio
208+
209+
- name: Python
210+
uses: actions/setup-python@v5
211+
with:
212+
python-version: "3.x"
213+
214+
- name: Install PIO
215+
run: |
216+
python -m pip install --upgrade pip
217+
pip install --upgrade platformio
218+
219+
- name: Build Examples
220+
run: |
221+
for i in `ls examples`; do
222+
echo "============================================================="
223+
echo "Building examples/$i..."
224+
echo "============================================================="
225+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-raspberrypi
226+
done

0 commit comments

Comments
 (0)