Skip to content

Commit

Permalink
Merge pull request #173 from tobozo/1.2.1
Browse files Browse the repository at this point in the history
1.2.1
  • Loading branch information
tobozo authored Aug 1, 2022
2 parents 221bb82 + 8d78a09 commit 4ce1679
Show file tree
Hide file tree
Showing 13 changed files with 431 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,79 +1,72 @@
name: LibraryBuild
name: ArduinoBuild
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.h'
- '**LibraryBuild.yml'
- '**ArduinoBuild.yml'
pull_request:
release:
types: [published]

jobs:

matrix_build:
name: ${{ matrix.matrix-context }} (${{ matrix.sketch-names }}@${{ matrix.sdk-version }})
name: ${{ matrix.matrix-context }}@${{ matrix.sdk-version }})
runs-on: ubuntu-latest

strategy:
matrix:

sdk-version:
- 1.0.6
- 2.0.0
- 2.0.1
- 2.0.2
#- 2.0.0
#- 2.0.1
# - 2.0.2 # has broken SD Support
- 2.0.3
- 2.0.4

matrix-context:

- M5Core2-test
- M5Stack-test
- M5StickC-test
- LGFX-test
- M5Unified-test

- S3Box-Test
#- TTGO-LoRa32-V2-test
- M5Stack
- M5Core2
- M5Fire
- OdroidGo
#- TTGO-LoRa32-V2-test

#exclude:
# - matrix-context: OdroidGo-SD-Menu
# sdk-version: 1.0.6
exclude:
- sdk-version: 2.0.2 # has broken SD Support
# There's no esp32s3box support before 2.0.3
- { matrix-context: S3Box-Test, sdk-version: 1.0.6 }
#- { matrix-context: S3Box-Test, sdk-version: 2.0.0 }
#- { matrix-context: S3Box-Test, sdk-version: 2.0.1 }
#- { matrix-context: S3Box-Test sdk-version: 2.0.2 }
- { matrix-context: S3Box-Test, sdk-version: 2.0.4 } # will be fixed in 2.0.5 https://github.com/espressif/arduino-esp32/pull/6962/files
- { matrix-context: M5Core2-test, sdk-version: 1.0.6 } # M5Core2.h suddenly ceased to support 1.0.6 (I2S and I2C broken)


include:

# buildable sdk versions
- sdk-version: 1.0.6
platform-url: https://phpsecu.re/esp32/packages/package_esp32_esp32-1.0.6_index.json
- sdk-version: 2.0.0
platform-url: https://phpsecu.re/esp32/packages/package_esp32_esp32-2.0.0_index.json
- sdk-version: 2.0.1
platform-url: https://phpsecu.re/esp32/packages/package_esp32_esp32-2.0.1_index.json
- sdk-version: 2.0.2
platform-url: https://phpsecu.re/esp32/packages/package_esp32_esp32-2.0.2_index.json
#- sdk-version: 2.0.0
#- sdk-version: 2.0.1
- sdk-version: 2.0.3
- sdk-version: 2.0.4

# library health test sketches
- matrix-context: M5Core2-test
arduino-board: m5stack-core2
sketch-names: M5Stack-SDLoader-Snippet.ino
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Stack-test
arduino-board: m5stack-core-esp32
sketch-names: M5Stack-SDLoader-Snippet.ino
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Unified-test
arduino-board: m5stack-core2
sketch-names: M5Unified.ino
required-libraries: "M5GFX,M5Unified"
- matrix-context: M5StickC-test
arduino-board: m5stick-c
sketch-names: M5StickC-SPIFFS-Loader-Snippet.ino
required-libraries: "M5StickC"
- matrix-context: LGFX-test
arduino-board: m5stack-core-esp32
sketch-names: LGFX-SDLoader-Snippet.ino
required-libraries: "LovyanGFX"
- { matrix-context: M5Core2-test, arduino-board: m5stack-core2, sketch-names: M5Core2-SDLoader-Snippet.ino, required-libraries: "M5Core2", ... }
- { matrix-context: M5Stack-test, arduino-board: m5stack-core-esp32, sketch-names: M5Stack-SDLoader-Snippet.ino, required-libraries: "ESP32-Chimera-Core,LovyanGFX", ... }
- { matrix-context: S3Box-Test, arduino-board: esp32s3box, sketch-names: M5Stack-SDLoader-Snippet.ino, required-libraries: "ESP32-Chimera-Core,LovyanGFX", ... }
- { matrix-context: M5Unified-test, arduino-board: m5stack-core2, sketch-names: M5Unified.ino, required-libraries: "M5GFX,M5Unified", ... }
- { matrix-context: M5StickC-test, arduino-board: m5stick-c, sketch-names: M5StickC-SPIFFS-Loader-Snippet.ino, required-libraries: "M5StickC", ... }
- { matrix-context: LGFX-test, arduino-board: m5stack-core-esp32, sketch-names: LGFX-SDLoader-Snippet.ino, required-libraries: "LovyanGFX", ... }

# Launcher and Appstore
- matrix-context: M5Stack
Expand Down Expand Up @@ -106,7 +99,6 @@ jobs:
#sketch-names: TTGO-test.ino
#required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"


fail-fast: false

steps:
Expand All @@ -117,16 +109,19 @@ jobs:
- name: ${{ matrix.matrix-context }}
uses: ArminJo/arduino-test-compile@v3
with:
platform-url: ${{ matrix.platform-url }}
arduino-board-fqbn: esp32-${{ matrix.sdk-version }}:esp32:${{ matrix.arduino-board}}${{ matrix.extra-fqbn }}
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
#platform-url: ${{ matrix.platform-url }}
arduino-board-fqbn: esp32:esp32:${{ matrix.arduino-board}}${{ matrix.extra-fqbn }}
arduino-platform: esp32:esp32@${{ matrix.sdk-version }}
required-libraries: ${{ matrix.required-libraries }}
extra-arduino-lib-install-args: --no-deps
# extra-arduino-cli-args: ${{ matrix.extra-arduino-cli-args }}
extra-arduino-cli-args: "--warnings default " # see https://github.com/ArminJo/arduino-test-compile/issues/28
sketch-names: ${{ matrix.sketch-names }}
set-build-path: true
build-properties: ${{ toJson(matrix.build-properties) }}
#debug-install: true
- name: Copy compiled binary
- name: Copy compiled binaries
if: startsWith(matrix.sketch-names, 'M5Stack-SD-Menu')
run: |
cp examples/M5Stack-SD-Menu/build/M5Stack-SD-Menu.ino.bin examples/M5Stack-SD-Menu/build/${{ matrix.launcher-name }}-${{ matrix.sdk-version }}.bin
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/PlatformioBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: PlatformIOBuild

env:
PROJECT_DIR: examples/Test/build_test
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

on:
push:
paths:
- '**.ino'
- '**.ini'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PlatformioBuild.yml'
pull_request:
workflow_dispatch:

jobs:


build:
name: ${{ matrix.piocontext }}@${{ matrix.platform-version }}

runs-on: ubuntu-latest

strategy:
matrix:

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

platform-version:
- 1.0.6
- 2.0.0
- 2.0.1
#- 2.0.2 # has broken SD Support
- 2.0.3
- 2.0.4

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

fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pio update
pio upgrade
- name: Run PlatformIO
run: |
cd ${{ env.PROJECT_DIR }}
[[ "${{ env.BRANCH_NAME }}" == "master" ]] && rm dev_lib_deps.ini || echo "Develop!" && pio system prune -f
pio lib -e ${{ matrix.piocontext }}@${{ matrix.platform-version }} install --no-save file://$(realpath ../../../)
pio run -e ${{ matrix.piocontext }}@${{ matrix.platform-version }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[![License: MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/tobozo/M5Stack-SD-Updater/blob/master/LICENSE)
[![Build Status](https://travis-ci.com/tobozo/M5Stack-SD-Updater.svg?branch=master)](https://travis-ci.com/github/tobozo/M5Stack-SD-Updater)
[![Gitter](https://badges.gitter.im/M5Stack-SD-Updater/community.svg)](https://gitter.im/M5Stack-SD-Updater/community)
[![arduino-library-badge](https://www.ardu-badge.com/badge/M5Stack-SD-Updater.svg?)](https://www.ardu-badge.com/M5Stack-SD-Updater)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/tobozo/library/M5Stack-SD-Updater.svg?)](https://registry.platformio.org/packages/libraries/tobozo/M5Stack-SD-Updater)

![Arduino Build](https://github.com/tobozo/M5Stack-SD-Updater/actions/workflows/ArduinoBuild.yml/badge.svg?branch=master)
![Platformio Build](https://github.com/tobozo/M5Stack-SD-Updater/actions/workflows/PlatformioBuild.yml/badge.svg?branch=master)

# M5Stack-SD-Updater

Expand Down
29 changes: 29 additions & 0 deletions examples/Test/build_test/dev_lib_deps.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[lib_sdupdater]
lib_deps = M5Stack-SD-Updater

[lib_lgfx]
lib_deps =
git+https://github.com/lovyan03/LovyanGFX#develop
${lib_sdupdater.lib_deps}

[lib_chimeracore]
lib_deps =
git+https://github.com/lovyan03/LovyanGFX#develop
git+https://github.com/tobozo/ESP32-Chimera-Core#1.4.2
${lib_sdupdater.lib_deps}

[lib_m5unified]
lib_deps =
git+https://github.com/M5Stack/M5GFX#develop
git+https://github.com/M5Stack/M5Unified#develop
${lib_sdupdater.lib_deps}

[lib_m5core2]
lib_deps =
M5Core2
${lib_sdupdater.lib_deps}

[lib_m5stickc]
lib_deps =
M5StickC
${lib_sdupdater.lib_deps}
27 changes: 27 additions & 0 deletions examples/Test/build_test/main/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

#if defined TEST_LGFX

#include "../../../LGFX-SDLoader-Snippet/LGFX-SDLoader-Snippet.ino"

#elif defined TEST_M5Core2

#include "../../../M5Core2-SDLoader-Snippet/M5Core2-SDLoader-Snippet.ino"

#elif defined TEST_M5Stack || defined TEST_S3Box

#include "../../../M5Stack-SDLoader-Snippet/M5Stack-SDLoader-Snippet.ino"

#elif defined TEST_M5StickC

#include "../../../M5StickC-SPIFFS-Loader-Snippet/M5StickC-SPIFFS-Loader-Snippet.ino"

#elif defined TEST_M5Unified

#include "../../../M5Unified/M5Unified.ino"

#else

#error "No device to test"

#endif

Loading

0 comments on commit 4ce1679

Please sign in to comment.