From 78d3b90085b3f0b2dcedb41fc19afb8f723ad455 Mon Sep 17 00:00:00 2001 From: Marcel Licence Date: Sat, 28 Mar 2026 14:20:26 +0100 Subject: [PATCH 1/3] use new workflow --- .github/workflows/arduino-cli-ci.yml | 246 +++++++++++++++++++++++++++ .github/workflows/compile-sketch.yml | 128 -------------- 2 files changed, 246 insertions(+), 128 deletions(-) create mode 100644 .github/workflows/arduino-cli-ci.yml delete mode 100644 .github/workflows/compile-sketch.yml diff --git a/.github/workflows/arduino-cli-ci.yml b/.github/workflows/arduino-cli-ci.yml new file mode 100644 index 0000000..9d3ff7d --- /dev/null +++ b/.github/workflows/arduino-cli-ci.yml @@ -0,0 +1,246 @@ +name: Arduino CLI CI build + +on: + push: + branches: [ "main" ] + tags: [ "v*" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + name: Build ${{ matrix.board.arduino_board }} - ${{ matrix.board.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + board: + + # ESP32 + - name: "ESP32 Dev Module" + fname: "esp32" + fqbn: "esp32:esp32:esp32" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + family: "ESP32" + extra_libs: "" + options: "" + manual_only: false + + - name: "ESP32S2 Dev Module" + fname: "esp32s2" + fqbn: "esp32:esp32:esp32s2" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + family: "ESP32" + extra_libs: "" + options: "" + manual_only: false + + - name: "LOLIN S2 Mini" + fname: "lolin_s2_mini" + fqbn: "esp32:esp32:lolin_s2_mini" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + family: "ESP32" + extra_libs: "" + options: "" + manual_only: false + + - name: "ESP32S3 Dev Module" + fname: "esp32s3" + fqbn: "esp32:esp32:esp32s3" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + family: "ESP32" + extra_libs: "" + options: "" + manual_only: false + + - name: "ESP32C3 Dev Module" + fname: "esp32c3" + fqbn: "esp32:esp32:esp32c3" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + family: "ESP32" + extra_libs: "" + options: "" + manual_only: true + + - name: "XIAO_ESP32C3" + fname: "xiao_esp32c3" + fqbn: "esp32:esp32:XIAO_ESP32C3" + core: "esp32:esp32@3.3.7" + urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + extra_libs: "" + options: "" + manual_only: true + + # ESP8266 + - name: "Generic ESP8266 Module" + fname: "esp8266" + fqbn: "esp8266:esp8266:generic" + core: "esp8266:esp8266@3.1.2" + urls: "http://arduino.esp8266.com/stable/package_esp8266com_index.json" + family: "ESP8266" + extra_libs: "" + options: "" + manual_only: false + + # RP2040 + - name: "Raspberry Pi Pico" + fname: "pico_rp2040" + fqbn: "rp2040:rp2040:rpipico" + family: "rp2040" + arduino_board: "Raspberry Pi Pico/RP2040/RP2350" + core: "rp2040:rp2040" + urls: "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" + extra_libs: "'MIDI Library@5.0.2'" + options: "usbstack=tinyusb" + manual_only: false + + - name: "Raspberry Pi Pico 2" + fname: "pico2_rp2350" + fqbn: "rp2040:rp2040:rpipico2" + family: "rp2350-arm-s --abs-block" + arduino_board: "Raspberry Pi Pico/RP2040/RP2350" + core: "rp2040:rp2040" + urls: "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" + extra_libs: "'MIDI Library@5.0.2'" + options: "usbstack=tinyusb" + manual_only: false + + - name: "Pimoroni PicoPlus2" + fname: "pimoroni_pico_plus2" + fqbn: "rp2040:rp2040:pimoroni_pico_plus_2" + family: "rp2350-arm-s --abs-block" + arduino_board: "Raspberry Pi Pico/RP2040/RP2350" + core: "rp2040:rp2040" + urls: "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" + extra_libs: "'MIDI Library@5.0.2'" + options: "usbstack=tinyusb" + manual_only: false + + # Seeeduino + - name: "Seeeduino XIAO (SAMD21)" + fname: "xiao_samd21" + fqbn: "Seeeduino:samd:seeed_XIAO_m0" + family: "SAMD21" + arduino_board: "Seeed SAMD Boards" + core: "Seeeduino:samd@1.8.5" + urls: "https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" + extra_libs: "" + options: "" + manual_only: false + + # STM32 + - name: "Generic STM32F4 Series - BlackPill F411CE" + fname: "genf4_blackpill_stm32f411ce" + fqbn: "STMicroelectronics:stm32:GenF4:pnum=BLACKPILL_F411CE" + core: "STMicroelectronics:stm32" + urls: "https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json" + family: "STM32" + extra_libs: "" + options: "" + manual_only: false + + - name: "Generic STM32H7 Series - Daisy Seed" + fname: "genh7_daisy_seed" + fqbn: "STMicroelectronics:stm32:GenH7:pnum=DAISY_SEED" + core: "STMicroelectronics:stm32" + urls: "https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json" + family: "STM32H7" + extra_libs: "DaisyDuino@1.7.0" + options: "" + manual_only: false + + # Teensy + - name: "Teensy 4.1" + fname: "teensy41" + fqbn: "teensy:avr:teensy41" + core: "teensy:avr" + urls: "https://www.pjrc.com/teensy/package_teensy_index.json" + family: "Teensy" + extra_libs: "" + options: "" + manual_only: true + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + - name: Install core + run: | + arduino-cli core update-index --additional-urls ${{ matrix.board.urls }} + for i in 1 2 3; do + arduino-cli core install ${{ matrix.board.core }} --additional-urls ${{ matrix.board.urls }} \ + && break || sleep 20 + done + + - name: Install libraries + run: | + arduino-cli lib install \ + "Adafruit NeoPixel@1.12.2" + + if [ ! -z "${{ matrix.board.extra_libs }}" ]; then + arduino-cli lib install ${{ matrix.board.extra_libs }} + fi + + - name: Install Custom Libraries + run: | + mkdir -p ~/Arduino/libraries + + git clone --depth 1 https://github.com/marcel-licence/AC101.git \ + ~/Arduino/libraries/AC101 + + git clone --depth 1 https://github.com/marcel-licence/ML_SynthTools.git \ + ~/Arduino/libraries/ML_SynthTools + + git clone --depth 1 https://github.com/marcel-licence/ML_SynthTools_Lib.git \ + ~/Arduino/libraries/ML_SynthTools_Lib + + - name: Compile Sketch + run: | + FULL_FQBN="${{ matrix.board.fqbn }}" + if [ ! -z "${{ matrix.board.options }}" ]; then + FULL_FQBN="${FULL_FQBN}:${{ matrix.board.options }}" + fi + + arduino-cli compile \ + --fqbn "$FULL_FQBN" \ + --output-dir build/${{ matrix.board.fname }} \ + ./ + + - name: Generate UF2 (SAMD21) + if: matrix.board.family == 'SAMD21' + run: | + BIN_FILE=$(find build -name "*.bin" | head -n 1) + curl -L https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py -o uf2conv.py + curl -L https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json -o uf2families.json + python3 uf2conv.py "$BIN_FILE" --family ${{ matrix.board.family }} --convert --output build/firmware.uf2 + + - name: Rename UF2 (RP2xxx) + if: contains(matrix.board.family, 'rp2') + run: mv build/${{ matrix.board.fname }}/*.uf2 build/firmware.uf2 || true + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: firmware-${{ matrix.board.fname }} + path: build/${{ matrix.board.fname }} + + - name: Create Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: | + build/${{ matrix.board.fname }}/**/*.bin + build/${{ matrix.board.fname }}/**/*.uf2 + build/${{ matrix.board.fname }}/**/*.hex + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml deleted file mode 100644 index 20b2ae2..0000000 --- a/.github/workflows/compile-sketch.yml +++ /dev/null @@ -1,128 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build_esp32: - - name: build esp32 - - runs-on: ubuntu-latest - - strategy: - matrix: - fqbn: - - esp32:esp32:esp32 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Compile sketch - uses: arduino/compile-sketches@v1 - with: - fqbn: ${{ matrix.fqbn }} - usbstack: tinyusb - platforms: | - - name: esp32:esp32 - source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - version: 2.0.13 - sketch-paths: | - - ./ - libraries: | - - source-url: https://github.com/marcel-licence/ML_SynthTools.git - name: ML_SynthTools - - source-url: https://github.com/marcel-licence/ML_SynthTools_Lib.git - name: ML_SynthTools_Lib - - source-url: https://github.com/adafruit/Adafruit-GFX-Library.git - name: Adafruit_GFX_Library - version: 1.10.10 - - source-url: https://github.com/adafruit/Adafruit_SSD1306.git - name: Adafruit_SSD1306 - version: 2.4.5 - - source-url: https://github.com/adafruit/Adafruit_BusIO.git - name: Adafruit BusIO - version: 1.14.1 - - build_esp8266: - - if: false - - name: build esp8266 - - runs-on: ubuntu-latest - - strategy: - matrix: - fqbn: - - esp8266:esp8266:d1_mini - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Compile sketch - uses: arduino/compile-sketches@v1 - with: - fqbn: ${{ matrix.fqbn }} - platforms: | - - name: esp8266:esp8266 - source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - version: 3.1.2 - sketch-paths: | - - ./ - libraries: | - - source-url: https://github.com/marcel-licence/ML_SynthTools.git - name: ML_SynthTools - - source-url: https://github.com/marcel-licence/ML_SynthTools_Lib.git - name: ML_SynthTools_Lib - - source-url: https://github.com/adafruit/Adafruit-GFX-Library.git - name: Adafruit_GFX_Library - version: 1.10.10 - - source-url: https://github.com/adafruit/Adafruit_SSD1306.git - name: Adafruit_SSD1306 - version: 2.4.5 - - source-url: https://github.com/adafruit/Adafruit_BusIO.git - name: Adafruit BusIO - version: 1.14.1 - - source-url: https://github.com/marcel-licence/AC101.git - name: AC101 - - build_rp2040: - - if: false - - name: build rp2040 - - runs-on: ubuntu-latest - - strategy: - matrix: - fqbn: - - rp2040:rp2040:rpipico - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Compile sketch - uses: arduino/compile-sketches@v1 - with: - fqbn: ${{ matrix.fqbn }} - platforms: | - - name: rp2040:rp2040 - source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json - sketch-paths: | - - ./ - libraries: | - - source-url: https://github.com/marcel-licence/ML_SynthTools.git - name: ML_SynthTools - - source-url: https://github.com/FortySevenEffects/arduino_midi_library.git - name: MIDI_Library - version: 5.0.2 From 4cf22ca6e40e0ecd0941ff04cfc9f3a4e032aac0 Mon Sep 17 00:00:00 2001 From: Marcel Licence Date: Sat, 28 Mar 2026 14:23:56 +0100 Subject: [PATCH 2/3] fix build --- ml_synth_basic_example.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_synth_basic_example.ino b/ml_synth_basic_example.ino index 8151643..070492f 100644 --- a/ml_synth_basic_example.ino +++ b/ml_synth_basic_example.ino @@ -74,7 +74,7 @@ #undef ML_SYNTH_INLINE_DECLARATION -char shortName[] = "ML_BasicSynth"; +const char shortName[] = "ML_BasicSynth"; void setup() From 062d643ea9c450be539b11d782276de7c9bad931 Mon Sep 17 00:00:00 2001 From: Marcel Licence Date: Sat, 28 Mar 2026 14:37:07 +0100 Subject: [PATCH 3/3] exclude not supported boards --- .github/workflows/arduino-cli-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/arduino-cli-ci.yml b/.github/workflows/arduino-cli-ci.yml index 9d3ff7d..c924cbd 100644 --- a/.github/workflows/arduino-cli-ci.yml +++ b/.github/workflows/arduino-cli-ci.yml @@ -166,6 +166,28 @@ jobs: options: "" manual_only: true + exclude: + - board: + name: "ESP32S2 Dev Module" + + - board: + name: "LOLIN S2 Mini" + + - board: + name: "ESP32C3 Dev Module" + + - board: + name: "XIAO_ESP32C3" + + - board: + name: "Generic ESP8266 Module" + + - board: + name: "Seeeduino XIAO (SAMD21)" + + - board: + name: "Generic STM32F4 Series - BlackPill F411CE" + steps: - uses: actions/checkout@v4 with: