Merge pull request #385 from elliotmatson/master

Move CI to a matrix, add ESP-IDF coverage
This commit is contained in:
mrfaptastic 2023-01-30 04:20:07 +00:00 committed by GitHub
commit c23e887818
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 100 deletions

11
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View file

@ -16,33 +16,42 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
framework: ["Arduino", "IDF"]
no_gfx: ["", -DNO_GFX]
no_fast_functions: ["", -DNO_FAST_FUNCTIONS]
no_cie1931: ["", -DNO_CIE1931]
virtual_panel: ["", -DVIRTUAL_PANE]
example:
- "examples/PIO_TestPatterns"
exclude:
- no_fast_functions: ""
virtual_panel: -DVIRTUAL_PANE
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
- name: Checkout
uses: actions/checkout@v3
- name: Cache pip and platformio
uses: actions/cache@v3
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') }}
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python 3.x
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Platformio
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pio update
- name: Run PlatformIO
run: pip install --upgrade platformio
- name: Run PlatformIO CI (Arduino)
if: ${{ matrix.framework == 'Arduino'}}
env:
PLATFORMIO_BUILD_FLAGS: ${{ matrix.no_gfx }} ${{ matrix.no_fast_functions }} ${{ matrix.no_cie1931 }} ${{ matrix.virtual_panel }}
PLATFORMIO_CI_SRC: ${{ matrix.example }}
run: |
pio ci -c ${{ matrix.example }}/platformio.ini
run: pio ci -e esp32 -c ${{ matrix.example }}/platformio.ini
- name: Run PlatformIO CI (ESP-IDF)
if: ${{ matrix.framework == 'IDF'}}
env:
PLATFORMIO_BUILD_FLAGS: -DIDF_BUILD ${{ matrix.no_gfx }} ${{ matrix.no_fast_functions }} ${{ matrix.no_cie1931 }} ${{ matrix.virtual_panel }}
# pio ci doesn't use our sdkconfig, so we have to use pio run
run: pio run -d ${{ matrix.example }} -e esp32idf -c ${{ matrix.example }}/platformio.ini

View file

@ -1,90 +1,23 @@
[platformio]
;default_envs = esp32
default_envs = esp32
description = HUB75 ESP32 I2S DMA test patterns example
;src_dir = src
[env]
framework = arduino
platform = espressif32
board = wemos_d1_mini32
lib_deps =
fastled/FastLED
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA.git
build_flags =
upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
[env:esp32]
build_flags =
${env.build_flags}
-DTEST_FASTLINES
lib_deps =
${env.lib_deps}
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
framework = arduino
[env:debug]
build_flags =
${env.build_flags}
-DTEST_FASTLINES
-DSERIAL_DEBUG
lib_deps =
${env.lib_deps}
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
; build without GFX functions
[env:minimal]
build_flags =
${env.build_flags}
-DNO_GFX
-DNO_FAST_FUNCTIONS
-DNO_CIE1931
lib_deps =
${env.lib_deps}
; Virtual Panel test
[env:vpane]
build_flags =
${env.build_flags}
-DNO_FAST_FUNCTIONS
-DVIRTUAL_PANE
lib_deps =
${env.lib_deps}
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
; Virtual Panel test
[env:vpane_minimal]
build_flags =
${env.build_flags}
-DVIRTUAL_PANE
-DNO_GFX
-DNO_FAST_FUNCTIONS
-DNO_CIE1931
lib_deps =
${env.lib_deps}
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
; PIO CI can't handle IDF git modules properly (yet)
;[env:idfarduino]
;platform = espressif32
;platform_packages =
; ; use a special branch
; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.4
;framework = arduino, espidf
;build_flags =
; ${env.build_flags}
; -DARDUINO=200
; -DESP32
; ;-DUSE_FASTLINES
; -DNO_GFX
;lib_deps =
; ${env.lib_deps}
; https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA.git
[env:esp32idf]
framework = arduino, espidf

View file

@ -15,4 +15,5 @@ CONFIG_ARDUHAL_PARTITION_SCHEME="default"
CONFIG_AUTOCONNECT_WIFI=y
CONFIG_ARDUINO_SELECTIVE_WiFi=y
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_FREERTOS_HZ=1000

View file

@ -1,14 +1,14 @@
// How to use this library with a FM6126 panel, thanks goes to:
// https://github.com/hzeller/rpi-rgb-led-matrix/issues/746
/*
// IDF
#ifdef IDF_BUILD
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <driver/gpio.h>
#include "sdkconfig.h"
*/
#endif
#include <Arduino.h>
#include "xtensa/core-macros.h"
#ifdef VIRTUAL_PANE
@ -241,7 +241,7 @@ void loop(){
delay(PATTERN_DELAY);
//
#ifdef TEST_FASTLINES
#ifndef NO_FAST_FUNCTIONS
// Fillrate for fillRect() function
Serial.print("Estimating fullscreen fillrate with fillRect() time: ");
t1 = micros();
@ -293,7 +293,7 @@ void loop(){
Serial.printf("%lu us, %u ticks\n", t2, ccount1);
delay(PATTERN_DELAY);
#ifdef TEST_FASTLINES
#ifndef NO_FAST_FUNCTIONS
Serial.println("Estimating V-lines with vlineDMA(): "); //
matrix->fillScreen(0);
color2 = random8();
@ -347,7 +347,7 @@ void loop(){
Serial.printf("%lu us, %u ticks\n", t2, ccount1);
delay(PATTERN_DELAY);
#ifdef TEST_FASTLINES
#ifndef NO_FAST_FUNCTIONS
Serial.println("Estimating H-lines with hlineDMA(): ");
matrix->fillScreen(0);
color2 = random8();