Skip to content

Commit d475754

Browse files
authored
use arduino IDE stable in CI (#6572)
* fix CI by using a stable arduino/builder version * get rid of --allow-unauthenticated issue
1 parent ffe5476 commit d475754

File tree

3 files changed

+31
-18
lines changed

3 files changed

+31
-18
lines changed

.travis.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ git:
66
depth: 1
77
submodules: false
88

9-
addons:
10-
apt:
11-
sources:
12-
- ubuntu-toolchain-r-test
13-
packages:
14-
- g++-7
15-
- gcc-7
16-
179
before_install:
1810
- git submodule update --init # no recursive update
1911

@@ -87,7 +79,11 @@ jobs:
8779
- name: "Host tests"
8880
stage: build
8981
script: $TRAVIS_BUILD_DIR/tests/ci/host_test.sh
90-
install: sudo apt-get install valgrind lcov
82+
install:
83+
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
84+
- sudo apt-get update -q
85+
- sudo apt-get install -y --allow-unauthenticated g++-7 gcc-7
86+
- sudo apt-get install valgrind lcov
9187
env: CC=gcc-7 CXX=g++-7
9288

9389
- name: "Docs"
@@ -105,6 +101,10 @@ jobs:
105101
- name: "Mock trivial test"
106102
stage: build
107103
script: $TRAVIS_BUILD_DIR/tests/buildm.sh
104+
install:
105+
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
106+
- sudo apt-get update -q
107+
- sudo apt-get install -y --allow-unauthenticated g++-7 gcc-7
108108
env: CC=gcc-7 CXX=g++-7
109109

110110
- name: "Mac OSX can build sketches"

tests/common.sh

+20-9
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ function install_libraries()
153153

154154
function install_ide()
155155
{
156+
#local idever='nightly'
157+
#local ideurl='https://www.arduino.cc/download.php?f=/arduino-nightly'
158+
159+
local idever='1.8.10'
160+
local ideurl="https://downloads.arduino.cc/arduino-$idever"
161+
162+
echo "using Arduino IDE distribution ${idever}"
163+
156164
local ide_path=$1
157165
local core_path=$2
158166
local debug=$3
@@ -164,24 +172,27 @@ function install_ide()
164172
choco install --no-progress unzip
165173
choco install --no-progress sed
166174
#choco install --no-progress golang
167-
test -r arduino-nightly-windows.zip || wget -nv -O arduino-nightly-windows.zip https://www.arduino.cc/download.php?f=/arduino-nightly-windows.zip
168-
unzip -q arduino-nightly-windows.zip
175+
test -r arduino-windows.zip || wget -nv -O arduino-windows.zip "${ideurl}-windows.zip"
176+
unzip -q arduino-windows.zip
177+
mv arduino-${idever} arduino-distrib
169178
elif [ "$MACOSX" = "1" ]; then
170179
# MACOS only has next-to-obsolete Python2 installed. Install Python 3 from python.org
171180
wget https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg
172181
sudo installer -pkg python-3.7.4-macosx10.9.pkg -target /
173182
# Install the Python3 certificates, because SSL connections fail w/o them and of course they aren't installed by default.
174183
( cd "/Applications/Python 3.7/" && sudo "./Install Certificates.command" )
175184
# Hack to place arduino-builder in the same spot as sane OSes
176-
test -r arduino.zip || wget -O arduino.zip https://downloads.arduino.cc/arduino-nightly-macosx.zip
177-
unzip -q arduino.zip
178-
mv Arduino.app arduino-nightly
179-
mv arduino-nightly/Contents/Java/* arduino-nightly/.
185+
test -r arduino-macos.zip || wget -O arduino-macos.zip "${ideurl}-macosx.zip"
186+
unzip -q arduino-macos.zip
187+
mv Arduino.app arduino-distrib
188+
mv arduino-distrib/Contents/Java/* arduino-distrib/.
180189
else
181-
test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
182-
tar xf arduino.tar.xz
190+
#test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
191+
test -r arduino-linux.tar.xz || wget -O arduino-linux.tar.xz "${ideurl}-linux64.tar.xz"
192+
tar xf arduino-linux.tar.xz
193+
mv arduino-${idever} arduino-distrib
183194
fi
184-
mv arduino-nightly $ide_path
195+
mv arduino-distrib $ide_path
185196
cd $ide_path/hardware
186197
mkdir esp8266com
187198
cd esp8266com

tests/run_CI_locally.sh

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ done
8484
cp tests/platformio.sh tests/platformio-custom.sh
8585
sed -i 's,pip ,pip2 ,g' tests/platformio-custom.sh
8686

87+
git submodule update --init
88+
8789
export HOME="${TMPCI}"
8890
export TRAVIS_BUILD_DIR="${TMPCI}"
8991
export BUILD_TYPE="$BUILD_TYPE"

0 commit comments

Comments
 (0)