2022-02-19 08:06:30 +01:00
|
|
|
name: Remote run m5atom-matrix
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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
|
2022-02-19 20:52:36 +01:00
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2022-02-19 08:06:30 +01:00
|
|
|
- name: Install PlatformIO
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2022-02-19 20:19:35 +01:00
|
|
|
pip install --upgrade platformio platformio/contrib-pysite
|
2022-02-19 08:06:30 +01:00
|
|
|
pio platform update
|
|
|
|
pio run -t clean
|
|
|
|
- name: Set env
|
|
|
|
run: echo "PLATFORMIO_BUILD_FLAGS=-DVERSION='\"${GITHUB_REF#refs/*/}\"'" >> $GITHUB_ENV
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
- name: Run PlatformIO
|
2022-02-19 20:09:28 +01:00
|
|
|
run: pio account login --username="${{secrets.PIO_USERNAME}}" --password="${{secrets.PIO_PASSWORD}}"
|
2022-02-19 08:06:30 +01:00
|
|
|
- name: Run PlatformIO
|
|
|
|
run: pio remote run -e m5atom-matrix
|