Skip to content

Use IO15 as input, not IO2 (it is connected to the LED). #267

Use IO15 as input, not IO2 (it is connected to the LED).

Use IO15 as input, not IO2 (it is connected to the LED). #267

# 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:
- '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
jobs:
#
# Job#1 - Build all applications for all supported platforms, upload binaries as artifacts
#
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- application: lissabonDimmer
variant: lissabon-touchpad-dimmer
- application: lissabonDimmer
variant: lissabon-hidden-dimmer
- application: lissabonDimmer
variant: lissabon-plugin-dimmer
- application: lissabonDimmer
variant: lissabon-buttons-dimmer
- application: lissabonRemote
variant: lissabon-kitchen-remote
- application: lissabonLedstrip
variant: lissabon-5v-ledstrip
- application: lissabonLedstrip
variant: lissabon-12v-ledstrip
- application: lissabonController
variant: lissabon-controller
steps:
- name: Set env
run: |
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 "https://github.com/cwi-dis/iotsa.git#${{ env.iotsa_ref }}"
pio lib -g install file:///$PWD/libLissabon
- name: Run PlatformIO
run: |
(cd ${{ matrix.application }} && pio run --environment ${{ matrix.variant }} )
- name: Uninstall library dependencies
run: |
rm -rf ~/.platformio/lib/iotsa
rm -rf ~/.platformio/lib/libLissabon
- name: Copy build output
run: |
cp ${{ matrix.application }}/.pio/build/${{ matrix.variant }}/firmware.bin ${{ matrix.application }}-iotsa${{ env.iotsa_ref }}-${{ matrix.variant }}.bin
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.application }}-iotsa${{ env.iotsa_ref }}-${{ matrix.variant }}.bin
path: ${{ matrix.application }}-iotsa${{ env.iotsa_ref }}-${{ matrix.variant }}.bin