utzig closed pull request #1421: [DO NOT MERGE] Travis integration testing URL: https://github.com/apache/mynewt-core/pull/1421
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.travis.yml b/.travis.yml index add5dbe1c0..dd698a7cf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,42 +17,65 @@ language: go -_addons: &addon_conf - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-multilib - - gcc-7-multilib - go: - "1.10" matrix: include: + # newt build <targets> - os: linux - addons: *addon_conf - env: + env: - TEST=BUILD_TARGETS + - TARGET_SET=1 - os: linux - addons: *addon_conf - env: - - TEST=BUILD_BLINKY + env: + - TEST=BUILD_TARGETS + - TARGET_SET=2 - os: linux - addons: *addon_conf - env: - - TEST=TEST_ALL - - os: osx - osx_image: xcode9.2 - env: + env: - TEST=BUILD_TARGETS - - os: osx - osx_image: xcode9.2 - env: + - TARGET_SET=3 + - os: linux + env: + - TEST=BUILD_TARGETS + - TARGET_SET=4 + + # newt build <blinky-for-BSP> + - os: linux + env: - TEST=BUILD_BLINKY + - TARGET_SET=1 + - os: linux + env: + - TEST=BUILD_BLINKY + - TARGET_SET=2 + - os: linux + env: + - TEST=BUILD_BLINKY + - TARGET_SET=3 + - os: linux + env: + - TEST=BUILD_BLINKY + - TARGET_SET=4 + + # newt test all (Linux) + - os: linux + # `newt test` runs on the sim which requires 32-bit build support + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-7-multilib + - linux-libc-dev:i386 + env: + - TEST=TEST_ALL + + # newt test all (OSX) - os: osx osx_image: xcode9.2 - env: + env: + # FIXME: only tests 1/4 of all available - TEST=TEST_ALL install: @@ -60,23 +83,60 @@ install: - export GOPATH=$HOME/gopath - go version -- git clone https://github.com/runtimeco/mynewt-travis-ci $HOME/ci +- git clone -b testing https://github.com/utzig/mynewt-travis-ci $HOME/ci - chmod +x $HOME/ci/*.sh - $HOME/ci/${TRAVIS_OS_NAME}_travis_install.sh - newt version - gcc --version -- arm-none-eabi-gcc --version +- [[ ${TEST} != "TEST_ALL" ]] && arm-none-eabi-gcc --version script: - cp -R $HOME/ci/mynewt-core-project.yml project.yml - cp -R $HOME/ci/mynewt-core-targets targets + + # Break the targets into different sets to distribute work among containers + # The total sets must match the amount specified in the matrix +- TOTAL_SETS=4 +- set_size=$(echo "$(ls targets/mynewt-core-targets | wc -l) / ${TOTAL_SETS} + 1" | bc) +- set=0; off=1; sets=() +- | + while [[ $set -lt $TOTAL_SETS ]]; do + sets[$set]=$(ls targets/mynewt-core-targets | tail -n +$off | head -n $set_size); + set=$((set + 1)); + off=$((off + set_size)); + done +- export TARGET_SET1=${sets[0]} +- export TARGET_SET2=${sets[1]} +- export TARGET_SET3=${sets[2]} +- export TARGET_SET4=${sets[3]} + + # Break the BSPs into different sets to distribute work among containers + # The total sets must match the amount specified in the matrix +- set_size=$(echo "$(ls ${TRAVIS_BUILD_DIR}/hw/bsp | wc -l) / ${TOTAL_SETS} + 1" | bc) +- set=0; off=1; sets=() +- | + while [[ $set -lt $TOTAL_SETS ]]; do + sets[$set]=$(ls ${TRAVIS_BUILD_DIR}/hw/bsp | tail -n +$off | head -n $set_size); + set=$((set + 1)); + off=$((off + set_size)); + done +- export BLINKY_SET1=${sets[0]} +- export BLINKY_SET2=${sets[1]} +- export BLINKY_SET3=${sets[2]} +- export BLINKY_SET4=${sets[3]} + - newt install + # the following list of targets are known to fail building blinky, or + # might have extra dependencies hard to provide, non-common toolchains, etc + # NOTE: "native" is here to avoid having to install gcc-multilib - export IGNORED_BSPS="ci40 embarc_emsk hifive1 native-armv7 native-mips - pic32mx470_6lp_clicker pic32mz2048_wi-fire sensorhub" + pic32mx470_6lp_clicker pic32mz2048_wi-fire sensorhub + native" - $HOME/ci/run_test.sh cache: directories: - $HOME/TOOLCHAIN + - $HOME/Library/Caches/Homebrew ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services