Skip to content

Commit b5699ad

Browse files
Merge pull request #103 from ESP32Async/ci
Rework CI to split workflow per platform
2 parents d5aa208 + 2fc3f69 commit b5699ad

File tree

5 files changed

+247
-231
lines changed

5 files changed

+247
-231
lines changed

.github/workflows/build-arduino.yml

Lines changed: 0 additions & 147 deletions
This file was deleted.

.github/workflows/build-pioarduino.yml renamed to .github/workflows/build-esp32.yml

Lines changed: 62 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
22

3-
name: Build (pioarduino)
3+
name: Build (ESP32)
44

55
on:
66
workflow_dispatch:
@@ -15,98 +15,70 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
platformio-esp32-arduino-3:
19-
name: PIO Arduino 3
18+
arduino-esp32:
19+
name: ESP32 (arduino-cli) - Release
2020
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-
3221
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v4
22+
- name: Install arduino-cli
23+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
3524

36-
- name: Cache PlatformIO
37-
uses: actions/cache@v4
38-
with:
39-
key: ${{ runner.os }}-pio
40-
path: |
41-
~/.cache/pip
42-
~/.platformio
25+
- name: Update core index
26+
run: arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
4327

44-
- name: Python
45-
uses: actions/setup-python@v5
46-
with:
47-
python-version: "3.x"
28+
- name: Install core
29+
run: arduino-cli core install --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json esp32:esp32
4830

49-
- name: Install PIO
50-
run: |
51-
python -m pip install --upgrade pip
52-
pip install --upgrade platformio
31+
- name: Install ArduinoJson
32+
run: arduino-cli lib install ArduinoJson
33+
34+
- name: Install AsyncTCP (ESP32)
35+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.3.6
36+
37+
- name: Checkout
38+
uses: actions/checkout@v4
5339

5440
- name: Build Examples
5541
run: |
5642
for i in `ls examples`; do
5743
echo "============================================================="
5844
echo "Building examples/$i..."
5945
echo "============================================================="
60-
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3
46+
arduino-cli compile --library . --warnings none -b esp32:esp32:esp32 "examples/$i/$i.ino"
6147
done
6248
63-
platformio-esp32-arduino-3-latest:
64-
name: PIO Arduino 3 Latest
49+
arduino-esp32-dev:
50+
name: ESP32 (arduino-cli) - Dev
6551
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-
- esp32-c6-devkitc-1
75-
- esp32-h2-devkitm-1
76-
7752
steps:
78-
- name: Checkout
79-
uses: actions/checkout@v4
53+
- name: Install arduino-cli
54+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
8055

81-
- name: Cache PlatformIO
82-
uses: actions/cache@v4
83-
with:
84-
key: ${{ runner.os }}-pio
85-
path: |
86-
~/.cache/pip
87-
~/.platformio
56+
- name: Update core index
57+
run: arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
8858

89-
- name: Python
90-
uses: actions/setup-python@v5
91-
with:
92-
python-version: "3.x"
59+
- name: Install core
60+
run: arduino-cli core install --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json esp32:esp32
9361

94-
- name: Install PIO
95-
run: |
96-
python -m pip install --upgrade pip
97-
pip install --upgrade platformio
62+
- name: Install ArduinoJson
63+
run: arduino-cli lib install ArduinoJson
64+
65+
- name: Install AsyncTCP (ESP32)
66+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.3.6
67+
68+
- name: Checkout
69+
uses: actions/checkout@v4
9870

9971
- name: Build Examples
10072
run: |
10173
for i in `ls examples`; do
10274
echo "============================================================="
10375
echo "Building examples/$i..."
10476
echo "============================================================="
105-
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3-latest
77+
arduino-cli compile --library . --warnings none -b esp32:esp32:esp32 "examples/$i/$i.ino"
10678
done
107-
79+
10880
platformio-esp32-arduino2:
109-
name: PIO Arduino 2
81+
name: ESP32 (pio) - Arduino 2
11082
runs-on: ubuntu-latest
11183
strategy:
11284
fail-fast: false
@@ -148,15 +120,19 @@ jobs:
148120
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-2
149121
done
150122
151-
platformio-specials:
152-
name: PIO Specials
123+
platformio-esp32-arduino-3:
124+
name: ESP32 (pio) - Arduino 3
153125
runs-on: ubuntu-latest
154126
strategy:
155127
fail-fast: false
156128
matrix:
157-
env:
158-
- ci-arduino-3-latest-asynctcp
159-
- ci-arduino-3-no-json
129+
board:
130+
- esp32dev
131+
- esp32-s2-saola-1
132+
- esp32-s3-devkitc-1
133+
- esp32-c3-devkitc-02
134+
- esp32-c6-devkitc-1
135+
- esp32-h2-devkitm-1
160136

161137
steps:
162138
- name: Checkout
@@ -186,18 +162,22 @@ jobs:
186162
echo "============================================================="
187163
echo "Building examples/$i..."
188164
echo "============================================================="
189-
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=esp32dev pio run -e ${{ matrix.env }}
165+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3
190166
done
191167
192-
platformio-esp8266:
193-
name: PIO ESP8266
168+
platformio-esp32-arduino-latest:
169+
name: ESP32 (pio) - Arduino Latest
194170
runs-on: ubuntu-latest
195171
strategy:
196172
fail-fast: false
197173
matrix:
198174
board:
199-
- huzzah
200-
- d1_mini
175+
- esp32dev
176+
- esp32-s2-saola-1
177+
- esp32-s3-devkitc-1
178+
- esp32-c3-devkitc-02
179+
- esp32-c6-devkitc-1
180+
- esp32-h2-devkitm-1
201181

202182
steps:
203183
- name: Checkout
@@ -227,18 +207,18 @@ jobs:
227207
echo "============================================================="
228208
echo "Building examples/$i..."
229209
echo "============================================================="
230-
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-esp8266
210+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3-latest
231211
done
232212
233-
platformio-rpi:
234-
name: PIO RPI
213+
platformio-specific-envs:
214+
name: ESP32 (pio) - Specific Envs
235215
runs-on: ubuntu-latest
236216
strategy:
237217
fail-fast: false
238218
matrix:
239-
board:
240-
- rpipicow
241-
- rpipico2w
219+
env:
220+
- ci-arduino-3-latest-asynctcp
221+
- ci-arduino-3-no-json
242222

243223
steps:
244224
- name: Checkout
@@ -268,5 +248,5 @@ jobs:
268248
echo "============================================================="
269249
echo "Building examples/$i..."
270250
echo "============================================================="
271-
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-raspberrypi
251+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=esp32dev pio run -e ${{ matrix.env }}
272252
done

0 commit comments

Comments
 (0)