mirror of
https://github.com/espressif/openthread.git
synced 2026-10-17 05:07:39 +00:00
Have .travis.yml point to scripts in the .travis directory. (#156)
This commit is contained in:
+20
-66
@@ -28,77 +28,31 @@
|
|||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
env:
|
sudo: required
|
||||||
- BUILD_TARGET="posix"
|
|
||||||
- BUILD_TARGET="cc2538"
|
|
||||||
|
|
||||||
compiler:
|
before_install:
|
||||||
- clang
|
- .travis/before_install.sh
|
||||||
- gcc
|
|
||||||
|
|
||||||
os:
|
script:
|
||||||
- linux
|
- .travis/script.sh
|
||||||
- osx
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: BUILD_TARGET="pretty-check"
|
- env: BUILD_TARGET="pretty-check"
|
||||||
compiler: clang
|
compiler: clang
|
||||||
os: linux
|
os: linux
|
||||||
exclude:
|
- env: BUILD_TARGET="posix"
|
||||||
- compiler: clang
|
compiler: clang
|
||||||
env: BUILD_TARGET="cc2538"
|
os: linux
|
||||||
- os: osx
|
- env: BUILD_TARGET="posix"
|
||||||
env: BUILD_TARGET="cc2538"
|
compiler: clang
|
||||||
|
os: osx
|
||||||
before_install:
|
- env: BUILD_TARGET="posix"
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install python-pexpect; fi
|
compiler: gcc
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo easy_install pexpect; fi
|
os: linux
|
||||||
|
- env: BUILD_TARGET="posix"
|
||||||
install:
|
compiler: gcc
|
||||||
- if [ "$BUILD_TARGET" == "pretty-check" ]; then
|
os: osx
|
||||||
pushd ~ &&
|
- env: BUILD_TARGET="cc2538"
|
||||||
wget https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz/download -O astyle.tar.gz &&
|
compiler: gcc
|
||||||
tar xzvf astyle.tar.gz &&
|
os: linux
|
||||||
pushd astyle/build/gcc && LDFLAGS=" " make &&
|
|
||||||
export PATH=$PWD/bin:$PATH &&
|
|
||||||
popd &&
|
|
||||||
popd &&
|
|
||||||
astyle --version ;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if [ "$BUILD_TARGET" == "cc2538" ] && [ "$TRAVIS_OS_NAME" == "linux" ] ; then
|
|
||||||
sudo apt-get install lib32z1 &&
|
|
||||||
pushd ~ &&
|
|
||||||
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 &&
|
|
||||||
tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 &&
|
|
||||||
export PATH=$PWD/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH &&
|
|
||||||
popd &&
|
|
||||||
arm-none-eabi-gcc --version ;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if [ "$BUILD_TARGET" == "cc2538" ] && [ "$TRAVIS_OS_NAME" == "osx" ] ; then
|
|
||||||
pushd ~ &&
|
|
||||||
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 &&
|
|
||||||
tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 &&
|
|
||||||
export PATH=$PWD/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH &&
|
|
||||||
popd &&
|
|
||||||
arm-none-eabi-gcc --version ;
|
|
||||||
fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- if [ "$BUILD_TARGET" == "pretty-check" ]; then
|
|
||||||
./bootstrap &&
|
|
||||||
./configure &&
|
|
||||||
make pretty-check ;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if [ "$BUILD_TARGET" == "posix" ]; then
|
|
||||||
./bootstrap &&
|
|
||||||
make -f Makefile-Standalone distcheck ;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if [ "$BUILD_TARGET" == "cc2538" ]; then
|
|
||||||
./bootstrap &&
|
|
||||||
make -f examples/cc2538/Makefile-cc2538 ;
|
|
||||||
fi
|
|
||||||
|
|||||||
Executable
+70
@@ -0,0 +1,70 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016, Nest Labs, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. Neither the name of the copyright holder nor the
|
||||||
|
# names of its contributors may be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo " *** ERROR: " $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd /tmp || die
|
||||||
|
|
||||||
|
[ $TRAVIS_OS_NAME != linux ] || {
|
||||||
|
sudo apt-get install python-pexpect || die
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != cc2538 ] || {
|
||||||
|
sudo apt-get install lib32z1 || die
|
||||||
|
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
|
||||||
|
tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
|
||||||
|
export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
|
||||||
|
arm-none-eabi-gcc --version || die
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $TRAVIS_OS_NAME != osx ] || {
|
||||||
|
sudo easy_install pexpect || die
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != cc2538 ] || {
|
||||||
|
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 || die
|
||||||
|
tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 || die
|
||||||
|
export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
|
||||||
|
arm-none-eabi-gcc --version || die
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != pretty-check ] || {
|
||||||
|
wget https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz/download -O astyle.tar.gz || die
|
||||||
|
tar xzvf astyle.tar.gz || die
|
||||||
|
cd astyle/build/gcc || die
|
||||||
|
LDFLAGS=" " make || die
|
||||||
|
cd ../../..
|
||||||
|
export PATH=/tmp/astyle/build/gcc/bin:$PATH || die
|
||||||
|
astyle --version || die
|
||||||
|
}
|
||||||
Executable
+52
@@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016, Nest Labs, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. Neither the name of the copyright holder nor the
|
||||||
|
# names of its contributors may be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo " *** ERROR: " $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
./bootstrap || die
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != pretty-check ] || {
|
||||||
|
export PATH=/tmp/astyle/build/gcc/bin:$PATH || die
|
||||||
|
./configure || die
|
||||||
|
make pretty || die
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != posix ] || {
|
||||||
|
make -f Makefile-Standalone distcheck || die
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != cc2538 ] || {
|
||||||
|
export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
|
||||||
|
make -f examples/cc2538/Makefile-cc2538 || die
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user