ESPresense/.github/workflows/m5atom-matrix.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2022-02-19 08:06:30 +01:00
name: Remote run m5atom-matrix
on:
push:
branches:
- master
jobs:
2022-02-23 04:01:09 +01:00
remote-run:
2022-02-19 08:06:30 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2022-02-19 08:06:30 +01:00
- name: Cache pip
uses: actions/cache@v4
2022-02-19 08:06:30 +01:00
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
2022-02-19 08:06:30 +01:00
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
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:54:10 +01:00
pip install --upgrade platformio
2022-02-19 08:06:30 +01:00
pio platform update
pio run -t clean
2022-02-19 21:20:34 +01:00
- name: Setup Versioning
2022-02-19 08:06:30 +01:00
run: echo "PLATFORMIO_BUILD_FLAGS=-DVERSION='\"${GITHUB_REF#refs/*/}\"'" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v')
2022-02-19 21:20:34 +01:00
- name: PlatformIO Login
2022-02-19 20:09:28 +01:00
run: pio account login --username="${{secrets.PIO_USERNAME}}" --password="${{secrets.PIO_PASSWORD}}"
2022-02-19 21:20:34 +01:00
- name: Remote Run
2022-03-06 17:42:17 +01:00
run: pio remote run -t upload -t monitor --upload-port=/dev/ttyUSB0 -e m5atom-matrix
2022-02-19 21:20:34 +01:00
- name: Remote Monitor
2022-03-07 02:21:04 +01:00
run: pio remote device monitor --port=/dev/ttyUSB0