mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-06 05:21:22 +03:00
Add OSX build to CI, fix OSX builds (#6492)
Build a single sketch using a Travis-CI OSX instance to validate the toolchain works properly on Macs. Update the installed python3 symlink to point to the proper spot for OSX (Python3 is in /usr/local/bin, not /usr/bin). Fixes #6490
This commit is contained in:
parent
5ca0bde200
commit
77c4f5e5cf
@ -107,6 +107,12 @@ jobs:
|
|||||||
script: $TRAVIS_BUILD_DIR/tests/buildm.sh
|
script: $TRAVIS_BUILD_DIR/tests/buildm.sh
|
||||||
env: CC=gcc-7 CXX=g++-7
|
env: CC=gcc-7 CXX=g++-7
|
||||||
|
|
||||||
|
- name: "MacOS can build sketches"
|
||||||
|
os: osx
|
||||||
|
stage: build
|
||||||
|
script: $TRAVIS_BUILD_DIR/tests/build.sh
|
||||||
|
env: MACOSX=1 BUILD_PARITY=custom mod=500 rem=1
|
||||||
|
|
||||||
- name: "Boards"
|
- name: "Boards"
|
||||||
stage: build
|
stage: build
|
||||||
script: $TRAVIS_BUILD_DIR/tests/ci/build_boards.sh
|
script: $TRAVIS_BUILD_DIR/tests/ci/build_boards.sh
|
||||||
|
@ -177,10 +177,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"host": "x86_64-apple-darwin",
|
"host": "x86_64-apple-darwin",
|
||||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-placeholder.tar.gz",
|
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-macosx-placeholder.tar.gz",
|
||||||
"archiveFileName": "python3-placeholder.tar.gz",
|
"archiveFileName": "python3-macosx-placeholder.tar.gz",
|
||||||
"checksum": "SHA-256:d8cf9d9d66423d7b90978ebe285a73a6e8611995cd0d5e6273e929a0cf2c9850",
|
"checksum": "SHA-256:5bfa0d4c2dc3edeeaa913f4eac42ef3ff0bf8c8fe9f11be112a8ca7911de2dae",
|
||||||
"size": "191"
|
"size": "198"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"host": "x86_64-pc-linux-gnu",
|
"host": "x86_64-pc-linux-gnu",
|
||||||
|
@ -135,7 +135,7 @@ function install_libraries()
|
|||||||
pushd $HOME/Arduino/libraries
|
pushd $HOME/Arduino/libraries
|
||||||
|
|
||||||
# install ArduinoJson library
|
# install ArduinoJson library
|
||||||
{ test -r ArduinoJson-v6.11.0.zip || wget https://github.com/bblanchon/ArduinoJson/releases/download/v6.11.0/ArduinoJson-v6.11.0.zip; } && unzip ArduinoJson-v6.11.0.zip
|
{ test -r ArduinoJson-v6.11.0.zip || wget https://github.com/bblanchon/ArduinoJson/releases/download/v6.11.0/ArduinoJson-v6.11.0.zip; } && unzip -q ArduinoJson-v6.11.0.zip
|
||||||
|
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
@ -145,8 +145,21 @@ function install_ide()
|
|||||||
local ide_path=$1
|
local ide_path=$1
|
||||||
local core_path=$2
|
local core_path=$2
|
||||||
local debug=$3
|
local debug=$3
|
||||||
test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
|
if [ "$MACOSX" = "1" ]; then
|
||||||
tar xf arduino.tar.xz
|
# MACOS only has next-to-obsolete Python2 installed. Install Python 3 from python.org
|
||||||
|
wget https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg
|
||||||
|
sudo installer -pkg python-3.7.4-macosx10.9.pkg -target /
|
||||||
|
# Install the Python3 certificates, because SSL connections fail w/o them and of course they aren't installed by default.
|
||||||
|
( cd "/Applications/Python 3.7/" && sudo "./Install Certificates.command" )
|
||||||
|
# Hack to place arduino-builder in the same spot as sane OSes
|
||||||
|
test -r arduino.zip || wget -O arduino.zip https://downloads.arduino.cc/arduino-nightly-macosx.zip
|
||||||
|
unzip -q arduino.zip
|
||||||
|
mv Arduino.app arduino-nightly
|
||||||
|
mv arduino-nightly/Contents/Java/* arduino-nightly/.
|
||||||
|
else
|
||||||
|
test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
|
||||||
|
tar xf arduino.tar.xz
|
||||||
|
fi
|
||||||
mv arduino-nightly $ide_path
|
mv arduino-nightly $ide_path
|
||||||
cd $ide_path/hardware
|
cd $ide_path/hardware
|
||||||
mkdir esp8266com
|
mkdir esp8266com
|
||||||
@ -174,7 +187,6 @@ function install_arduino()
|
|||||||
echo -e "travis_fold:start:sketch_test_env_prepare"
|
echo -e "travis_fold:start:sketch_test_env_prepare"
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR $debug
|
install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR $debug
|
||||||
which arduino
|
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
install_libraries
|
install_libraries
|
||||||
echo -e "travis_fold:end:sketch_test_env_prepare"
|
echo -e "travis_fold:end:sketch_test_env_prepare"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user