2021-12-19 22:15:41 +01:00
|
|
|
# Build examples with Platformio
|
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
# https://docs.platformio.org/en/latest/integration/ci/github-actions.html
|
|
|
|
|
|
|
|
name: PlatformIO CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master, dev ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master, dev ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2023-01-30 03:36:36 +01:00
|
|
|
continue-on-error: true
|
2021-12-19 22:15:41 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
example:
|
|
|
|
- "examples/PIO_TestPatterns"
|
2023-01-30 03:25:59 +01:00
|
|
|
no_gfx: ["", -DNO_GFX]
|
2023-01-30 03:33:37 +01:00
|
|
|
no_fast_functions: ["", -DNO_FAST_FUNCTIONS]
|
2023-01-30 03:25:59 +01:00
|
|
|
no_cie1931: ["", -DNO_CIE1931]
|
2023-01-30 03:33:37 +01:00
|
|
|
virtual_panel: ["", -DVIRTUAL_PANE]
|
2021-12-19 22:15:41 +01:00
|
|
|
|
2023-01-30 03:25:59 +01:00
|
|
|
env:
|
2023-01-30 03:26:47 +01:00
|
|
|
PLATFORMIO_BUILD_FLAGS: ${{ matrix.no_gfx }} ${{ matrix.no_fast_functions }} ${{ matrix.no_cie1931 }} ${{ matrix.virtual_panel }}
|
2021-12-19 22:15:41 +01:00
|
|
|
steps:
|
2023-01-30 03:30:47 +01:00
|
|
|
- name: Show Build Flags
|
|
|
|
run: echo $PLATFORMIO_BUILD_FLAGS
|
2021-12-19 22:15:41 +01:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Cache pip
|
2023-01-30 03:42:23 +01:00
|
|
|
uses: actions/cache@v3
|
2021-12-19 22:15:41 +01:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
restore-keys: ${{ runner.os }}-pip-
|
|
|
|
- name: Cache PlatformIO
|
2023-01-30 03:42:23 +01:00
|
|
|
uses: actions/cache@v3
|
2021-12-19 22:15:41 +01:00
|
|
|
with:
|
|
|
|
path: ~/.platformio
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
|
|
- name: Set up Python 3.x
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install Platformio
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade platformio
|
|
|
|
pio update
|
|
|
|
- name: Run PlatformIO
|
|
|
|
env:
|
|
|
|
PLATFORMIO_CI_SRC: ${{ matrix.example }}
|
|
|
|
run: |
|
|
|
|
pio ci -c ${{ matrix.example }}/platformio.ini
|