Skip to content

Commit edfc77b

Browse files
Merge branch 'master' into win32build
2 parents cf97079 + 77c4f5e commit edfc77b

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ jobs:
113113
script: $TRAVIS_BUILD_DIR/tests/buildm.sh
114114
env: CC=gcc-7 CXX=g++-7
115115

116+
- name: "MacOS can build sketches"
117+
os: osx
118+
stage: build
119+
script: $TRAVIS_BUILD_DIR/tests/build.sh
120+
env: MACOSX=1 BUILD_PARITY=custom mod=500 rem=1
121+
116122
- name: "Boards"
117123
stage: build
118124
script: $TRAVIS_BUILD_DIR/tests/ci/build_boards.sh

package/package_esp8266com_index.template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@
177177
},
178178
{
179179
"host": "x86_64-apple-darwin",
180-
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-placeholder.tar.gz",
181-
"archiveFileName": "python3-placeholder.tar.gz",
182-
"checksum": "SHA-256:d8cf9d9d66423d7b90978ebe285a73a6e8611995cd0d5e6273e929a0cf2c9850",
183-
"size": "191"
180+
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-macosx-placeholder.tar.gz",
181+
"archiveFileName": "python3-macosx-placeholder.tar.gz",
182+
"checksum": "SHA-256:5bfa0d4c2dc3edeeaa913f4eac42ef3ff0bf8c8fe9f11be112a8ca7911de2dae",
183+
"size": "198"
184184
},
185185
{
186186
"host": "x86_64-pc-linux-gnu",

tests/common.sh

+17-4
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ function build_sketches()
7171
# Paths to the arduino builder need to be c:\ referenced, not our native ones
7272
local pwd_win=$(realpath $PWD | sed 's/\/c/C:/')
7373
local bar_win=$(echo $build_arg | sed 's/\/c\//C:\//g')
74-
export ARDUINO_IDE_PATH=$(realpath $arduino | sed 's/\/c/C:/')
74+
# Make ARDUINO_IDE_PATH to Windows slashies
75+
export ARDUINO_IDE_PATH=$(realpath $arduino | sed 's/\/c/C:/' | tr / '\\' )
7576
build_cmd="python3 tools/build.py -b generic -v -w all -s 4M1M -v -k -p $pwd_win/$build_dir -n $lwip $bar_win "
77+
build_cmd=$(echo $build_cmd | tr '"' ' ') # Remove quotes to see if Win Go works better
7678
fi
7779
local sketches=$(find $srcpath -name *.ino | sort)
7880
print_size_info >size.log
@@ -159,13 +161,25 @@ function install_ide()
159161
# Acquire needed packages from Windows package manager
160162
choco install --no-progress python3
161163
export PATH="/c/Python37:$PATH" # Ensure it's live from now on...
162-
cp /c/Python37/python.exe /c/Python37/python3.exe
164+
cp /c/Python37/python.exe /c/Python37/python3.exe
163165
choco install --no-progress unzip
164166
choco install --no-progress sed
167+
choco install --no-progress golang
165168
test -r arduino-nightly-windows.zip || wget -nv -O arduino-nightly-windows.zip https://www.arduino.cc/download.php?f=/arduino-nightly-windows.zip
166169
unzip -q arduino-nightly-windows.zip
170+
elif [ "$MACOSX" = "1" ]; then
171+
# MACOS only has next-to-obsolete Python2 installed. Install Python 3 from python.org
172+
wget https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg
173+
sudo installer -pkg python-3.7.4-macosx10.9.pkg -target /
174+
# Install the Python3 certificates, because SSL connections fail w/o them and of course they aren't installed by default.
175+
( cd "/Applications/Python 3.7/" && sudo "./Install Certificates.command" )
176+
# Hack to place arduino-builder in the same spot as sane OSes
177+
test -r arduino.zip || wget -O arduino.zip https://downloads.arduino.cc/arduino-nightly-macosx.zip
178+
unzip -q arduino.zip
179+
mv Arduino.app arduino-nightly
180+
mv arduino-nightly/Contents/Java/* arduino-nightly/.
167181
else
168-
test -r arduino.tar.xz || wget -nv -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
182+
test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
169183
tar xf arduino.tar.xz
170184
fi
171185
mv arduino-nightly $ide_path
@@ -199,7 +213,6 @@ function install_arduino()
199213
echo -e "travis_fold:start:sketch_test_env_prepare"
200214
cd $TRAVIS_BUILD_DIR
201215
install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR $debug
202-
which arduino
203216
cd $TRAVIS_BUILD_DIR
204217
install_libraries
205218
echo -e "travis_fold:end:sketch_test_env_prepare"

0 commit comments

Comments
 (0)