diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2023-01-30 04:20:07 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-30 04:20:07 +0000 |
| commit | c23e8878188e4a8f5d298670a40e98521deea133 (patch) | |
| tree | ab27d81c2edf99d70f0179f863904bb7aa173346 | |
| parent | fd5aba705456ea6f87069a7942aaaf849263eeeb (diff) | |
| parent | a85b0e649ffa9da618b1610cecd212b72800d3bc (diff) | |
Merge pull request #385 from elliotmatson/master
Move CI to a matrix, add ESP-IDF coverage
| -rw-r--r-- | .github/dependabot.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/pio_build.yml | 47 | ||||
| -rw-r--r-- | examples/PIO_TestPatterns/platformio.ini | 81 | ||||
| -rw-r--r-- | examples/PIO_TestPatterns/sdkconfig.defaults | 3 | ||||
| -rw-r--r-- | examples/PIO_TestPatterns/src/main.cpp | 12 |
5 files changed, 54 insertions, 100 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..90e05c4 --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/pio_build.yml b/.github/workflows/pio_build.yml index 39901f9..d64bda4 100644 --- a/.github/workflows/pio_build.yml +++ b/.github/workflows/pio_build.yml @@ -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
\ No newline at end of file + 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 diff --git a/examples/PIO_TestPatterns/platformio.ini b/examples/PIO_TestPatterns/platformio.ini index 3505b2d..185513a 100644 --- a/examples/PIO_TestPatterns/platformio.ini +++ b/examples/PIO_TestPatterns/platformio.ini @@ -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 - -[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 +framework = arduino -; 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 diff --git a/examples/PIO_TestPatterns/sdkconfig.defaults b/examples/PIO_TestPatterns/sdkconfig.defaults index 909461e..ee16cd3 100644 --- a/examples/PIO_TestPatterns/sdkconfig.defaults +++ b/examples/PIO_TestPatterns/sdkconfig.defaults @@ -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
\ No newline at end of file +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +CONFIG_FREERTOS_HZ=1000
\ No newline at end of file diff --git a/examples/PIO_TestPatterns/src/main.cpp b/examples/PIO_TestPatterns/src/main.cpp index 6325b63..40d077e 100644 --- a/examples/PIO_TestPatterns/src/main.cpp +++ b/examples/PIO_TestPatterns/src/main.cpp @@ -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(); |
