-
-
Notifications
You must be signed in to change notification settings - Fork 10
80 lines (79 loc) · 2.82 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
79
80
name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Arduino32
# - examples/arduino32/colorTftEthernet32
# - examples/arduino32/dynamicMenuItems
# - examples/arduino32/nano33ble
# - examples/arduino32/picoAdafruitDashboard
# - examples/arduino32/picoAw9523LcdEncoder
# - examples/arduino32/piPicoTftTouch
# - examples/arduino32/stm32DuinoDemo
# MBED
# - examples/mbed/stm32EncoderLcdI2c
# - examples/mbed/stm32f429FrameBuffer
# - examples/mbed/stm32OledEncoder
# AVR
- example: examples/avr/adafruitST7735Mega
board: megaatmega2560
- example: examples/avr/analogDfRobot
board: megaatmega2560
- example: examples/avr/analogJoystick1306Ascii
board: megaatmega2560
- example: examples/avr/keyboardEthernetShield
board: megaatmega2560
- example: examples/avr/nokia5110
board: megaatmega2560
# ESP
- example: examples/esp/esp32Amplifier
board: esp32dev
- example: examples/esp/esp32s2Saola
board: esp32dev
- example: examples/esp/esp32s3TftEncoder
board: esp32dev
- example: examples/esp/esp32SimHub
board: esp32dev
- example: examples/esp/esp8266WifiOled
board: esp01_1m
- example: examples/esp/espCapTouchTft
board: [esp32dev, esp01_1m]
- example: examples/esp/simpleU8g2
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 }}