ESP32-PaxCounter/.github/workflows/build.yml

47 lines
1.2 KiB
YAML
Raw Normal View History

2022-10-27 12:34:43 +02:00
name: PlatformIO CI
on:
pull_request:
push:
# branches:
# - master
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
2022-10-27 12:34:43 +02:00
steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v3
2022-10-27 12:34:43 +02:00
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
2022-10-27 12:34:43 +02:00
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
2022-10-27 12:34:43 +02:00
with:
python-version: "3.9.15"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Copy of necessary files
run: |
cp platformio_orig.ini platformio.ini
cp src/loraconf_sample.h src/loraconf.h
cp src/ota_sample.conf src/ota.conf
cp src/paxcounter_orig.conf src/paxcounter.conf
- name: Run PlatformIO
run: pio run