From cd6304067bf683b982f3503b43b801001455fc5f Mon Sep 17 00:00:00 2001 From: Dhruva Gole Date: Sun, 3 Oct 2021 14:15:41 +0530 Subject: [PATCH] setup pio build workflow for WatsonIOT Signed-off-by: Dhruva Gole --- .github/workflows/build-fw.yml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build-fw.yml diff --git a/.github/workflows/build-fw.yml b/.github/workflows/build-fw.yml new file mode 100644 index 0000000..f553744 --- /dev/null +++ b/.github/workflows/build-fw.yml @@ -0,0 +1,44 @@ +name: PlatformIO CI + +on: [push] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + firmwares: [WatsonIoT] # Add comma seperated path/to/fw folders + + 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: Install library dependencies + run: pio lib -g install knolleary/PubSubClient@^2.8 bblanchon/ArduinoJson@^6.16.1 "adafruit/Adafruit NeoPixel@^1.7.0" smfsw/Queue@^1.9 gmag11/ESPNtpClient@^0.2.5 + + - name: Run PlatformIO + run: pio ci --lib="." --lib="WatsonIoT/lib/Adxl355" --board=esp32dev -v + env: + PLATFORMIO_CI_SRC: ${{ matrix.firmwares }} + PLATFORMIO_BUILD_UNFLAGS: -Werror=reorder