Skip to content

Commit

Permalink
fix CI: switch to python3 for pio (#7035)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v committed Jan 25, 2020
1 parent 158039e commit 6e37ee3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ jobs:
- name: "Platformio (1)"
stage: build
script: $TRAVIS_BUILD_DIR/tests/platformio.sh
install:
- sudo apt-get install python3-pip python3-setuptools
env:
- BUILD_PARITY=even
- name: "Platformio (2)"
stage: build
script: $TRAVIS_BUILD_DIR/tests/platformio.sh
install:
- sudo apt-get install python3-pip python3-setuptools
env:
- BUILD_PARITY=odd

Expand Down
6 changes: 3 additions & 3 deletions tests/platformio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ source "$TRAVIS_BUILD_DIR"/tests/common.sh

function install_platformio()
{
pip install --user -U https://github.com/platformio/platformio/archive/develop.zip
pip3 install --user -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install "https://github.com/platformio/platform-espressif8266.git#feature/stage"
sed -i 's/https:\/\/github\.com\/esp8266\/Arduino\.git/*/' ~/.platformio/platforms/espressif8266/platform.json
ln -s $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266
ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266
# Install dependencies:
# - esp8266/examples/ConfigFile
pio lib install "ArduinoJson@^6.11.0"
pio lib --global install "ArduinoJson@^6.11.0"
}

function build_sketches_with_platformio()
Expand Down
9 changes: 3 additions & 6 deletions tests/run_CI_locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ EOF
test -z "$BUILD_TYPE" || break
done

# use pip2 for python2 with python3 is around, platformio doesn't like it
cp tests/platformio.sh tests/platformio-custom.sh
sed -i 's,pip ,pip2 ,g' tests/platformio-custom.sh

git submodule update --init

Expand Down Expand Up @@ -117,11 +114,11 @@ elif [ "$BUILD_TYPE" = "build1_odd" ]; then
BUILD_PARITY=odd tests/build1.sh

elif [ "$BUILD_TYPE" = "platformio" ]; then
tests/platformio-custom.sh
tests/platformio.sh
elif [ "$BUILD_TYPE" = "platformio_even" ]; then
BUILD_PARITY=even tests/platformio-custom.sh
BUILD_PARITY=even tests/platformio.sh
elif [ "$BUILD_TYPE" = "platformio_odd" ]; then
BUILD_PARITY=odd tests/platformio-custom.sh
BUILD_PARITY=odd tests/platformio.sh

elif [ "$BUILD_TYPE" = host ]; then
tests/ci/host_test.sh
Expand Down

0 comments on commit 6e37ee3

Please sign in to comment.