-
Notifications
You must be signed in to change notification settings - Fork 6
143 lines (120 loc) · 4.39 KB
/
build.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: build
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
platformio-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pio lib -g install "pilotak/MovingAverage"
pio lib -g install "pilotak/MovingAverageAngle"
- name: Compile UNO
run: |
pio ci --lib="." --board=uno
env:
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_AVR
- name: Compile ESP8266
run: |
pio ci --lib="." --board=esp8285
env:
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_ESP8266
- name: Compile ESP32
run: |
pio ci --lib="." --board=esp32dev
env:
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_ESP32
- name: Compile adhoc
run: |
pio ci --lib="." --board=uno --board=esp8285 --board=esp32dev
env:
PLATFORMIO_CI_SRC: ./examples/WeatherMeters_adhoc
- name: Compile external ADC
run: |
pio lib -g install "pilotak/MCP3X21"
pio ci --lib="." --board=uno --board=esp8285 --board=esp32dev
env:
PLATFORMIO_CI_SRC: ./examples/WeatherMeters_external_ADC
arduino-build:
strategy:
matrix:
board: ["UNO", "ESP8266", "ESP32"]
include:
- board: "UNO"
platform: "arduino:avr"
fqbn: "arduino:avr:uno"
url: ""
- board: "ESP8266"
platform: "esp8266:esp8266"
fqbn: "esp8266:esp8266:esp8285"
url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
- board: "ESP32"
platform: "esp32:esp32"
fqbn: "esp32:esp32:esp32"
url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
cp ./WeatherMeters.h ./examples/WeatherMeters_external_ADC
cp ./WeatherMeters.h ./examples/WeatherMeters_adhoc
- name: Set up Python
if: ${{ matrix.board == 'ESP32' }}
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install pyserial
if: ${{ matrix.board == 'ESP32' }}
run: |
python -m pip install --upgrade pip
pip install --upgrade pyserial
- name: Setup Arduino CLI
uses: arduino/[email protected]
- name: "Install platform for ${{ matrix.board }}"
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.platform }}
arduino-cli lib install --git-url https://github.com/pilotak/MovingAverage
arduino-cli lib install --git-url https://github.com/pilotak/MovingAverageAngle
env:
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: ${{ matrix.url }}
ARDUINO_ENABLE_UNSAFE_LIBRARY_INSTALL: true
- name: Compile timer UNO
if: ${{ matrix.board == 'UNO' }}
run: |
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_AVR
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_AVR
- name: Compile timer ESP8266
if: ${{ matrix.board == 'ESP8266' }}
run: |
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_ESP8266
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_ESP8266
- name: Compile timer ESP32
if: ${{ matrix.board == 'ESP32' }}
run: |
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_ESP32
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_ESP32
- name: Compile adhoc
run: |
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/WeatherMeters_adhoc
- name: Compile external ADC
run: |
arduino-cli lib install --git-url https://github.com/pilotak/MCP3X21
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/WeatherMeters_external_ADC
env:
ARDUINO_ENABLE_UNSAFE_LIBRARY_INSTALL: true