-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
394 lines (385 loc) · 33.2 KB
/
.travis.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
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# $GIT_USER, $GIT_PASS (hide) and $TRAVIS_TOKEN (hide) in Settings > Environment Variables
# (password must not containing whitespaces or special chars used in urls, use e.g. - instead)
# Triggering builds (get TOKEN): https://docs.travis-ci.com/user/triggering-builds/
language: c
# blocklist
branches:
except:
- result/docu
env:
global:
#- ARDUINO_VERSION=1.6.5
#- ARDUINO_VERSION=1.8.1
- ARDUINO_VERSION=1.8.2
matrix:
#- BOARD="arduino:avr:uno"
- BOARD="arduino:avr:nano:cpu=atmega328"
before_install:
# setup a pseudo-display
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
- sleep 3
- export DISPLAY=:1.0
# setup Arduino IDE
- wget http://downloads.arduino.cc/arduino-$ARDUINO_VERSION-linux64.tar.xz
- tar xf arduino-$ARDUINO_VERSION-linux64.tar.xz && rm arduino-$ARDUINO_VERSION-linux64.tar.xz
- sudo mv arduino-$ARDUINO_VERSION /usr/local/share/arduino
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
#- sudo pip install ino
#- sudo ln -s /usr/local/share/arduino/hardware/arduino/avr/boards.txt /usr/local/share/arduino/hardware/arduino/boards.txt
# install other needed packages
- sudo apt-get install astyle
- sudo apt-get install diffstat
- sudo apt-get install doxygen
- sudo apt-get install gcc-avr avr-libc
- sudo apt-get install clang-tidy-3.9 #clang-tidy-*
- wget https://github.com/oclint/oclint/releases/download/v0.10.3/oclint-0.10.3-x86_64-linux-3.13.0-74-generic.tar.gz
- tar xf oclint-0.10.3-x86_64-linux-3.13.0-74-generic.tar.gz && rm oclint-0.10.3-x86_64-linux-3.13.0-74-generic.tar.gz
#- sudo apt-get install texlive-font-utils # epstopdf for doxygen
#- sudo apt-get install tree
install:
# - ln -s $PWD /usr/local/share/arduino/libraries/Adafruit_FONA
# - arduino --install-library "Adafruit SleepyDog Library,Adafruit MQTT Library"
- arduino --install-library "OneWireHub,SdFat,TinyWireM,SSD1306Ascii,LoRa,OneWire,BME280,SparkFun MicroView"
# old version of OLED_Display_96X96 - the one on github is too new and has incompatible constructor
#- wget https://github.com/Seeed-Studio/OLED_Display_96X96/archive/v1.0.0.tar.gz
#- tar xzf v1.0.0.tar.gz
# modified (?) libraries
#- sudo mv $PWD/OLED_Display_96X96-1.0.0 $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/LCD_Display9696 $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/Adafruit_Si7021 $HOME/Arduino/libraries/
#- sudo cp -R $PWD/libraries/TinyWireM $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/PJON-master $HOME/Arduino/libraries/ && sudo cp -d $PWD/libraries/PJON $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/DS2438 $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/IBM_LMIC_framework $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/TinyGPS-13 $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/I2C_Sensor_Lib_iLib-0.8.2 $HOME/Arduino/libraries/
- sudo cp -R $PWD/libraries/Waveshare_ePaper $HOME/Arduino/libraries/
- arduino --pref boardsmanager.additional.urls="http://digistump.com/package_digistump_index.json,http://drazzy.com/package_drazzy.com_index.json" --save-prefs
- arduino --install-boards "digistump:avr"
- arduino --install-boards "ATTinyCore:avr"
- git clone git://git.drogon.net/wiringPi && pushd $PWD/wiringPi && ./build && popd
- source ~/virtualenv/python2.7/bin/activate
- python --version
#- pip install -r requirements.txt
#- pip install pip flake8 flake8-docstrings flake8-future flake8-bandit flake8-chart --upgrade
- pip install pip flake8 flake8-docstrings flake8-bandit flake8-chart --upgrade
- pip --version
- flake8 --version
- deactivate
- set -o pipefail # error in case 'diff' sees differences (get 1st error in pipe), use '+o' to disable/unset
script:
#- ls -la
##### Arduino #####
## Uno_Builtin_LED_Interface
- FILE=$PWD/Uno_Builtin_LED_Interface/Uno_Builtin_LED_Interface.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_Builtin_LED_Interface.ino.elf"`
#- readelf -a $ELF_FILE >> $FILE.info; objdump -x $ELF_FILE >> $FILE.info; nm $ELF_FILE || true >> $FILE.info; strings -d $ELF_FILE >> $FILE.info; size $ELF_FILE >> $FILE.info;
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
# - $PWD/.repo-tools/travis/examine
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_OWSlave/OWH_DS2433_EEPROM_LCD_Sensors
- FILE=$PWD/Uno_OWSlave/OWH_DS2433_EEPROM_LCD_Sensors/OWH_DS2433_EEPROM_LCD_Sensors.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWH_DS2433_EEPROM_LCD_Sensors.ino.elf"`
#- readelf -a $ELF_FILE >> $FILE.info; objdump -x $ELF_FILE >> $FILE.info; nm $ELF_FILE || true >> $FILE.info; strings -d $ELF_FILE >> $FILE.info; size $ELF_FILE >> $FILE.info;
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=allman --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) || true # allman=ansi
#- astyle --style=horstmann --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- astyle --style=kr --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_N64_Controller_Pak_Reader
- FILE=$PWD/Uno_N64_Controller_Pak_Reader/Uno_N64_Controller_Pak_Reader.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_N64_Controller_Pak_Reader.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## MultiWii_2_4/MultiWii
- FILE=$PWD/MultiWii_2_4/MultiWii/MultiWii.ino
#- mkdir $PWD/src && ln -s $FILE $PWD/src/sketch.ino && ino build -m uno && readelf -a $PWD/.build/uno/firmware.elf || true
- arduino --verify --board $BOARD --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "MultiWii.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
# vvv test result ignored since not good yet - remove " || true #" to enable again vvv
- astyle --style=kr --indent=spaces=4 --verbose --recursive $PWD/MultiWii_2_4/MultiWii/*.ino,*.cpp,*.h,*.c &>> $FILE.style || true # && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
# ^^^ test result ignored since not good yet - remove " || true #" to enable again ^^^
## Uno_MultiWii_HardwarePlatform_Test/Uno_MultiWii_HardwarePlatform_Test
# (also contains a Sensors.cpp that might be tested like MultiWii_2_4/MultiWii above)
- FILE=$PWD/Uno_MultiWii_HardwarePlatform_Test/Uno_MultiWii_HardwarePlatform_Test.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_MultiWii_HardwarePlatform_Test.ino.elf"`
#- readelf -a $ELF_FILE >> $FILE.info; objdump -x $ELF_FILE >> $FILE.info; nm $ELF_FILE || true >> $FILE.info; strings -d $ELF_FILE >> $FILE.info; size $ELF_FILE >> $FILE.info;
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=allman --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) || true # allman=ansi
#- astyle --style=horstmann --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- astyle --style=kr --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_ADNS_3050_Test/Uno_ADNS_3050_Test
- FILE=$PWD/Uno_ADNS_3050_Test/Uno_ADNS_3050_Test.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_ADNS_3050_Test.ino.elf"`
#- readelf -a $ELF_FILE >> $FILE.info; objdump -x $ELF_FILE >> $FILE.info; nm $ELF_FILE || true >> $FILE.info; strings -d $ELF_FILE >> $FILE.info; size $ELF_FILE >> $FILE.info;
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=allman --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) || true # allman=ansi
#- astyle --style=horstmann --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## N64TinyUSB (cli/n64dual_tiny45)
- FILE=$PWD/cli/n64dual_tiny45/main.hex
- pushd $PWD/cli/n64dual_tiny45/; make hex >> $FILE.compile; popd
- avr-objcopy -I ihex -O elf32-avr $FILE $FILE.elf
- ELF_FILE=$FILE.elf
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- avr-objdump -x -D -S $FILE.elf >> $FILE.dis
# (1.) should test a folder but (2.) we did not change a single byte
#- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Helvetiny_Blink_CDC
- FILE=$PWD/Helvetiny_Blink_CDC/Helvetiny_Blink_CDC.ino
- arduino --verify --board digistump:avr:digispark-tiny --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Helvetiny_Blink_CDC.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Tiny_OWSlave_OWH_DS18B20_thermo-hygrometer
- FILE=$PWD/Tiny_OWSlave_OWH_DS18B20_thermo-hygrometer/Tiny_OWSlave_OWH_DS18B20_thermo-hygrometer.ino
#- arduino --verify --board ATTinyCore:avr:attinyx5:LTO=disable,TimerClockSource=default,chip=85,clock=8internal,eesave=aenable,bod=disable --verbose --preserve-temp-files $FILE >> $FILE.compile
- arduino --verify --board ATTinyCore:avr:attinyx5:LTO=disable,TimerClockSource=default,chip=85,clock=16pll,eesave=aenable,bod=disable --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Tiny_OWSlave_OWH_DS18B20_thermo-hygrometer.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/ThroughSerial/SoftwareBitBangSurrogate/Surrogate
- FILE=$PWD/OWPJON/ARDUINO/Local/ThroughSerial/SoftwareBitBangSurrogate/Surrogate/Surrogate.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Surrogate.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
# - $PWD/oclint-0.10.3/bin/oclint $FILE -- -c >> $FILE.oclint # oclint for arduino; https://github.com/richelbilderbeek/travis_cpp_tutorial/blob/master/statuses.md
## OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch/BlinkingSwitch.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "BlinkingSwitch.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_3way
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_3way/BlinkingSwitch_3way.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "BlinkingSwitch_3way.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-AS
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-AS/BlinkingSwitch_SWBB-AS.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "BlinkingSwitch_SWBB-AS.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TL
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TL/BlinkingSwitch_SWBB-TL.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "BlinkingSwitch_SWBB-TL.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TS
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TS/BlinkingSwitch_SWBB-TS.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "BlinkingSwitch_SWBB-TS.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/BlinkWithResponse/Receiver
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/BlinkWithResponse/Receiver/Receiver.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Receiver.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/DeviceGeneric
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/DeviceGeneric/DeviceGeneric.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "DeviceGeneric.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_LCD_Sensors
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_LCD_Sensors/OWP_DG_LCD_Sensors.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWP_DG_LCD_Sensors.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_Dragino_Sensors
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_Dragino_Sensors/OWP_DG_Dragino_Sensors.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWP_DG_Dragino_Sensors.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_1w-adaptor
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_1w-adaptor/OWP_DG_1w-adaptor.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWP_DG_1w-adaptor.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ATTINY/Local/SoftwareBitBang/DeviceGeneric
- FILE=$PWD/OWPJON/ATTINY/Local/SoftwareBitBang/DeviceGeneric/DeviceGeneric.ino
- arduino --verify --board ATTinyCore:avr:attinyx5:LTO=disable,TimerClockSource=default,chip=85,clock=16pll,eesave=aenable,bod=disable --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "DeviceGeneric.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_MicroView
- FILE=$PWD/OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_MicroView/OWP_DG_MicroView.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWP_DG_MicroView.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/ThroughLoRa/DeviceGeneric
- FILE=$PWD/OWPJON/ARDUINO/Local/ThroughLoRa/DeviceGeneric/DeviceGeneric.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "DeviceGeneric.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/ThroughLoRa/OWP_DG_GPS_WeatherStation
- FILE=$PWD/OWPJON/ARDUINO/Local/ThroughLoRa/OWP_DG_GPS_WeatherStation/OWP_DG_GPS_WeatherStation.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "OWP_DG_GPS_WeatherStation.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/AnalogSampling/BlinkTest/Receiver
- FILE=$PWD/OWPJON/ARDUINO/Local/AnalogSampling/BlinkTest/Receiver/Receiver.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Receiver.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## OWPJON/ARDUINO/Local/AnalogSampling/BlinkTest/Transmitter
- FILE=$PWD/OWPJON/ARDUINO/Local/AnalogSampling/BlinkTest/Transmitter/Transmitter.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Transmitter.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_Dragino_LoRa_GPS_Shield_TTN
- FILE=$PWD/Uno_Dragino_LoRa_GPS_Shield_TTN/Uno_Dragino_LoRa_GPS_Shield_TTN.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_Dragino_LoRa_GPS_Shield_TTN.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_ADNS_3050_Test
- FILE=$PWD/Uno_ADNS_3050_Test/Uno_ADNS_3050_Test.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_ADNS_3050_Test.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Due_AS7265X_Spectrometer
- FILE=$PWD/Due_AS7265X_Spectrometer/Due_AS7265X_Spectrometer.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Due_AS7265X_Spectrometer.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
## Uno_ePaper_Test
- FILE=$PWD/Uno_ePaper_Test/Uno_ePaper_Test.ino
- arduino --verify --board arduino:avr:uno --verbose --preserve-temp-files $FILE >> $FILE.compile
- ELF_FILE=`find /tmp/ -name "Uno_ePaper_Test.ino.elf"`
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
- astyle --style=kr --indent=spaces=4 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
##### Linux #####
## OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/Transmitter
- FILE=$PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/Transmitter/Transmitter.cpp
- pushd $PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/Transmitter/ && make && popd
- ELF_FILE=$PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/Transmitter/Transmitter
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=kr --indent=spaces=2 --indent-preproc-block --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) # '--indent-preproc-block' and '--style=google' need astyle v3
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- clang-tidy $FILE -checks=*,-clang-analyzer-alpha.* -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 &>> $FILE.clang
- $PWD/oclint-0.10.3/bin/oclint $FILE -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 >> $FILE.oclint
# - $PWD/oclint-0.10.3/bin/oclint -o oclint.log src/src.ino -- -c # oclint for arduino; https://github.com/richelbilderbeek/travis_cpp_tutorial/blob/master/statuses.md
#- clang++ -fsanitize=memory -fno-omit-frame-pointer -g -O2 -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 $FILE -lwiringPi -lpthread -lcrypt -lm -lrt -lstdc++ # "valgrind" / also possible to use '-stdlib=...' insted of '-lstdc++'
#- clang -fsanitize=memory -fno-omit-frame-pointer -g -O2 -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 $FILE -lwiringPi -lpthread -lcrypt -lm -lrt -lstdc++ # "valgrind" / also possible to use '-stdlib=...' insted of '-lstdc++'
## OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric
- FILE=$PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
- pushd $PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/ && make && popd
- ELF_FILE=$PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/owpshell
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=kr --indent=spaces=2 --indent-preproc-block --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) # '--indent-preproc-block' and '--style=google' need astyle v3
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- clang-tidy $FILE -checks=*,-clang-analyzer-alpha.* -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 &>> $FILE.clang
- $PWD/oclint-0.10.3/bin/oclint $FILE -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 >> $FILE.oclint
## OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric
- FILE=$PWD/OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
- pushd $PWD/OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/ && make && popd
- ELF_FILE=$PWD/OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/owpshell
- readelf -a $ELF_FILE >> $FILE.info && strings -d $ELF_FILE >> $FILE.info && size $ELF_FILE >> $FILE.info
#- astyle --style=kr --indent=spaces=2 --indent-preproc-block --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style)) # '--indent-preproc-block' and '--style=google' need astyle v3
- astyle --style=kr --indent=spaces=2 --verbose $FILE &>> $FILE.style && ((test ! -e ${FILE}.orig) || (diff -u ${FILE}.orig $FILE | tee -a $FILE.style | diffstat >> $FILE.style))
- clang-tidy $FILE -checks=*,-clang-analyzer-alpha.* -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 &>> $FILE.clang
- $PWD/oclint-0.10.3/bin/oclint $FILE -- -DLINUX -I. -I $PWD/libraries/PJON-11.0/src -std=gnu++11 >> $FILE.oclint
##### Python #####
- source ~/virtualenv/python2.7/bin/activate
## Uno_OWSniffer
- FILE=$PWD/Uno_OWSniffer/Uno_OWSniffer.py
- python -m py_compile $FILE &>> $FILE.compile
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,D202 $FILE >> $FILE.style
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
## micpy/ESP8266_SHT31_WiFi_pseudoREST
- FILE=$PWD/micpy/ESP8266_SHT31_WiFi_pseudoREST/*.py
- python -m py_compile $FILE &>> $FILE.compile
# vvv test result ignored since not good yet - remove " || true" to enable again vvv
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style || true
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
# ^^^ test result ignored since not good yet - remove " || true" to enable again ^^^
## OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric
- FILE=$PWD/OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/*.py
- python -m py_compile $FILE &>> $FILE.compile
# vvv test result ignored since not good yet - remove " || true" to enable again vvv
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style || true
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
# ^^^ test result ignored since not good yet - remove " || true" to enable again ^^^
## OWPJON/PJON-cython/DeviceGeneric
- FILE=$PWD/OWPJON/PJON-cython/DeviceGeneric.py
- python -m py_compile $FILE &>> $FILE.compile
# vvv test result ignored since not good yet - remove " || true" to enable again vvv
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style || true
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
# ^^^ test result ignored since not good yet - remove " || true" to enable again ^^^
## Uno_Dragino_LoRa_GPS_Shield_TTN
- FILE=$PWD/Uno_Dragino_LoRa_GPS_Shield_TTN/request-data-ttn-restful.py
- python -m py_compile $FILE &>> $FILE.compile
# vvv test result ignored since not good yet - remove " || true" to enable again vvv
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style || true
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
# ^^^ test result ignored since not good yet - remove " || true" to enable again ^^^
## Uno_ADNS_3050_Test/ser-mon-adns-3050
- FILE=$PWD/Uno_ADNS_3050_Test/ser-mon-adns-3050.py
- python -m py_compile $FILE &>> $FILE.compile
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
## Due_AS7265X_Spectrometer/ser-mon-AS7265X
- FILE=$PWD/Due_AS7265X_Spectrometer/ser-mon-AS7265X.py
- python -m py_compile $FILE &>> $FILE.compile
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
## ser-log
- FILE=$PWD/ser-log.py
- python -m py_compile $FILE &>> $FILE.compile
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
## ser-mon
- FILE=$PWD/ser-mon.py
- python -m py_compile $FILE &>> $FILE.compile
- flake8 --statistics --benchmark --max-complexity=12 --ignore=E127,E221,E265,D202 $FILE >> $FILE.style
- cat $FILE.style | flake8chart --chart-type=BAR --chart-output=$FILE.style.svg
- deactivate
after_script:
#- tree
# doxygen docu generation
- doxygen Doxyfile >> doxygen.log
#- pushd $PWD/doc/latex/; make; popd
# push result back to git repo
- git checkout -b result/docu
#- git add $PWD/doc/
- git add --all # may be use .gitignore to exclude .pyc files (not many yet)
#- git status
- git config user.email '[email protected]'
- git config user.name 'Travis CI'
- git commit --message "Travis build $TRAVIS_BUILD_NUMBER" --quiet
- git push -f https://$GIT_USER:[email protected]/drtrigon/sketchbook.git result/docu # dangerous; overwrite remote branch! may expose password!
after_success:
# trigger docker-sketchbook (same tests based on docker-arduino)
- |-
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
if [[ "$DOCKERTAG" == "$LATEST" ]] ; then
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d "{\"request\": {\"branch\":\"master\"}}" https://api.travis-ci.org/repo/drtrigon%2Fdocker-sketchbook/requests ;
fi ;
fi
#notifications:
# email:
# on_success: change
# on_failure: change