Detect size overflow #89
This file contains 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: Continuous Integration | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install | |
run: sudo apt-get install -y lcov | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure | |
run: cmake -DCOVERAGE=true . | |
- name: Build | |
run: cmake --build . | |
- name: Run tests | |
run: ctest --output-on-failure . | |
- name: Capture coverage data | |
run: lcov --capture --no-external --directory . --output-file coverage.info | |
- name: Filter coverage data | |
run: lcov --remove coverage.info "$(pwd)/extras/*" --output-file coverage_filtered.info | |
- name: Generate coverage report | |
run: mkdir coverage && genhtml coverage_filtered.info -o coverage -t ArduinoJson | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: coverage | |
- name: Upload to Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage_filtered.info | |
arduino: | |
name: Arduino | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- core: arduino:avr | |
board: arduino:avr:leonardo | |
eeprom: true | |
softwareserial: true | |
- core: esp8266:esp8266 | |
board: esp8266:esp8266:huzzah | |
eeprom: true | |
softwareserial: true | |
index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
- core: esp32:esp32 | |
board: esp32:esp32:esp32 | |
eeprom: true | |
softwareserial: false | |
index_url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | |
- core: arduino:samd | |
board: arduino:samd:mkr1000 | |
eeprom: false | |
softwareserial: false | |
- core: STMicroelectronics:stm32 | |
board: STMicroelectronics:stm32:Nucleo_32 | |
eeprom: true | |
softwareserial: true | |
index_url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | |
- core: stm32duino:STM32F1 | |
board: stm32duino:STM32F1:mapleMini | |
eeprom: false | |
softwareserial: false | |
index_url: http://dan.drown.org/stm32duino/package_STM32duino_index.json | |
- core: stm32duino:STM32F4 | |
board: stm32duino:STM32F4:blackpill_f401 | |
eeprom: false | |
softwareserial: false | |
index_url: http://dan.drown.org/stm32duino/package_STM32duino_index.json | |
- core: rp2040:rp2040 | |
board: rp2040:rp2040:rpipico | |
eeprom: true | |
softwareserial: true | |
index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | |
- core: arduino:mbed_rp2040 | |
board: arduino:mbed_rp2040:pico | |
eeprom: false | |
softwareserial: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install arduino-cli | |
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh | |
- name: Update core index | |
run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}" | |
- name: Install core | |
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }} | |
- name: Build EepromRead | |
if: matrix.eeprom | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/EepromRead/EepromRead.ino" | |
- name: Build EepromWrite | |
if: matrix.eeprom | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/EepromWrite/EepromWrite.ino" | |
- name: Build HammingSerial1 | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/HammingSerial1/HammingSerial1.ino" | |
- name: Build HammingSoftwareSerial | |
if: matrix.softwareserial | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/HammingSoftwareSerial/HammingSoftwareSerial.ino" | |
- name: Build Logger | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/Logger/Logger.ino" | |
- name: Build ProgmemStream | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/ProgmemStream/ProgmemStream.ino" | |
- name: Build ReadBuffer | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/ReadBuffer/ReadBuffer.ino" | |
- name: Build ReadLogger | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/ReadLogger/ReadLogger.ino" | |
- name: Build StringPrint | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/StringPrint/StringPrint.ino" | |
- name: Build StringStream | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/StringStream/StringStream.ino" | |
- name: Build WriteBuffer | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/WriteBuffer/WriteBuffer.ino" | |
- name: Build WriteLogger | |
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/WriteLogger/WriteLogger.ino" | |
platformio: | |
name: PlatformIO | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: atmelavr | |
board: leonardo | |
eeprom: true | |
softwareserial: true | |
- platform: espressif8266 | |
board: huzzah | |
eeprom: true | |
softwareserial: true | |
- platform: espressif32 | |
board: esp32dev | |
eeprom: true | |
softwareserial: false | |
- platform: atmelsam | |
board: mkr1000USB | |
eeprom: false | |
softwareserial: false | |
- platform: teensy | |
board: teensy31 | |
eeprom: true | |
softwareserial: true | |
- platform: ststm32 | |
board: nucleo_f031k6 | |
eeprom: true | |
softwareserial: true | |
- platform: nordicnrf52 | |
board: adafruit_feather_nrf52840 | |
eeprom: false | |
softwareserial: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.platformio | |
~/.cache/pip | |
key: ${{ runner.os }}-platformio | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install PlatformIO | |
run: pip install platformio | |
- name: Install platform "${{ matrix.platform }}" | |
run: platformio platform install ${{ matrix.platform }} | |
- name: Install adafruit-nrfutil | |
if: ${{ matrix.platform == 'nordicnrf52' }} | |
run: pip3 install adafruit-nrfutil | |
- name: Include Adafruit_TinyUSB.h # https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/653 | |
if: ${{ matrix.platform == 'nordicnrf52' }} | |
run: find examples/ -name '*.ino' -exec sed -i 's/\(#include <StreamUtils.h>\)/\1\n#include <Adafruit_TinyUSB.h>/' {} + | |
- name: Build EepromRead | |
if: ${{ matrix.eeprom }} | |
run: platformio ci "examples/EepromRead/EepromRead.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build EepromWrite | |
if: ${{ matrix.eeprom }} | |
run: platformio ci "examples/EepromWrite/EepromWrite.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build HammingSerial1 | |
run: platformio ci "examples/HammingSerial1/HammingSerial1.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build HammingSoftwareSerial | |
if: ${{ matrix.softwareserial }} | |
run: platformio ci "examples/HammingSoftwareSerial/HammingSoftwareSerial.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build Logger | |
run: platformio ci "examples/Logger/Logger.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build ProgmemStream | |
run: platformio ci "examples/ProgmemStream/ProgmemStream.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build ReadBuffer | |
run: platformio ci "examples/ReadBuffer/ReadBuffer.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build ReadLogger | |
run: platformio ci "examples/ReadLogger/ReadLogger.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build StringPrint | |
run: platformio ci "examples/StringPrint/StringPrint.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build StringStream | |
run: platformio ci "examples/StringStream/StringStream.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build WriteBuffer | |
run: platformio ci "examples/WriteBuffer/WriteBuffer.ino" -l '.' -b ${{ matrix.board }} | |
- name: Build WriteLogger | |
run: platformio ci "examples/WriteLogger/WriteLogger.ino" -l '.' -b ${{ matrix.board }} |