Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow ble module to build with refactored puara-module #7

Merged
merged 9 commits into from
Nov 27, 2024
43 changes: 22 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!'
- 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!'
15 changes: 13 additions & 2 deletions basic-osc/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions basic-osc/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// If using Arduino.h, include it before including puara.h
#include "puara.h"

#include <iostream>

// Initialize Puara's module manager
Puara puara;

Expand Down
15 changes: 13 additions & 2 deletions basic/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ 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
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 =
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions basic/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// If using Arduino.h, include it before including puara.h
#include "puara.h"

#include <iostream>

// Initialize Puara's module manager
Puara puara;

Expand Down
22 changes: 21 additions & 1 deletion ble-advertising/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ble-advertising/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ unsigned int firmware_version = 20220906;
// descriptors' functions
#include "puara_gestures.h"

#include <iostream>

// Initialize Puara's module manager
Puara puara;

Expand Down
14 changes: 13 additions & 1 deletion libmapper-osc/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,25 @@ 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
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions libmapper-osc/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <iostream>

// Include Puara's high-level descriptor library if planning to use the high-level
// descriptors' functions
Expand Down