Skip to content

Commit 142b620

Browse files
committed
Add workflows for LITTLEFS and SPIFFS
1 parent 1d0fc54 commit 142b620

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

.github/workflows/compile.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ jobs:
1616

1717
# The matrix will produce one job for each configuration
1818
# parameter of type `arduino-platform`, plus optional extra variants as listed
19-
# in the 'include' list. In this case a total of 5.
20-
arduino-platform: ["esp8266:esp8266", "esp32:esp32@1.0.6", "esp32:esp32@2.0.17" ]
19+
# in the 'include' list. In this case a total of 7
20+
arduino-platform: ["esp32:esp32@1.0.6", "esp32:esp32@2.0.17" ]
2121

22-
# This is usually optional but we need to statically define the
23-
# FQBN of the boards we want to test for each platform. In the
24-
# future the CLI might automatically detect and download the core
25-
# needed to compile against a certain FQBN, at that point the
26-
# following 'Install platform' section will be useless.
2722
include:
2823

2924
# This works like this: when the platform is "esp8266:esp8266", the
@@ -35,6 +30,22 @@ jobs:
3530
async-tcp-library-version: "\"ESP Async TCP\""
3631
webserver-library-version: "\"ESP Async WebServer\""
3732
compiler-warnings: "--warnings all"
33+
- arduino-platform: "esp8266:esp8266"
34+
fqbn: "esp8266:esp8266:d1_mini"
35+
url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json"
36+
board-options: "xtal=160,ssl=basic,mmu=3232,non32xfer=fast,eesz=4M1M,ip=hb2n"
37+
async-tcp-library-version: "\"ESP Async TCP\""
38+
webserver-library-version: "\"ESP Async WebServer\""
39+
build-property: "--build-property compiler.cpp.extra_flags=\"-DSERVE_FROM_SPIFFS\""
40+
compiler-warnings: "--warnings all"
41+
- arduino-platform: "esp8266:esp8266"
42+
fqbn: "esp8266:esp8266:d1_mini"
43+
url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json"
44+
board-options: "xtal=160,ssl=basic,mmu=3232,non32xfer=fast,eesz=4M1M,ip=hb2n"
45+
async-tcp-library-version: "\"ESP Async TCP\""
46+
webserver-library-version: "\"ESP Async WebServer\""
47+
build-property: "--build-property compiler.cpp.extra_flags=\"-DSERVE_FROM_LITTLEFS\""
48+
compiler-warnings: "--warnings all"
3849
- arduino-platform: "esp32:esp32@1.0.6"
3950
url: "https://dl.espressif.com/dl/package_esp32_index.json"
4051
fqbn: "esp32:esp32:ttgo-t7-v13-mini32"
@@ -91,4 +102,4 @@ jobs:
91102
# in the build matrix.
92103
- name: Build sketch
93104
run: |
94-
arduino-cli compile --fqbn ${{ matrix.fqbn }} --board-options ${{ matrix.board-options }} ${{ matrix.compiler-warnings }} ./VanLiveConnect
105+
arduino-cli compile --fqbn ${{ matrix.fqbn }} --board-options ${{ matrix.board-options }} ${{ matrix.build-property }} ${{ matrix.compiler-warnings }} ./VanLiveConnect

VanLiveConnect/Config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@
133133
// -----
134134
// Web server
135135

136+
// Below #defines can also be passed on the command line; e.g. like this:
137+
// --build-property compiler.cpp.extra_flags="-DSERVE_FROM_LITTLEFS"
138+
// If that is the case, don't let the below #defines overrule it.
139+
//
140+
#if ! defined SERVE_FROM_SPIFFS && ! defined SERVE_FROM_LITTLEFS
141+
136142
// Define SERVE_FROM_SPIFFS to make the web server to use the SPI Flash File system (SPIFFS) to serve its web
137143
// documents from. When neither SERVE_FROM_SPIFFS nor SERVE_FROM_LITTLEFS is defined (commented out), the
138144
// web server serves the web documents from program space.
@@ -210,6 +216,8 @@
210216
//
211217
//#define SERVE_FROM_LITTLEFS
212218

219+
#endif // ! defined SERVE_FROM_SPIFFS && ! defined SERVE_FROM_LITTLEFS
220+
213221
#if defined SERVE_FROM_SPIFFS && defined SERVE_FROM_LITTLEFS
214222
#error "Either #define SERVE_FROM_SPIFFS or #define SERVE_FROM_LITTLEFS, but not both"
215223
#endif

0 commit comments

Comments
 (0)