1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Split PIO job into even and odd builds (#5405)

PIO is taking 27+ minutes now, very close to the runtime limit.

Split into even and odd, just like standard Arduino.  Each PIO job
takes ~14-15 minutes and can go in parallel.
This commit is contained in:
Earle F. Philhower, III 2018-11-30 15:56:29 -08:00 committed by GitHub
parent 7f7e658d66
commit c1297cc8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 3 deletions

View File

@ -17,7 +17,9 @@ matrix:
- env:
- BUILD_TYPE=debug_odd
- env:
- BUILD_TYPE=platformio
- BUILD_TYPE=platformio_even
- env:
- BUILD_TYPE=platformio_odd
- env:
- BUILD_TYPE=docs
- env:

View File

@ -173,8 +173,15 @@ function build_sketches_with_platformio()
set +e
local srcpath=$1
local build_arg=$2
local sketches=$(find $srcpath -name *.ino)
local build_mod=$3
local build_rem=$4
local sketches=$(find $srcpath -name *.ino | sort)
local testcnt=0
for sketch in $sketches; do
testcnt=$(( ($testcnt + 1) % $build_mod ))
if [ $testcnt -ne $build_rem ]; then
continue # Not ours to do
fi
local sketchdir=$(dirname $sketch)
local sketchdirname=$(basename $sketchdir)
local sketchname=$(basename $sketch)
@ -274,7 +281,15 @@ elif [ "$BUILD_TYPE" = "debug_odd" ]; then
elif [ "$BUILD_TYPE" = "platformio" ]; then
# PlatformIO
install_platformio
build_sketches_with_platformio $TRAVIS_BUILD_DIR/libraries "--board nodemcuv2 --verbose"
build_sketches_with_platformio $TRAVIS_BUILD_DIR/libraries "--board nodemcuv2 --verbose" 1 0
elif [ "$BUILD_TYPE" = "platformio_even" ]; then
# PlatformIO
install_platformio
build_sketches_with_platformio $TRAVIS_BUILD_DIR/libraries "--board nodemcuv2 --verbose" 2 0
elif [ "$BUILD_TYPE" = "platformio_odd" ]; then
# PlatformIO
install_platformio
build_sketches_with_platformio $TRAVIS_BUILD_DIR/libraries "--board nodemcuv2 --verbose" 2 1
elif [ "$BUILD_TYPE" = "docs" ]; then
# Build documentation using Sphinx
cd $TRAVIS_BUILD_DIR/doc