mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-15 16:25:43 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- src/**
|
|
- lib/**
|
|
- scripts/**
|
|
- web/**
|
|
- platformio.ini
|
|
branches:
|
|
- '*'
|
|
tags:
|
|
- '*'
|
|
- '!v*.*.*'
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out code from repo
|
|
uses: actions/checkout@v1
|
|
- name: Cache Python dependencies
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('platformio.ini') }}
|
|
- name: Cache PlatformIO dependencies
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.pio/libdeps
|
|
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -U platformio css_html_js_minify
|
|
- name: Configure build targets
|
|
run: echo "[platformio]\ndefault_envs = esp8266, esp32" > platformio-user.ini
|
|
- name: PlatformIO lib install
|
|
run: pio lib install
|
|
- name: PlatformIO run
|
|
run: pio run
|