1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Properly replace toolchain in PlatformIO CI script (#7580)

This commit is contained in:
Valerii Koval 2020-09-04 18:15:02 +03:00 committed by GitHub
parent e636a6587c
commit 22a197eea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,10 +10,8 @@ function install_platformio()
platformio platform install "https://github.com/platformio/platform-espressif8266.git" platformio platform install "https://github.com/platformio/platform-espressif8266.git"
# Overwrite toolchain with this PR's toolset. Probably better way to do this # Overwrite toolchain with this PR's toolset. Probably better way to do this
( cd $TRAVIS_BUILD_DIR/tools && python3 get.py -q ) ( cd $TRAVIS_BUILD_DIR/tools && python3 get.py -q )
mv ~/.platformio/packages/toolchain-xtensa/package.json .save mv $TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf ~/.platformio/packages/toolchain-xtensa-latest
rm -rf ~/.platformio/packages/toolchain-xtensa mv ~/.platformio/packages/toolchain-xtensa/package.json ~/.platformio/packages/toolchain-xtensa/.piopm ~/.platformio/packages/toolchain-xtensa-latest/
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'] = '*'; del data['packages']['framework-arduinoespressif8266']['owner'];fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" 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'] = '*'; del data['packages']['framework-arduinoespressif8266']['owner'];fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266 ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266
# Install dependencies: # Install dependencies: