Update README.md #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cross-compilation Library Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| compile-sketch: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| board: | |
| # Uno / AVR (Mega has the flash headroom for the examples) | |
| - fqbn: arduino:avr:mega | |
| name: arduino:avr | |
| source-url: https://downloads.arduino.cc/packages/package_index.json | |
| # ESP32 | |
| - fqbn: esp32:esp32:esp32 | |
| name: esp32:esp32 | |
| source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | |
| # ESP32-C3 | |
| - fqbn: esp32:esp32:esp32c3 | |
| name: esp32:esp32 | |
| source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | |
| # ESP8266 | |
| - fqbn: esp8266:esp8266:thingdev | |
| name: esp8266:esp8266 | |
| source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
| # SAMD21 | |
| - fqbn: arduino:samd:mkr1000 | |
| name: arduino:samd | |
| source-url: https://downloads.arduino.cc/packages/package_index.json | |
| # Nano BLE 33 / nRF52840 | |
| - fqbn: arduino:mbed:nano33ble | |
| name: arduino:mbed | |
| source-url: https://downloads.arduino.cc/packages/package_index.json | |
| # RP2040 | |
| - fqbn: rp2040:rp2040:sparkfun_promicrorp2040 | |
| name: rp2040:rp2040 | |
| source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | |
| # RP2350 | |
| - fqbn: rp2040:rp2040:sparkfun_promicrorp2350 | |
| name: rp2040:rp2040 | |
| source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | |
| # STM32 | |
| - fqbn: STMicroelectronics:stm32:GenF4 | |
| name: STMicroelectronics:stm32 | |
| source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Branch name | |
| run: echo running on branch ${GITHUB_REF##*/} | |
| - name: Arduino - Install and setup the Arduino CLI | |
| uses: arduino/setup-arduino-cli@v2 | |
| - name: Arduino - Start config file | |
| run: arduino-cli config init --additional-urls ${{ matrix.board.source-url}} | |
| - name: Arduino - Update index | |
| run: arduino-cli core update-index | |
| - name: Arduino - Install platform | |
| run: arduino-cli core install ${{ matrix.board.name}} | |
| - name: Arduino - Install library dependencies | |
| run: arduino-cli lib install "SparkFun Toolkit" | |
| - name: Compile Sketch | |
| run: arduino-cli compile --fqbn ${{ matrix.board.fqbn }} examples/Example01_BasicCurrentReading --library . |