File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ matrix:
1717 - env :
1818 - BUILD_TYPE=debug_odd
1919 - env :
20- - BUILD_TYPE=platformio
20+ - BUILD_TYPE=platformio_even
21+ - env :
22+ - BUILD_TYPE=platformio_odd
2123 - env :
2224 - BUILD_TYPE=docs
2325 - env :
Original file line number Diff line number Diff line change @@ -173,8 +173,15 @@ function build_sketches_with_platformio()
173173 set +e
174174 local srcpath=$1
175175 local build_arg=$2
176- local sketches=$( find $srcpath -name * .ino)
176+ local build_mod=$3
177+ local build_rem=$4
178+ local sketches=$( find $srcpath -name * .ino | sort)
179+ local testcnt=0
177180 for sketch in $sketches ; do
181+ testcnt=$(( ($testcnt + 1 ) % $build_mod ))
182+ if [ $testcnt -ne $build_rem ]; then
183+ continue # Not ours to do
184+ fi
178185 local sketchdir=$( dirname $sketch )
179186 local sketchdirname=$( basename $sketchdir )
180187 local sketchname=$( basename $sketch )
@@ -274,7 +281,15 @@ elif [ "$BUILD_TYPE" = "debug_odd" ]; then
274281elif [ " $BUILD_TYPE " = " platformio" ]; then
275282 # PlatformIO
276283 install_platformio
277- build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose"
284+ build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 1 0
285+ elif [ " $BUILD_TYPE " = " platformio_even" ]; then
286+ # PlatformIO
287+ install_platformio
288+ build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 2 0
289+ elif [ " $BUILD_TYPE " = " platformio_odd" ]; then
290+ # PlatformIO
291+ install_platformio
292+ build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 2 1
278293elif [ " $BUILD_TYPE " = " docs" ]; then
279294 # Build documentation using Sphinx
280295 cd $TRAVIS_BUILD_DIR /doc
You can’t perform that action at this time.
0 commit comments