diff --git a/.gitignore b/.gitignore index 259148fa..f7c5f50f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,9 @@ *.exe *.out *.app + +# PlatformIO in VScode +.pio/ +.vscode/ +*.lnk +*.bak diff --git a/pio_ci_ex_ALL.bat b/pio_ci_ex_ALL.bat new file mode 100644 index 00000000..125f92c3 --- /dev/null +++ b/pio_ci_ex_ALL.bat @@ -0,0 +1,38 @@ +@echo off +rem Build all listed examples of this library on PIO CLI; may take some time +rem Verifies that library and all examples still compile + +setlocal EnableDelayedExpansion enableextensions +set CI_DIR=%~dp0..\async-esp-fs-webserver.pio-ci +set EXAMPLES=simpleServerCaptive simpleServer withWebSocket customHTML customOptions gpio_list handleFormData highcharts remoteOTA esp32-cam +::set EXAMPLES=simpleServerCaptive +:: simpleServer withWebSocket customHTML +set BOARDS= esp32dev esp12e +set OPT_esp12e=-O "lib_deps=ArduinoJson@6.21.4" +set OPT_esp32dev=-O "lib_deps=ArduinoJson@6.21.4" +set NOT_esp12e=esp32-cam +set NOT_esp32dev=esp8266-app +set EXCLIB= --exclude=lib\*\.git* --exclude=lib\*\.pio --exclude=lib\*\.vscode --exclude=lib\*\built-in-webpages --exclude=lib\*\examples + +FOR %%B IN (%BOARDS%) DO ( + FOR %%E IN (%EXAMPLES%) DO ( + if %%E==!NOT_%%B! ( + echo ### not compiling %%E for %%B + ) else ( + set CIEXDIR=%CI_DIR%\ci_ex_%%B_%%E + IF EXIST "!CIEXDIR!" RMDIR /s/q "!CIEXDIR!" + MKDIR "!CIEXDIR!" + set OPT=!OPT_%%B! + set OUT="!CIEXDIR!\build.out.txt" + set ERR="!CIEXDIR!\build.err.txt" + echo ### Compiling %%E for %%B + echo +pio ci -b %%B !OPT! --keep-build-dir --build-dir="!CIEXDIR!\" --lib=. %EXCLIB% .\examples\%%E\*.* 1^>!OUT! 2^>!ERR! + pio ci -b %%B !OPT! --keep-build-dir --build-dir="!CIEXDIR!" --lib=. %EXCLIB% .\examples\%%E\*.* >!OUT! 2>!ERR! + FOR /f %%i IN (!ERR!) DO IF EXIST %%i IF %%~zi GTR 0 ECHO ###ERROR in %%i && TYPE %%i + ) + echo ### DONE + ) +) + +:: note activation pio verbose option '-v' generates a lot of output (~25k/compile, ~2MB/pio-ci) + diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 00000000..51f532f2 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,33 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:esp32dev] +framework = arduino +platform = espressif32 +board = esp32dev +lib_deps = bblanchon/ArduinoJson@^6.21.4 + DNSServer@^2.0.0 + ESPmDNS@^2.0.0 + WiFi@^2.0.0 + FS@^2.0.0 + LittleFS@^2.0.0 + Update@^2.0.0 + + +[env:esp12e] +framework = arduino +platform = espressif8266 +board = esp12e +board_build.mcu = esp8266 +lib_deps = bblanchon/ArduinoJson@^6.21.4 + DNSServer@^1.1.0 + ESP8266mDNS@^1.2 + ESP8266WiFi@^1.0 + LittleFS