-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
29 lines (28 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
sudo: false
language: cpp
os:
- linux
env:
matrix:
- SDK_VERSION=1.3.0
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export SDK_FILE_NAME="esp-rtos-sdk-v${SDK_VERSION}-linux-x86_64.tar.bz2"; fi
- mkdir -p $TRAVIS_BUILD_DIR/opt/esp-rtos-sdk
- wget https://bintray.com/artifact/download/raburton/generic/temp/${SDK_FILE_NAME}
- tar -C $TRAVIS_BUILD_DIR/opt/esp-rtos-sdk -xf ${SDK_FILE_NAME}
script:
- export SMING_HOME=$TRAVIS_BUILD_DIR/sming
- export ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-rtos-sdk
- export PATH=$PATH:$TRAVIS_BUILD_DIR/opt/esp-rtos-sdk/utils/
- export SDK_BASE=$TRAVIS_BUILD_DIR/opt/esp-rtos-sdk/sdk
- export CHANGED_FILES=`git diff --diff-filter=AMD HEAD HEAD^ --name-only`
- export CHANGED_PROJECTS=`for i in $CHANGED_FILES; do echo "$i" | grep '^samples/' | cut -d'/' -f2; done | uniq`
- cd $SMING_HOME
- make test
- make clean
- export ENABLE_GDB=1
- make test
- cd $SMING_HOME/../
- export SMING_HAS_CHANGED=`for i in $CHANGED_FILES; do if [[ $i == sming/* ]]; then echo 1; break; fi; done`
- if [ ! -z "$SMING_HAS_CHANGED" ]; then CHANGED_PROJECTS=`cd $SMING_HOME/../samples; ls -d *`; fi
- for i in $CHANGED_PROJECTS; do echo "Compiling $i"; make -C "samples/$i"; if [ $? -ne 0 ]; then exit 1; fi; done