From a19c32bba3caea1940d3acf8c994f610bff2b128 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 2 Oct 2019 10:47:32 +0300 Subject: [PATCH] Simpler pio install --- ...tformio-esp32.sh => install-platformio.sh} | 25 ++----------------- .github/scripts/on-push.sh | 3 ++- 2 files changed, 4 insertions(+), 24 deletions(-) rename .github/scripts/{install-platformio-esp32.sh => install-platformio.sh} (75%) diff --git a/.github/scripts/install-platformio-esp32.sh b/.github/scripts/install-platformio.sh similarity index 75% rename from .github/scripts/install-platformio-esp32.sh rename to .github/scripts/install-platformio.sh index f7f59c7..eb22a74 100644 --- a/.github/scripts/install-platformio-esp32.sh +++ b/.github/scripts/install-platformio.sh @@ -1,33 +1,12 @@ #!/bin/bash -export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32" - echo "Installing Python Wheel ..." pip install wheel > /dev/null 2>&1 echo "Installing PlatformIO ..." -pip install -U https://github.com/platformio/platformio/archive/develop.zip > /dev/null 2>&1 +pip install -U platformio > /dev/null 2>&1 -echo "Installing Platform ESP32 ..." -python -m platformio platform install https://github.com/platformio/platform-espressif32.git#feature/stage > /dev/null 2>&1 - -echo "Replacing the framework version ..." -if [[ "$OSTYPE" == "darwin"* ]]; then - sed 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json" > "platform.json" - mv -f "platform.json" "$HOME/.platformio/platforms/espressif32/platform.json" -else - sed -i 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json" -fi - -if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then - echo "Linking Core ..." - ln -s $GITHUB_WORKSPACE "$PLATFORMIO_ESP32_PATH" -else - echo "Cloning Core Repository ..." - git clone https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1 -fi - -echo "PlatformIO for ESP32 has been installed" +echo "PlatformIO has been installed" echo "" diff --git a/.github/scripts/on-push.sh b/.github/scripts/on-push.sh index 76bd20f..96fff57 100755 --- a/.github/scripts/on-push.sh +++ b/.github/scripts/on-push.sh @@ -51,7 +51,8 @@ if [ "$BUILD_PIO" -eq 0 ]; then build_sketches "$FQBN" "$GITHUB_WORKSPACE/examples" "$CHUNK_INDEX" "$CHUNKS_CNT" else # PlatformIO Test - source ./.github/scripts/install-platformio-esp32.sh + source ./.github/scripts/install-platformio.sh + python -m platformio lib --storage-dir "$GITHUB_WORKSPACE" install echo "Installing ArduinoJson ..." python -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git > /dev/null 2>&1