From 7c7fd1375ee54eaef463082726737c0c5aedb9b3 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Tue, 31 Dec 2019 11:16:05 -0800 Subject: [PATCH] Attempt to update ESP32 CI build process Manually implement the GH scripts that are now used in the ESP32 repo, overriding the shared method we used to use between the 8266 and 32. --- tests/common.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/common.sh b/tests/common.sh index 072b05e7..e53f0513 100755 --- a/tests/common.sh +++ b/tests/common.sh @@ -42,7 +42,7 @@ function build_sketches() local build_arg=$3 local build_dir=build.tmp mkdir -p $build_dir - local build_cmd="python $arduino/$BUILD_PY -p $PWD/$build_dir $build_arg " + local build_cmd="python3 $arduino/$BUILD_PY -p $PWD/$build_dir $build_arg " local sketches=$(find $srcpath -name *.ino) print_size_info >size.log export ARDUINO_IDE_PATH=$arduino @@ -92,7 +92,6 @@ function install_libraries() function install_ide() { local ide_path=$1 - local core_path=$2 wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz tar xf arduino.tar.xz mv arduino-nightly $ide_path @@ -103,7 +102,7 @@ function install_ide() pushd esp8266/tools git submodule init git submodule update - python get.py + python3 get.py export PATH="$ide_path:$ide_path/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin:$PATH" popd cd .. @@ -113,7 +112,7 @@ function install_ide() pushd esp32/tools git submodule init git submodule update - python get.py + python3 get.py export PATH="$ide_path:$ide_path/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin:$PATH" popd } @@ -160,9 +159,21 @@ if [ "$BUILD_TYPE" = "build" ]; then install_arduino build_sketches_with_arduino elif [ "$BUILD_TYPE" = "build_esp32" ]; then - export BUILD_PY="hardware/espressif/esp32/tools/build.py -b esp32 -v -k " + #export BUILD_PY="hardware/espressif/esp32/tools/build.py -b esp32 -v -k " + #install_arduino + #build_sketches_with_arduino + sudo apt-get update + sudo apt-get upgrade -y python + sudo pip install --upgrade pip + sudo pip install --upgrade 'urllib3[secure]' + export ide_path=$HOME/arduino_ide install_arduino - build_sketches_with_arduino + export FQBN="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app" + export GITHUB_WORKSPACE="$TRAVIS_BUILD_DIR" + export GITHUB_REPOSITORY="$TRAVIS_REPO_SLUG" + source $ide_path/hardware/espressif/esp32/.github/scripts/install-arduino-ide.sh + source $ide_path/hardware/espressif/esp32/.github/scripts/install-arduino-core-esp32.sh + build_sketches "$FQBN" "$HOME/Arduino/libraries" 0 1 elif [ "$BUILD_TYPE" = "host_tests" ]; then # Run host side tests cd $TRAVIS_BUILD_DIR/tests