Skip to content

Commit

Permalink
1.2.8 (#186)
Browse files Browse the repository at this point in the history
* Factory partition support
* Add factory menu example
* Removed submodules
* Fixed compilation warning
* Removed some dead code, renamed methods, updated example
* Added property enabled/disabled to BtnXAction
* Added setWaitDelay()
* CI: dynamic core version planner
  • Loading branch information
tobozo authored Oct 13, 2023
1 parent 84eef98 commit b42994e
Show file tree
Hide file tree
Showing 73 changed files with 3,710 additions and 1,205 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/ArduinoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
#- 2.0.4
#- 2.0.5
#- 2.0.6
- 2.0.7
- 2.0.8
- 2.0.9
# - 2.0.7
# - 2.0.8
# - 2.0.9
- 2.0.11
- 2.0.12
- 2.0.13

matrix-context:
- M5Core2-test
Expand Down Expand Up @@ -67,9 +70,12 @@ jobs:
#- sdk-version: 2.0.1
#- sdk-version: 2.0.5
#- sdk-version: 2.0.6
- sdk-version: 2.0.7
- sdk-version: 2.0.8
- sdk-version: 2.0.9
# - sdk-version: 2.0.7
# - sdk-version: 2.0.8
# - sdk-version: 2.0.9
- sdk-version: 2.0.11
- sdk-version: 2.0.12
- sdk-version: 2.0.13

# library health test sketches
- { matrix-context: M5Core2-test, arduino-board: m5stack-core2, sketch-names: M5Core2-SDLoader-Snippet.ino, required-libraries: "M5Core2", ... }
Expand Down Expand Up @@ -111,12 +117,21 @@ jobs:
#sketch-names: TTGO-test.ino
#required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Atom
sdk-version: 2.0.8
sdk-version: 2.0.13
arduino-board: m5stack-atom
sketch-names: M5Stack-SD-Menu.ino
launcher-name: M5Atom-Launcher
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson,Button2"

- matrix-context: M5CoreS3
sdk-version: 2.0.13
arduino-board: m5stack-cores3
sketch-names: M5Stack-SD-Menu.ino,M5Stack-FW-Menu.ino
launcher-name: M5CoreS3-Launcher
factory-name: M5CoreS3-FW-Launcher
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson,Button2"


fail-fast: false

steps:
Expand Down Expand Up @@ -144,6 +159,7 @@ jobs:
run: |
cp examples/M5Stack-SD-Menu/build/M5Stack-SD-Menu.ino.bin examples/M5Stack-SD-Menu/build/${{ matrix.launcher-name }}-${{ matrix.sdk-version }}.bin
FILE=examples/AppStore/build/AppStore.ino.bin && [ -f "$FILE" ] && cp $FILE examples/M5Stack-SD-Menu/build/${{ matrix.appstore-name }}-${{ matrix.sdk-version }}.bin || true
FILE=examples/M5Stack-FW-Menu/build/M5Stack-FW-Menu.ino.bin && [ -f "$FILE" ] && cp $FILE examples/M5Stack-SD-Menu/build/${{ matrix.factory-name }}-${{ matrix.sdk-version }}.bin || true
- name: Upload artifact ${{ matrix.matrix-context }}
uses: actions/upload-artifact@v3
if: startsWith(matrix.sketch-names, 'M5Stack-SD-Menu')
Expand All @@ -152,6 +168,7 @@ jobs:
path: |
examples/M5Stack-SD-Menu/build/${{ matrix.launcher-name }}-${{ matrix.sdk-version }}.bin
examples/M5Stack-SD-Menu/build/${{ matrix.appstore-name }}-${{ matrix.sdk-version }}.bin
examples/M5Stack-SD-Menu/build/${{ matrix.factory-name }}-${{ matrix.sdk-version }}.bin
post_build:
name: Gather Artefacts
Expand Down
97 changes: 46 additions & 51 deletions .github/workflows/PlatformioBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,56 +19,45 @@ on:

jobs:

set_matrix:
name: Version planner ⊹
runs-on: ubuntu-latest
env:
max-versions: 3 # maximum core versions to test, starting at latest
outputs:
matrix: ${{steps.set-matrix.outputs.matrix}}
project_dir: ${{steps.set-matrix.outputs.project_dir}}
branch_name: ${{steps.set-matrix.outputs.branch_name}}

build:
name: ${{ matrix.piocontext }}@${{ matrix.platform-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup matrix
id: set-matrix
run: |
json=`curl -s "https://espressif.github.io/arduino-esp32/package_esp32_index.json"` # get a list of arduino-esp32 packages
core_versions_arr=(`echo $json | jq -r .packages[0].platforms[].version | awk "NR <= ${{ env.max-versions}}"`) # extract platform versions
core_versions_json=`printf '%s\n' "${core_versions_arr[@]}" | jq -R . | jq -s .` # convert to json
pio_envs_arr=(`cat ${{env.PROJECT_DIR}}/platformio.ini | awk 'match($0, /^\[env:([a-zA-Z0-9\-_])+/){print substr($0, RSTART+5, RLENGTH-5)}'`) # get pio [env:*] names
pio_envs_json=`printf '%s\n' "${pio_envs_arr[@]}" | jq -R . | jq -s .` # convert to json array
matrix=`printf '{"pio-env":%s,"platform-version":%s}' "$pio_envs_json" "$core_versions_json"` # create the matrix array
matrix="${matrix//'%'/'%25'}" # escape percent entities
matrix="${matrix//$'\n'/''}" # remove lf
matrix="${matrix//$'\r'/''}" # remove cr
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
echo "project_dir=${{env.PROJECT_DIR}}" >> $GITHUB_OUTPUT
echo "branch_name=${{env.BRANCH_NAME}}" >> $GITHUB_OUTPUT
build:
name: ${{ matrix.pio-env }}@${{ matrix.platform-version }}
needs: set_matrix
runs-on: ubuntu-latest

strategy:
matrix:

piocontext:
- lgfx
- m5stick-c
- m5stack-core-esp32
- m5stack-core2
- m5unified
- s3box
- m5stack-atom
- m5stack-cores3
- sdfat-test

platform-version:
#- 1.0.6
#- 2.0.0
#- 2.0.1
#- 2.0.2 # has broken SD Support
#- 2.0.3
#- 2.0.4
#- 2.0.5
#- 2.0.6
- 2.0.7
- 2.0.8
- 2.0.9

#exclude:
#- { piocontext: s3box, platform-version: 1.0.6 }
#- { piocontext: s3box, platform-version: 2.0.0 }
#- { piocontext: s3box, platform-version: 2.0.1 }
#- { piocontext: s3box, platform-version: 2.0.2 }
#- { piocontext: m5stack-core2, platform-version: 1.0.6 } # M5Core2.h broken I2S support with 1.0.6
#- { piocontext: m5stack-core2, platform-version: 2.0.0 } # M5Core2.h broken I2S support with 2.0.0

include:
- piocontext: lgfx
- piocontext: m5stick-c
- piocontext: m5stack-core-esp32
- piocontext: m5stack-core2
- piocontext: m5unified
- piocontext: s3box
- piocontext: sdfat-test

matrix: ${{fromJSON(needs.set_matrix.outputs.matrix)}}
fail-fast: false

steps:
Expand Down Expand Up @@ -103,10 +92,16 @@ jobs:
- name: Run PlatformIO
run: |
cd ${{ env.PROJECT_DIR }}
cd ${{ needs.set_matrix.outputs.project_dir }}
export pio_ver=${{ matrix.platform-version }}
export pio_env="${pio_ver//./_}"
[[ "${{ env.BRANCH_NAME }}" == "master" ]] && rm dev_lib_deps.ini || echo "Develop!" && pio system prune -f
pio pkg install -e ${{ matrix.piocontext }}-$pio_env --no-save --library file://$(realpath ../../../)
pio run -e ${{ matrix.piocontext }}-$pio_env
# append "test" profile to the current platformio.ini
echo "[env:test]">>platformio.ini
echo "extends = env:${{ matrix.pio-env }}">>platformio.ini
echo "platform = https://github.com/tasmota/platform-espressif32">>platformio.ini
echo "platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32/releases/download/${pio_ver}/esp32-${pio_ver}.zip">>platformio.ini
echo "">>platformio.ini
# keep cache and dev_lib_deps.ini unless running from the master branch
[[ "${{ needs.set_matrix.outputs.branch_name }}" == "master" ]] && rm dev_lib_deps.ini || echo "Develop!" && pio system prune -f
# install local version of the library
pio pkg install -e test --no-save --library file://$(realpath ../../../)
pio run -e test
100 changes: 0 additions & 100 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,106 +1,6 @@
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_CrackScreen"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_CrackScreen
url = https://github.com/nomolk/M5Stack_CrackScreen
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_FlappyBird_game"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_FlappyBird_game
url = https://github.com/pcelli85/M5Stack_FlappyBird_game
[submodule "examples/M5Stack-SD-Menu/SD-Apps/Pixel-Fun-M5Stack"]
path = examples/M5Stack-SD-Menu/SD-Apps/Pixel-Fun-M5Stack
url = https://github.com/neoxharsh/Pixel-Fun-M5Stack
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Pacman-JoyPSP"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Pacman-JoyPSP
url = https://github.com/tobozo/M5Stack-Pacman-JoyPSP
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Rickroll"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Rickroll
url = https://github.com/tobozo/M5Stack-Rickroll
[submodule "examples/M5Stack-SD-Menu/SD-Apps/SpaceDefense-m5stack"]
path = examples/M5Stack-SD-Menu/SD-Apps/SpaceDefense-m5stack
url = https://github.com/dsiberia9s/SpaceDefense-m5stack
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-SpaceShooter"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-SpaceShooter
url = https://github.com/PartsandCircuits/M5Stack-SpaceShooter
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Sokoban"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Sokoban
url = https://github.com/robo8080/M5Stack_Sokoban
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-NyanCat"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-NyanCat
url = https://github.com/tobozo/M5Stack-NyanCat
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-ESP32-Oscilloscope"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-ESP32-Oscilloscope
url = https://github.com/botofancalin/M5Stack-ESP32-Oscilloscope
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-PacketMonitor"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-PacketMonitor
url = https://github.com/tobozo/M5Stack-PacketMonitor
[submodule "examples/M5Stack-SD-Menu/SD-Apps/mp3-player-m5stack"]
path = examples/M5Stack-SD-Menu/SD-Apps/mp3-player-m5stack
url = https://github.com/dsiberia9s/mp3-player-m5stack
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Tetris"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Tetris
url = https://github.com/PartsandCircuits/M5Stack-Tetris
ignore = dirty
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-DrawNumber"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-DrawNumber
url = https://gist.github.com/ksasao/c67d6fff5641e6fd40c7705352f6759e
[submodule "examples/M5Stack-SD-Menu/SD-Apps/d_invader"]
path = examples/M5Stack-SD-Menu/SD-Apps/d_invader
url = https://github.com/NibblesLab/d_invader
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_lifegame"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_lifegame
url = https://gist.github.com/shioken/fa2c3f5923170d86dd358b313d6ab244
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5_reversi"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5_reversi
url = https://gist.github.com/shioken/e90b9fa3b43d8b067adde77a75768efd
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_NyanCat_Ext"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_NyanCat_Ext
url = https://github.com/xisai/M5Stack_NyanCat
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Thermal-Camera"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Thermal-Camera
url = https://github.com/hkoffer/M5Stack-Thermal-Camera-
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Tube"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Tube
url = https://github.com/tobozo/M5Tube
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-MegaChess"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-MegaChess
url = https://github.com/m4k3r-net/M5Stack-MegaChess
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Raytracer"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-Raytracer
url = https://github.com/tobozo/M5Stack-Raytracer
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_ESP32_radio"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_ESP32_radio
url = https://github.com/anton-b/M5Stack_ESP32_radio
[submodule "examples/M5Stack-SD-Menu/SD-Apps/nixietubeM5"]
path = examples/M5Stack-SD-Menu/SD-Apps/nixietubeM5
url = https://github.com/drayde/nixietubeM5
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_WebRadio_Avator"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_WebRadio_Avator
url = https://github.com/robo8080/M5Stack_WebRadio_Avator
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-WiFiScanner"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-WiFiScanner
url = https://github.com/PartsandCircuits/M5Stack-WiFiScanner
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5StackMiniOthello"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5StackMiniOthello
url = https://github.com/TTtensan/M5StackMiniOthello
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-CrazyAsteroids"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-CrazyAsteroids
url = https://github.com/RJPlog/M5Stack-CrazyAsteroids
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_DigitalClock_NTP"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_DigitalClock_NTP
url = https://github.com/FromF/M5Stack_DigitalClock_NTP
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Particle_demo"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Particle_demo
url = https://github.com/vcraftjp/M5Stack_Particle_demo
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack-SetWiFi_Mic"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack-SetWiFi_Mic
url = https://github.com/micutil/SetWiFi_Mic
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5StackSandbox"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5StackSandbox
url = https://github.com/kumaashi/M5StackSandbox
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_LovyanToyBox"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_LovyanToyBox
url = https://github.com/lovyan03/M5Stack_LovyanToyBox
[submodule "examples/M5Stack-SD-Menu/SD-Apps/Frogger_M5Stack"]
path = examples/M5Stack-SD-Menu/SD-Apps/Frogger_M5Stack
url = https://github.com/pappani/Frogger_M5Stack
[submodule "examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Test_tools"]
path = examples/M5Stack-SD-Menu/SD-Apps/M5Stack_Test_tools
url = https://github.com/mongonta0716/M5Stack_Test_tools
Loading

0 comments on commit b42994e

Please sign in to comment.