-
-
Notifications
You must be signed in to change notification settings - Fork 33
78 lines (77 loc) · 3.1 KB
/
platformio.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
example:
- examples/abstractingPinsPCF8574/abstractingPinsPCF8574.ino
- examples/analogExample/analogExample.ino
- examples/aw9523Example/aw9523Example.ino
- examples/buttonRotaryEncoder/buttonRotaryEncoder.ino
- examples/dfRobotAnalogInSwitches/dfRobotAnalogInSwitches.ino
- examples/dfRobotRotaryEncoder/dfRobotRotaryEncoder.ino
- examples/directionOnlyEncoder/directionOnlyEncoder.ino
- examples/exampleShiftReg/exampleShiftReg.ino
- examples/i2cEepromExample/i2cEepromExample.ino
- examples/interruptSwitchEncoder8574/interruptSwitchEncoder8574.ino
- examples/ioLogging/ioLogging.ino
- examples/joystickRotaryEncoder/joystickRotaryEncoder.ino
- examples/matrixKeyboard/matrixKeyboard.ino
# MBED
# - examples/mbed/mbedExample
# - examples/mbed/mbedShiftReg
- examples/mpr121Example/mpr121Example.ino
- examples/multiIoExample/multiIoExample.ino
- examples/rotaryEncoderLed23017/rotaryEncoderLed23017.ino
# FIXME: Unknown type HardwareSPI
# - examples/spiAndExtras/spiAndExtras.ino
# STM
# - examples/stm32HalTestRom/stm32HalTestRom.cpp
- examples/timedBlink/timedBlink.ino
- examples/touchScreen/touchScreen.ino
include:
# AVR
- example: examples/avrEepromExample/avrEepromExample.ino
board: megaatmega2560
# ESP
- example: examples/arduinoEEPROMExample/arduinoEEPROMExample.ino
board: [esp32dev, esp01_1m]
- example: examples/esp32touchSwitches/esp32touchSwitches.ino
board: esp32dev
- example: examples/touchScreenFT6206Lib/touchScreenFT6206Lib.ino
board: [esp32dev, esp01_1m]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Set Board Environment Variables
run: |
if [ -n "${{ matrix.board }}" ] && [ "${{ matrix.board }}" != "null" ]; then
BOARD_ENVS=""
if [ "${{ matrix.board }}" = "Array" ]; then
# If matrix.board is an array
for board in $(echo '${{ toJSON(matrix.board) }}' | jq -r '.[]'); do
BOARD_ENVS="$BOARD_ENVS --environment $board"
done
else
# If matrix.board is a single value
BOARD_ENVS="--environment ${{ matrix.board }}"
fi
echo "BOARD_ENVS=$BOARD_ENVS" >> $GITHUB_ENV
fi
shell: bash
- name: Build PlatformIO examples
run: pio ci --lib "." --project-conf=platformio.ini $BOARD_ENVS
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}