Skip to content

Added HPS support

Added HPS support #136

# Created this action based on information found in:
# - <https://docs.platformio.org/en/latest/integration/ci/github-actions.html>
# - <https://docs.github.com/en/free-pro-team@latest/actions/quickstart>
name: build-platformio
on:
push:
paths-ignore:
- '.github/workflows/build-arduino.yml'
- 'docs/**'
repository_dispatch:
types: [rebuild]
pull_request:
workflow_dispatch:
inputs:
iotsa_ref:
description: 'iotsa branch, ref or sha'
required: true
detault: develop
env:
iotsa_ref: develop
this_product: unknown
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
board:
- nodemcuv2
- esp32thing
- lolin32
- pico32
build_flags: [""]
steps:
- name: Set env
run: |
echo this_product=$(echo "${{ github.repository }}" | awk -F / '{print $2}' | sed -e "s/:refs//") >> $GITHUB_ENV
if [ "${{ github.event_name }}" == "repository_dispatch" ]; then
echo "iotsa_ref=${{ github.event.client_payload.iotsa_ref }}" >> $GITHUB_ENV
echo "repository_dispatch: iotsa_ref=${{ github.event.client_payload.iotsa_ref }}"
fi
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "iotsa_ref=${{ github.event.inputs.iotsa_ref }}" >> $GITHUB_ENV
echo "workflow_dispatch: iotsa_ref=${{ github.event.inputs.iotsa_ref }}"
fi
- name: Checkout code
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
pio platform install --with-package framework-arduinoespressif8266 espressif8266
pio platform install --with-package framework-arduinoespressif32 espressif32
- name: Install library dependencies
run: |
pio lib -g install "VEML6040"
pio lib -g install -f "https://github.com/cwi-dis/iotsa.git#${{ env.iotsa_ref }}"
- name: Run PlatformIO
run: |
pio run --environment ${{ matrix.board }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.this_product }}-${{ matrix.board }}-${{ env.iotsa_ref }}.bin
path: .pio/build/${{ matrix.board }}/firmware.bin