2022-10-27 12:34:43 +02:00
|
|
|
name: PlatformIO CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
2022-10-27 13:34:26 +02:00
|
|
|
branches:
|
2022-11-01 11:37:18 +01:00
|
|
|
- master
|
|
|
|
- build-workflow
|
2022-11-01 11:20:17 +01:00
|
|
|
workflow_dispatch:
|
2022-10-27 12:34:43 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-10-27 13:11:50 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-11-01 11:33:27 +01:00
|
|
|
os: [ubuntu-latest]
|
|
|
|
# os: [ubuntu-latest, windows-latest, macos-latest]
|
2022-10-27 13:57:15 +02:00
|
|
|
include:
|
2022-11-01 11:37:18 +01:00
|
|
|
- os: ubuntu-latest
|
|
|
|
path: ~/.cache/pip
|
|
|
|
platformio-path: ~/.platformio
|
|
|
|
# - os: macos-latest
|
|
|
|
# path: ~/Library/Caches/pip
|
|
|
|
# platformio-path: ~/Library/Caches/platformio
|
|
|
|
# - os: windows-latest
|
|
|
|
# path: ~\AppData\Local\pip\Cache
|
|
|
|
# platformio-path: ~\AppData\Local\platformio\Cache
|
|
|
|
board:
|
|
|
|
[
|
2022-11-02 13:15:15 +01:00
|
|
|
generic.h,
|
2022-11-01 11:37:18 +01:00
|
|
|
ebox.h,
|
|
|
|
eboxtube.h,
|
|
|
|
ecopower.h,
|
|
|
|
heltec.h,
|
|
|
|
heltecv2.h,
|
|
|
|
heltecv21.h,
|
|
|
|
ttgov1.h,
|
|
|
|
ttgov2.h,
|
2022-11-01 20:21:17 +01:00
|
|
|
ttgov21old.h,
|
2022-11-01 20:19:37 +01:00
|
|
|
ttgov21new.h,
|
2022-11-01 11:37:18 +01:00
|
|
|
ttgofox.h,
|
|
|
|
ttgobeam.h,
|
|
|
|
ttgobeam10.h,
|
|
|
|
ttgotdisplay.h,
|
|
|
|
ttgotwristband.h,
|
|
|
|
fipy.h,
|
|
|
|
lopy.h,
|
|
|
|
lopy4.h,
|
|
|
|
lolin32litelora.h,
|
|
|
|
lolin32lora.h,
|
|
|
|
lolin32lite.h,
|
|
|
|
wemos32oled.h,
|
|
|
|
wemos32matrix.h,
|
|
|
|
octopus32.h,
|
|
|
|
tinypico.h,
|
|
|
|
tinypicomatrix.h,
|
|
|
|
m5core.h,
|
|
|
|
m5fire.h,
|
|
|
|
olimexpoeiso.h,
|
|
|
|
]
|
2022-10-27 13:11:50 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
2022-10-27 12:34:43 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Cache pip
|
2022-10-27 13:11:50 +02:00
|
|
|
uses: actions/cache@v3
|
2022-10-27 12:34:43 +02:00
|
|
|
with:
|
2022-10-27 13:57:15 +02:00
|
|
|
path: ${{ matrix.path }}
|
2022-10-27 12:34:43 +02:00
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Cache PlatformIO
|
2022-10-27 13:11:50 +02:00
|
|
|
uses: actions/cache@v3
|
2022-10-27 12:34:43 +02:00
|
|
|
with:
|
2022-10-27 13:57:15 +02:00
|
|
|
path: ${{ matrix.platformio-path }}
|
2022-10-27 12:34:43 +02:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
|
|
- name: Set up Python
|
2022-10-27 13:11:50 +02:00
|
|
|
uses: actions/setup-python@v4
|
2022-10-27 12:34:43 +02:00
|
|
|
with:
|
2022-10-27 13:20:19 +02:00
|
|
|
python-version: "3.9.13"
|
2022-10-27 12:34:43 +02:00
|
|
|
- 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
|
2022-11-01 11:20:17 +01:00
|
|
|
- name: Clean
|
|
|
|
run: pio run -t clean -e ci
|
2022-11-01 11:33:27 +01:00
|
|
|
- name: Run PlatformIO CI for ${{ matrix.board }}
|
2022-11-01 11:20:17 +01:00
|
|
|
env:
|
|
|
|
CI_HALFILE: ${{ matrix.board }}
|
|
|
|
run: pio run -e ci
|