Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split PIO job into even and odd builds #5405

Merged
merged 1 commit into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 17 additions & 2 deletions tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down