From 972f5e2c837a9096dc6dfefa4d80e52dad60a48e Mon Sep 17 00:00:00 2001 From: Francois Best Date: Tue, 10 Aug 2021 14:10:39 +0200 Subject: [PATCH] chore: Add PlatformIO workflow to run examples --- .github/workflows/platformio.yml | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/platformio.yml diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml new file mode 100644 index 0000000..6078a47 --- /dev/null +++ b/.github/workflows/platformio.yml @@ -0,0 +1,53 @@ +name: PlatformIO CI + +on: [push] + +jobs: + platformio: + runs-on: ubuntu-latest + strategy: + matrix: + example: + - examples/AltPinSerial + - examples/Basic_IO + - examples/Bench + - examples/Callbacks + - examples/DualMerger + - examples/ErrorCallback + - examples/Input + - examples/RPN_NRPN + - examples/SimpleSynth + steps: + - uses: actions/checkout@v2 + - name: Cache pip + uses: actions/cache@v2 + 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') }} + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Run PlatformIO + run: pio ci --lib="." \ + --board="uno" \ + --board="due" \ + --board="zero" \ + --board="leonardo" \ + --board="micro" \ + --board="nanoatmega328" \ + --board="megaatmega2560" \ + --board="teensy2" \ + --board="teensy30" \ + --board="teensy31" \ + --board="teensylc" + env: + PLATFORMIO_CI_SRC: ${{ matrix.example }}