forked from EnviroDIY/ModularSensors
-
Notifications
You must be signed in to change notification settings - Fork 1
329 lines (312 loc) · 16.9 KB
/
build_menu.yaml
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
name: Build All Menu Configurations
# Triggers the workflow on push or pull request events
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
PLATFORMIO_SRC_DIR: temp/menu_a_la_carte
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
include:
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_DIGI_XBEE_CELLULAR_TRANSPARENT
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_DIGI_XBEE_LTE_BYPASS
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_DIGI_XBEE_3G_BYPASS
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_DIGI_XBEE_WIFI
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_ESPRESSIF_ESP8266
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_QUECTEL_BG96
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SEQUANS_MONARCH
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM800
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7000
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SODAQ_2G_BEE_R6
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SODAQ_UBEE_R410M
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SODAQ_UBEE_U201
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_AO_SONG_AM2315
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_AO_SONG_DHT
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_APOGEE_SQ212
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_CO2
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_DO
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_ORP
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_PH
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_RTD
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ATLAS_SCIENTIFIC_EC
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_BOSCH_BME280
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_BOSCH_BMP3XX
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_CAMPBELL_CLARI_VUE10
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_CAMPBELL_OBS3
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_DECAGON_CTD
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_DECAGON_ES2
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_EVERLIGHT_ALSPT19
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_TIADS1X15
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_FREESCALE_MPL115A2
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_IN_SITU_RDO
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_IN_SITU_TROLL_SDI12A
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_KELLER_ACCULEVEL
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_KELLER_NANOLEVEL
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_MAX_BOTIX_SONAR
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_MAXIM_DS18
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_MEA_SPEC_MS5803
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_DECAGON_5TM
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_METER_HYDROS21
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_METER_TEROS11
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_PALEO_TERRA_REDOX
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_RAIN_COUNTER_I2C
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_SENSIRION_SHT4X
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_TALLY_COUNTER_I2C
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_TI_INA219
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_TURNER_CYCLOPS
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ANALOG_ELEC_CONDUCTIVITY
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y504
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y510
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y511
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y514
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y520
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y532
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y533
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y551
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y560
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_YOSEMITECH_Y4000
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: BUILD_SENSOR_ZEBRA_TECH_D_OPTO
publisherFlag: BUILD_PUB_ENVIRO_DIY_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_DREAM_HOST_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_THING_SPEAK_PUBLISHER
- modemFlag: BUILD_MODEM_SIM_COM_SIM7080
sensorFlag: NO_SENSORS
publisherFlag: BUILD_PUB_UBIDOTS_PUBLISHER
steps:
- uses: actions/checkout@v3
- name: Set environment variable for library installation source
run: |
if [[ -z "${GITHUB_HEAD_REF}" ]]; then
echo "::debug::Push to commit ${GITHUB_SHA}"
echo "LIBRARY_INSTALL_SOURCE=https://github.com/${GITHUB_REPOSITORY}.git#${GITHUB_SHA}" >> $GITHUB_ENV
else
echo "::debug::Pull Request from the ${GITHUB_HEAD_REF} branch"
echo "LIBRARY_INSTALL_SOURCE=https://github.com/${GITHUB_REPOSITORY}.git#${GITHUB_HEAD_REF}" >> $GITHUB_ENV
fi
if [[ -z "${GITHUB_HEAD_REF}" ]]; then
echo "::debug::Push to commit ${GITHUB_SHA}"
echo "LIBRARY_INSTALL_ZIP=https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.zip" >> $GITHUB_ENV
else
echo "::debug::Pull Request from the ${GITHUB_HEAD_REF} branch"
echo "LIBRARY_INSTALL_ZIP=https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_HEAD_REF}.zip" >> $GITHUB_ENV
fi
- name: Set up Python
uses: actions/setup-python@v4.4.0
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: Restore PlatformIO and Arduino platforms and libraries
uses: actions/cache@v3
id: cache_libraries
with:
path: |
~/.platformio
home/arduino
# if nothing in the dependencies.json file has changed, then it will
# be a "cache hit" and we can restore libraries from cache and not
# download them. If it has changed we have to re-download.
key: ${{ hashFiles('./continuous_integration/dependencies.json') }}
# Install cores and library dependencies for the Arduino CLI
- name: Install the Arduino libraries
if: steps.cache_libraries.outputs.cache-hit != 'true'
run: |
chmod +x continuous_integration/install-deps-arduino-cli.sh
sh continuous_integration/install-deps-arduino-cli.sh
# Install the dependencies for PlatformIO
- name: Install the PlatformIO dependencies at global level
if: steps.cache_libraries.outputs.cache-hit != 'true'
run: |
chmod +x continuous_integration/install-deps-platformio.sh
sh continuous_integration/install-deps-platformio.sh
# Install ModularSensors for the Arduino CLI
- name: Install the testing version of Modular Sensors for Arduino CLI
run: |
chmod +x continuous_integration/install-test-version-arduino-cli.sh
sh continuous_integration/install-test-version-arduino-cli.sh
# Install ModularSensors at the Global level for PlatformIO
# Force install to get the right version
- name: Install the testing version of Modular Sensors for PlatformIO
run: |
pio lib -g install -f ${{ env.LIBRARY_INSTALL_SOURCE }}
pio lib show EnviroDIY_ModularSensors
- name: Modify menu for matrix configuration
env:
modemFlag: ${{ matrix.modemFlag }}
sensorFlag: ${{ matrix.sensorFlag }}
publisherFlag: ${{ matrix.publisherFlag }}
run: |
echo "${{ env.LIBRARY_INSTALL_SOURCE }}"
chmod +x continuous_integration/modify-menu-configuration.sh
sh continuous_integration/modify-menu-configuration.sh
- name: Test with PlatformIO
run: |
echo "::group::Build for Mayfly"
platformio run --environment mayfly --project-conf="continuous_integration/platformio.ini"
echo "::endgroup::"
echo "::group::Build for Arduino Mega"
platformio run --environment mega --project-conf="continuous_integration/platformio.ini"
echo "::endgroup::"
echo "::group::Build for Arduino Zero"
platformio run --environment arduino_zero --project-conf="continuous_integration/platformio.ini"
echo "::endgroup::"
echo "::group::Build for Adafruit Feather M0"
platformio run --environment adafruit_feather_m0 --project-conf="continuous_integration/platformio.ini"
echo "::endgroup::"
echo "::group::Build for Sodaq Autonomo"
platformio run --environment autonomo --project-conf="continuous_integration/platformio.ini"
echo "::endgroup::"
- name: Test with Arduino CLI
run: |
echo "::group::Build for Mayfly"
arduino-cli --config-file continuous_integration/arduino_cli.yaml compile --clean --build-property "build.extra_flags=-DNEOSWSERIAL_EXTERNAL_PCINT -DBUILD_TEST_ALTSOFTSERIAL -DBUILD_TEST_NEOSWSERIAL -DBUILD_TEST_SOFTSERIAL -DBUILD_TEST_COMPLEX_LOOP" --fqbn EnviroDIY:avr:envirodiy_mayfly temp/menu_a_la_carte/
echo "::endgroup::"
echo "::group::Build for Arduino Mega"
arduino-cli --config-file continuous_integration/arduino_cli.yaml compile --clean --build-property "build.extra_flags=-DNEOSWSERIAL_EXTERNAL_PCINT -DMS_RAIN_SOFTWAREWIRE -DMS_PALEOTERRA_SOFTWAREWIRE -DMS_SDI12_NON_CONCURRENT" --fqbn arduino:avr:mega temp/menu_a_la_carte/
echo "::endgroup::"
echo "::group::Build for Arduino Zero"
arduino-cli --config-file continuous_integration/arduino_cli.yaml compile --clean --build-property "build.extra_flags-DNEOSWSERIAL_EXTERNAL_PCINT -DARDUINO_SAMD_ZERO -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON" --fqbn arduino:samd:mzero_bl temp/menu_a_la_carte/
echo "::endgroup::"
echo "::group::Build for Adafruit Feather M0"
arduino-cli --config-file continuous_integration/arduino_cli.yaml compile --clean --build-property "build.extra_flags=-DNEOSWSERIAL_EXTERNAL_PCINT -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ -DUSB_VID=0x239A -DUSB_PID=0x800B -DUSBCON -DUSB_CONFIG_POWER=100 -DMS_USE_ADS1015" --fqbn adafruit:samd:adafruit_feather_m0 temp/menu_a_la_carte/
echo "::endgroup::"
echo "::group::Build for Sodaq Autonomo"
arduino-cli --config-file continuous_integration/arduino_cli.yaml compile --clean --build-property "build.extra_flags=-DNEOSWSERIAL_EXTERNAL_PCINT -DVERY_LOW_POWER -D__SAMD21J18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON -DENABLE_SERIAL2 -DENABLE_SERIAL3 -DMS_SAMD_DS3231" --fqbn SODAQ:samd:sodaq_autonomo temp/menu_a_la_carte/
echo "::endgroup::"
# NOTE: Don't uninstall for PlatformIO because the library manager will clean up the
# dependencies leaving nothing for the cache
# pio lib -g uninstall EnviroDIY_ModularSensors
- name: Uninstall testing version of Modular Sensors before caching
run: |
arduino-cli --config-file continuous_integration/arduino_cli.yaml lib uninstall ModularSensors