Skip to content

Commit 115f311

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 7f04909 + b4ba52d commit 115f311

File tree

6 files changed

+95
-0
lines changed

6 files changed

+95
-0
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PlatformIO CI
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
env: [esp8266-arduino, esp32-arduino, esp32-idf]
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Cache PlatformIO
17+
uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cache/pip
21+
~/.platformio/.cache
22+
key: ${{ runner.os }}-pio
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install PlatformIO
30+
run: pip install --upgrade platformio
31+
32+
- name: Run PlatformIO Build
33+
run: pio run -e ${{ matrix.env }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vscode
2+
.pio

platformio.ini

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
; PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; https://docs.platformio.org/page/projectconf.html
10+
11+
[platformio]
12+
name = MideaUART
13+
description = A library for controlling Midea home appliances using the UART protocol.
14+
default_envs =
15+
esp8266-arduino
16+
esp32-arduino
17+
esp32-idf
18+
native
19+
20+
[env]
21+
test_build_src = yes
22+
lib_deps =
23+
; Enable C++20. ESPHome supports C++20 since 2025.7.0 release.
24+
; https://esphome.io/changelog/2025.7.0/#memory-and-performance-optimizations
25+
build_unflags =
26+
-std=gnu++11
27+
-std=gnu++14
28+
-std=gnu++17
29+
-std=gnu++23
30+
-std=gnu++2b
31+
-std=gnu++2c
32+
build_flags =
33+
-std=gnu++2a
34+
-Os
35+
36+
[env:esp8266-arduino]
37+
platform = espressif8266
38+
framework = arduino
39+
board = esp12e
40+
build_src_filter = +<../test/entry_arduino.cpp>
41+
42+
[env:esp32-arduino]
43+
platform = espressif32
44+
framework = arduino
45+
board = esp32dev
46+
build_src_filter = +<../test/entry_arduino.cpp>
47+
48+
[env:esp32-idf]
49+
platform = espressif32
50+
framework = espidf
51+
board = esp32dev
52+
build_src_filter = +<../test/entry_idf.cpp>
53+
54+
[env:native]
55+
platform = native
56+
build_src_filter = +<../test/entry_native.cpp>

test/entry_arduino.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <Arduino.h>
2+
void setup() {}
3+
void loop() {}

test/entry_idf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extern "C" void app_main() {}

test/entry_native.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extern "C" int main() {}

0 commit comments

Comments
 (0)