Skip to content

Commit d11c763

Browse files
committed
update travis yml
another ci test ci fix ci attempt 6 stable package json fixe prefs fix lib folder debug alalalalaalal try with 1.6.5 try with 1.6.7 verbose build 1.6.7 again back to 1.6.5 escaped : in url no save pref no save pref, one line and back to working 1.6.5 getting all examples built added sh include fix sh added build build examples aded debug output going insane beautify added lib ArduinoJson try again 1.6.8 get arduino json from github back to 1.6.5
1 parent f9cc4b6 commit d11c763

File tree

3 files changed

+70
-6
lines changed

3 files changed

+70
-6
lines changed

.travis.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,28 @@ before_install:
33
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
44
- sleep 3
55
- export DISPLAY=:1.0
6-
- wget http://downloads.arduino.cc/arduino-1.6.8-linux64.tar.xz
7-
- tar xf arduino-1.6.8-linux64.tar.xz
8-
- sudo mv arduino-1.6.8 /usr/local/share/arduino
6+
- wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz
7+
- tar xf arduino-1.6.5-linux64.tar.xz
8+
- sudo mv arduino-1.6.5 /usr/local/share/arduino
99
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
1010
install:
1111
- ln -s $PWD /usr/local/share/arduino/libraries/WiFiManager
12-
- arduino --pref "boardsmanager.additional.urls=https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs 2>&1
12+
# boards manager not working on 1.6.7 - 1.6.8
13+
- arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs
14+
# install lib arduino json not working in 1.6.5
15+
# - arduino --install-library "ArduinoJson"
16+
- git clone https://github.com/bblanchon/ArduinoJson /usr/local/share/arduino/libraries/ArduinoJson
1317
- arduino --install-boards esp8266:esp8266
14-
# - arduino --install-library "Adafruit SleepyDog Library,Adafruit MQTT Library"
18+
- arduino --board esp8266:esp8266:generic --save-prefs
19+
- arduino --pref "compiler.warning_level=all" --save-prefs
1520
script:
16-
- arduino --verify --board esp8266:generic $PWD/examples/AutoConnect/AutoConnect.ino
21+
- "echo $PWD"
22+
- "echo $HOME"
23+
- "ls $PWD"
24+
- source $TRAVIS_BUILD_DIR/travis/common.sh
25+
- build_examples
26+
# - "cat $PWD/examples/AutoConnect/AutoConnect.ino"
27+
# - arduino -v --verbose-build --verify $PWD/examples/AutoConnect/AutoConnect.ino
1728
# - arduino --verify --board arduino:avr:uno $PWD/examples/IncomingCall/IncomingCall.ino
1829
# - arduino --verify --board arduino:avr:uno $PWD/examples/AdafruitIO_GPS/AdafruitIO_GPS.ino
1930
notifications:

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# WiFiManager
22
ESP8266 WiFi Connection manager with fallback web configuration portal
33

4+
[![Build Status](https://travis-ci.org/tzapu/WiFiManager.svg?branch=master)](https://travis-ci.org/tzapu/WiFiManager)
5+
46
The configuration portal is of the captive variety, so on various devices it will present the configuration dialogue as soon as you connect to the created access point.
57

68
First attempt at a library. Lots more changes and fixes to do. Contributions are welcome.

travis/common.sh

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
function build_examples()
4+
{
5+
# track the exit code for this platform
6+
local exit_code=0
7+
# loop through results and add them to the array
8+
examples=($(find $PWD/examples/ -name "*.pde" -o -name "*.ino"))
9+
10+
# get the last example in the array
11+
local last="${examples[@]:(-1)}"
12+
13+
# loop through example sketches
14+
for example in "${examples[@]}"; do
15+
16+
# store the full path to the example's sketch directory
17+
local example_dir=$(dirname $example)
18+
19+
# store the filename for the example without the path
20+
local example_file=$(basename $example)
21+
22+
echo "$example_file: "
23+
local sketch="$example_dir/$example_file"
24+
echo "$sketch"
25+
#arduino -v --verbose-build --verify $sketch
26+
27+
# verify the example, and save stdout & stderr to a variable
28+
# we have to avoid reading the exit code of local:
29+
# "when declaring a local variable in a function, the local acts as a command in its own right"
30+
local build_stdout
31+
build_stdout=$(arduino --verify $sketch 2>&1)
32+
33+
# echo output if the build failed
34+
if [ $? -ne 0 ]; then
35+
# heavy X
36+
echo -e "\xe2\x9c\x96"
37+
echo -e "----------------------------- DEBUG OUTPUT -----------------------------\n"
38+
echo "$build_stdout"
39+
echo -e "\n------------------------------------------------------------------------\n"
40+
41+
# mark as fail
42+
exit_code=1
43+
44+
else
45+
# heavy checkmark
46+
echo -e "\xe2\x9c\x93"
47+
fi
48+
done
49+
50+
return $exit_code
51+
}

0 commit comments

Comments
 (0)