You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/10/03 12:45:22 UTC

[GitHub] utzig closed pull request #1440: [DO NOT MERGE] Travis integration testing

utzig closed pull request #1440: [DO NOT MERGE] Travis integration testing
URL: https://github.com/apache/mynewt-core/pull/1440
 
 
   

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 da0e3eb9e6..9c42115fb5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,27 +30,59 @@ go:
 
 matrix:
   include:
+    # newt build <targets>
     - os: linux
       env:
         - TEST=BUILD_TARGETS
+        - TARGET_SET=1
     - os: linux
       env:
-        - TEST=BUILD_BLINKY
+        - TEST=BUILD_TARGETS
+        - TARGET_SET=2
     - os: linux
-      addons: *addon_conf
       env:
-        - TEST=TEST_ALL
-    - os: osx
-      osx_image: xcode9.2
+        - TEST=BUILD_TARGETS
+        - TARGET_SET=3
+    - os: linux
       env:
         - TEST=BUILD_TARGETS
-    - os: osx
-      osx_image: xcode9.2
+        - 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
+      addons: *addon_conf
+      env:
+        - TEST=TEST_ALL
+    #- os: osx
+    #  osx_image: xcode9.2
+    #  env:
+    #    - TEST=BUILD_TARGETS
+    #- os: osx
+    #  osx_image: xcode9.2
+    #  env:
+    #    - TEST=BUILD_BLINKY
     - os: osx
       osx_image: xcode9.2
       env:
+        # FIXME: only tests 1/4 of all available
         - TEST=TEST_ALL
 
 install:
@@ -58,19 +90,54 @@ 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
                        native"
@@ -79,3 +146,4 @@ script:
 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:
users@infra.apache.org


With regards,
Apache Git Services