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 ]
|
2023-02-02 02:00:41 +01:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
- 'doc/**'
|
2021-12-19 22:15:41 +01:00
|
|
|
pull_request:
|
|
|
|
branches: [ master, dev ]
|
2023-02-02 02:00:41 +01:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
- 'doc/**'
|
2021-12-19 22:15:41 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2023-01-30 04:20:47 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-19 22:15:41 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-01-30 05:02:30 +01:00
|
|
|
framework: ["Arduino", "IDF"]
|
2023-01-30 03:25:59 +01:00
|
|
|
no_gfx: ["", -DNO_GFX]
|
2023-03-12 11:29:08 +01:00
|
|
|
# no_fast_functions: ["", -DNO_FAST_FUNCTIONS]
|
|
|
|
# no_cie1931: ["", -DNO_CIE1931]
|
|
|
|
# virtual_panel: ["", -DVIRTUAL_PANE]
|
2023-01-30 05:02:30 +01:00
|
|
|
example:
|
|
|
|
- "examples/PIO_TestPatterns"
|
2023-03-13 01:11:32 +01:00
|
|
|
# exclude:
|
|
|
|
# - no_fast_functions: ""
|
|
|
|
# virtual_panel: -DVIRTUAL_PANE
|
2021-12-19 22:15:41 +01:00
|
|
|
|
|
|
|
steps:
|
2023-01-30 03:52:35 +01:00
|
|
|
- name: Checkout
|
2023-09-04 21:36:31 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-01-30 03:52:35 +01:00
|
|
|
- name: Cache pip and platformio
|
2023-01-30 03:42:23 +01:00
|
|
|
uses: actions/cache@v3
|
2021-12-19 22:15:41 +01:00
|
|
|
with:
|
2023-01-30 03:52:35 +01:00
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.platformio/.cache
|
|
|
|
key: ${{ runner.os }}-pio
|
2021-12-19 22:15:41 +01:00
|
|
|
- name: Set up Python 3.x
|
2023-01-30 03:42:20 +01:00
|
|
|
uses: actions/setup-python@v4
|
2021-12-19 22:15:41 +01:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install Platformio
|
2023-05-10 16:34:02 +02:00
|
|
|
run: pip install --upgrade platformio==6.1.6
|
2023-01-30 04:53:57 +01:00
|
|
|
- name: Run PlatformIO CI (Arduino)
|
2023-01-30 05:02:30 +01:00
|
|
|
if: ${{ matrix.framework == 'Arduino'}}
|
2021-12-19 22:15:41 +01:00
|
|
|
env:
|
2023-01-30 03:44:02 +01:00
|
|
|
PLATFORMIO_BUILD_FLAGS: ${{ matrix.no_gfx }} ${{ matrix.no_fast_functions }} ${{ matrix.no_cie1931 }} ${{ matrix.virtual_panel }}
|
2023-01-30 04:25:24 +01:00
|
|
|
PLATFORMIO_CI_SRC: ${{ matrix.example }}
|
2023-01-30 04:53:57 +01:00
|
|
|
run: pio ci -e esp32 -c ${{ matrix.example }}/platformio.ini
|
|
|
|
- name: Run PlatformIO CI (ESP-IDF)
|
2023-01-30 05:02:30 +01:00
|
|
|
if: ${{ matrix.framework == 'IDF'}}
|
2023-01-30 04:53:57 +01:00
|
|
|
env:
|
|
|
|
PLATFORMIO_BUILD_FLAGS: -DIDF_BUILD ${{ matrix.no_gfx }} ${{ matrix.no_fast_functions }} ${{ matrix.no_cie1931 }} ${{ matrix.virtual_panel }}
|
|
|
|
# pio ci doesn't use our sdkconfig, so we have to use pio run
|
|
|
|
run: pio run -d ${{ matrix.example }} -e esp32idf -c ${{ matrix.example }}/platformio.ini
|