Skip to content

Commit 6e37ee3

Browse files
authored
fix CI: switch to python3 for pio (#7035)
1 parent 158039e commit 6e37ee3

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ jobs:
2424
- name: "Platformio (1)"
2525
stage: build
2626
script: $TRAVIS_BUILD_DIR/tests/platformio.sh
27+
install:
28+
- sudo apt-get install python3-pip python3-setuptools
2729
env:
2830
- BUILD_PARITY=even
2931
- name: "Platformio (2)"
3032
stage: build
3133
script: $TRAVIS_BUILD_DIR/tests/platformio.sh
34+
install:
35+
- sudo apt-get install python3-pip python3-setuptools
3236
env:
3337
- BUILD_PARITY=odd
3438

tests/platformio.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ source "$TRAVIS_BUILD_DIR"/tests/common.sh
66

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

1818
function build_sketches_with_platformio()

tests/run_CI_locally.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ EOF
8080
test -z "$BUILD_TYPE" || break
8181
done
8282

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

8784
git submodule update --init
8885

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

119116
elif [ "$BUILD_TYPE" = "platformio" ]; then
120-
tests/platformio-custom.sh
117+
tests/platformio.sh
121118
elif [ "$BUILD_TYPE" = "platformio_even" ]; then
122-
BUILD_PARITY=even tests/platformio-custom.sh
119+
BUILD_PARITY=even tests/platformio.sh
123120
elif [ "$BUILD_TYPE" = "platformio_odd" ]; then
124-
BUILD_PARITY=odd tests/platformio-custom.sh
121+
BUILD_PARITY=odd tests/platformio.sh
125122

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

0 commit comments

Comments
 (0)