Skip to content

Commit

Permalink
Remove PIO toolchain patch kludge
Browse files Browse the repository at this point in the history
  • Loading branch information
earlephilhower committed Aug 16, 2020
1 parent dcb0244 commit ff22a6a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/platformio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
cache_dir=$(mktemp -d)

source "$TRAVIS_BUILD_DIR"/tests/common.sh
set -ex

function install_platformio()
{
pip3 install --user -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install "https://github.com/platformio/platform-espressif8266.git"
# Overwrite toolchain with this PR's toolset. Probably better way to do this
( cd $TRAVIS_BUILD_DIR/tools && python3 get.py -q )
mv ~/.platformio/packages/toolchain-xtensa/package.json .save
rm -rf ~/.platformio/packages/toolchain-xtensa
mv $TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf ~/.platformio/packages/toolchain-xtensa
mv .save ~/.platformio/packages/toolchain-xtensa/package.json
python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif8266/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif8266']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
# Note that PIO ignores the requested toolchain. The code below attempted to patch in
# the current Arduino version, but due to recent PIO changes it no longer succeeds.
# Dropping it for now, leaving PIO to pick up whatever toolchain it feels like.
# # Overwrite toolchain with this PR's toolset. Probably better way to do this
# ( cd $TRAVIS_BUILD_DIR/tools && python3 get.py -q )
# mv ~/.platformio/packages/toolchain-xtensa/package.json .save
# rm -rf ~/.platformio/packages/toolchain-xtensa
# mv $TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf ~/.platformio/packages/toolchain-xtensa
# mv .save ~/.platformio/packages/toolchain-xtensa/package.json
# python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif8266/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif8266']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266
# Install dependencies:
# - esp8266/examples/ConfigFile
Expand Down

0 comments on commit ff22a6a

Please sign in to comment.