Skip to content

Commit 1abfbec

Browse files
committed
Fix #107: silence IDE noise during CI builds
1 parent f52faa0 commit 1abfbec

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
##############################################################################
1515

1616
dist: trusty
17-
sudo: false
17+
sudo: true
1818

1919
env:
2020
global:
@@ -39,6 +39,16 @@ matrix:
3939
- if [ ! -d "$HOME/arduino_ide" ] ; then mkdir "$HOME/arduino_ide" ; fi
4040
- if [ ! -d "$HOME/$ARDUINO_IDE" ] ; then { echo "fetch" && wget https://downloads.arduino.cc/arduino-${IDE_VERSION}-linux64.tar.xz && echo "untar" && tar xf arduino-${IDE_VERSION}-linux64.tar.xz && echo "move" && mv -f arduino-${IDE_VERSION} $HOME/${ARDUINO_IDE} ; } || { echo "IDE install failed"; exit 1; } ; else echo "IDE already installed" ; fi
4141
- export PATH="$HOME/${ARDUINO_IDE}:$PATH"
42+
43+
# Arduino IDE adds a lot of noise caused by network traffic, firewall it off
44+
# (see https://github.com/per1234/arduino-ci-script/issues/1#issuecomment-504158113)
45+
- sudo iptables -P INPUT DROP
46+
- sudo iptables -P FORWARD DROP
47+
- sudo iptables -P OUTPUT ACCEPT
48+
- sudo iptables -A INPUT -i lo -j ACCEPT
49+
- sudo iptables -A OUTPUT -o lo -j ACCEPT
50+
- sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
51+
4252
#
4353
# arduino_lorawan looks for project_config things, so we must put
4454
# things in the canonical place

0 commit comments

Comments
 (0)