diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0999c4c..00bd589 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,15 @@ on: [push,pull_request] jobs: build: + name: ${{ matrix.template }} ${{ matrix.environment }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + template: [ basic, basic-osc, ble-advertising, libmapper-osc ] + environment: [ Xiao, tinypico, m5stick-c, ESP32-S3 ] + steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -13,30 +20,24 @@ jobs: ~/.cache/pip ~/.platformio/.cache key: ${{ runner.os }}-pio + - uses: actions/setup-python@v5 with: python-version: '3.11' + - name: Install PlatformIO Core run: pip install --upgrade platformio - - name: Build ble-advertising - run: cd ./ble-advertising && pio run --environment ESP32-S3 - - - name: Simulate and test ble-advertising with Wokwi - uses: wokwi/wokwi-ci-action@v1 - with: - token: ${{ secrets.WOKWI_CLI_TOKEN }} - path: ./ble-advertising/ # directory with wokwi.toml, relative to repo's root - timeout: 30000 - expect_text: 'Puara Start Done!' - - - name: Build libmapper-osc - run: cd ./libmapper-osc && pio run --environment ESP32-S3 - - - name: Simulate and test libmapper-osc with Wokwi - uses: wokwi/wokwi-ci-action@v1 - with: - token: ${{ secrets.WOKWI_CLI_TOKEN }} - path: ./libmapper-osc/ # directory with wokwi.toml, relative to repo's root - timeout: 30000 - expect_text: 'Puara Start Done!' \ No newline at end of file + - name: Build + run: | + cd ./${{ matrix.template }} + pio settings set force_verbose 1 + pio run --environment ${{ matrix.environment }} + +# - name: Simulate and test ble-advertising with Wokwi +# uses: wokwi/wokwi-ci-action@v1 +# with: +# token: ${{ secrets.WOKWI_CLI_TOKEN }} +# path: ./${{ matrix.template }}/ # directory with wokwi.toml, relative to repo's root +# timeout: 30000 +# expect_text: 'Puara Start Done!' diff --git a/basic-osc/platformio.ini b/basic-osc/platformio.ini index 0de0c63..c8a29c2 100644 --- a/basic-osc/platformio.ini +++ b/basic-osc/platformio.ini @@ -13,8 +13,12 @@ description = Puara module manager [common] lib_deps = - https://github.com/Puara/puara-module.git#0.3 + https://github.com/Puara/puara-module.git https://github.com/cnmat/OSC#3.5.8 +build_flags = + -std=gnu++2a +build_unflags = + -std=gnu++11 -std=gnu++14 -std=gnu++17 [env:Xiao] platform = espressif32 @@ -23,6 +27,8 @@ framework = arduino board_build.partitions = min_spiffs_no_OTA.csv lib_deps = ${common.lib_deps} +build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} monitor_speed = 115200 monitor_echo = yes monitor_filters = @@ -37,6 +43,8 @@ board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 @@ -53,6 +61,8 @@ board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 @@ -68,7 +78,8 @@ framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM - -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 diff --git a/basic-osc/src/main.cpp b/basic-osc/src/main.cpp index ea55faf..0cb46f3 100644 --- a/basic-osc/src/main.cpp +++ b/basic-osc/src/main.cpp @@ -10,6 +10,8 @@ // If using Arduino.h, include it before including puara.h #include "puara.h" +#include + // Initialize Puara's module manager Puara puara; diff --git a/basic/platformio.ini b/basic/platformio.ini index 9436785..7002e92 100644 --- a/basic/platformio.ini +++ b/basic/platformio.ini @@ -13,7 +13,11 @@ description = Puara module manager [common] lib_deps = - https://github.com/Puara/puara-module.git#0.3 + https://github.com/Puara/puara-module.git +build_flags = + -std=gnu++2a +build_unflags = + -std=gnu++11 -std=gnu++14 -std=gnu++17 [env:Xiao] platform = espressif32 @@ -21,6 +25,8 @@ board = seeed_xiao_esp32c3 framework = arduino board_build.partitions = min_spiffs_no_OTA.csv lib_deps = ${common.lib_deps} +build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} monitor_speed = 115200 monitor_echo = yes monitor_filters = @@ -35,6 +41,8 @@ board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -50,6 +58,8 @@ board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -64,7 +74,8 @@ framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = -DBOARD_HAS_PSRAM - -mfix-esp32-psram-cache-issue + ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes diff --git a/basic/src/main.cpp b/basic/src/main.cpp index 2b869f2..604f450 100644 --- a/basic/src/main.cpp +++ b/basic/src/main.cpp @@ -10,6 +10,8 @@ // If using Arduino.h, include it before including puara.h #include "puara.h" +#include + // Initialize Puara's module manager Puara puara; diff --git a/ble-advertising/platformio.ini b/ble-advertising/platformio.ini index 8a6dc3f..cb282d4 100644 --- a/ble-advertising/platformio.ini +++ b/ble-advertising/platformio.ini @@ -14,11 +14,28 @@ description = Puara module manager [common] lib_deps = https://github.com/Puara/puara-gestures.git - https://github.com/Puara/puara-module.git#0.3 + https://github.com/Puara/puara-module.git arduino-libraries/ArduinoBLE johboh/nlohmann-json@^3.11.3 build_flags = -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768 + -std=gnu++2a +build_unflags = + -std=gnu++11 -std=gnu++14 -std=gnu++17 + +[env:Xiao] +platform = espressif32 +board = seeed_xiao_esp32c3 +framework = arduino +board_build.partitions = min_spiffs_no_OTA.csv +build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} +lib_deps = ${common.lib_deps} +monitor_speed = 115200 +monitor_echo = yes +monitor_filters = + default + esp32_exception_decoder [env:tinypico] platform = espressif32 @@ -29,6 +46,7 @@ build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -42,6 +60,7 @@ board = m5stick-c framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -55,6 +74,7 @@ board = adafruit_feather_esp32s3 framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes diff --git a/ble-advertising/src/main.cpp b/ble-advertising/src/main.cpp index 9b8ded3..cdf5934 100644 --- a/ble-advertising/src/main.cpp +++ b/ble-advertising/src/main.cpp @@ -19,6 +19,8 @@ unsigned int firmware_version = 20220906; // descriptors' functions #include "puara_gestures.h" +#include + // Initialize Puara's module manager Puara puara; diff --git a/libmapper-osc/platformio.ini b/libmapper-osc/platformio.ini index 0620ce8..3da4912 100644 --- a/libmapper-osc/platformio.ini +++ b/libmapper-osc/platformio.ini @@ -15,9 +15,17 @@ description = Puara module manager lib_deps = https://github.com/Puara/puara-gestures.git https://github.com/mathiasbredholt/libmapper-arduino.git#v0.3 - https://github.com/Puara/puara-module.git#0.3 + https://github.com/Puara/puara-module.git build_flags = -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768 + -std=gnu++2a +build_unflags = + -std=c++11 + -std=c++14 + -std=c++17 + -std=gnu++11 + -std=gnu++14 + -std=gnu++17 [env:Xiao] platform = espressif32 @@ -25,6 +33,7 @@ board = seeed_xiao_esp32c3 framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -41,6 +50,7 @@ build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -54,6 +64,7 @@ board = m5stick-c framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes @@ -67,6 +78,7 @@ board = esp32-c3-devkitc-02 framework = arduino board_build.partitions = min_spiffs_no_OTA.csv build_flags = ${common.build_flags} +build_unflags = ${common.build_unflags} lib_deps = ${common.lib_deps} monitor_speed = 115200 monitor_echo = yes diff --git a/libmapper-osc/src/main.cpp b/libmapper-osc/src/main.cpp index 6164212..678f683 100644 --- a/libmapper-osc/src/main.cpp +++ b/libmapper-osc/src/main.cpp @@ -12,6 +12,7 @@ unsigned int firmware_version = 20220906; // Include Puara's module manager // If using Arduino.h, include it before including puara.h #include "puara.h" +#include // Include Puara's high-level descriptor library if planning to use the high-level // descriptors' functions