-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
45 lines (45 loc) · 1.97 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
language: C
dist: trusty
sudo: required
env:
global:
- XC32_URL="http://ww1.microchip.com/downloads/en/DeviceDoc/xc32-v1.42-full-install-linux-installer.run"
- XC32_PATH="/opt/microchip/xc32/v1.42/bin"
- XC32_DL="$HOME/xc32.run"
- LMC_REPO="https://github.com/CreatorDev/LetMeCreate/"
- APP_NAME="letmecreateiot"
- CONTIKI="$HOME/contiki"
- CONTIKI_BRANCH="3.0-mikro-e"
- CONTIKI_REPO="https://github.com/CreatorDev/contiki.git"
matrix:
- METHOD="scripts"
- METHOD="build" DIRECTORY="examples"
- METHOD="build" DIRECTORY="tests"
before_install:
- if [[ "$METHOD" == "build" || "$METHOD" == "update" ]]; then
sudo dpkg --add-architecture i386 && sudo apt-get update
&& sudo apt-get install libc6:i386 && wget -O "$XC32_DL" "$XC32_URL"
&& chmod +x "$XC32_DL"
&& sudo "$XC32_DL" --mode unattended --netservername localhost
&& export PATH="$PATH:$XC32_PATH";
fi
- mkdir -p "$CONTIKI"
- git clone --branch="$CONTIKI_BRANCH" "$CONTIKI_REPO" "$CONTIKI/"
- cd "$CONTIKI" && git submodule init && git submodule update
install:
- mv "$TRAVIS_BUILD_DIR" "$CONTIKI/platform/mikro-e/apps/$APP_NAME"
- TRAVIS_BUILD_DIR="$CONTIKI/platform/mikro-e/apps/$APP_NAME"
script:
- if [[ "$METHOD" == "build" ]]; then
"$TRAVIS_BUILD_DIR/.travis/build_apps.sh" "$TRAVIS_BUILD_DIR/$DIRECTORY";
fi
- if [[ "$METHOD" == "scripts" ]]; then
"$TRAVIS_BUILD_DIR/.travis/compile_python_scripts.sh" &&
"$TRAVIS_BUILD_DIR/.travis/check_clicks_header.sh" &&
"$TRAVIS_BUILD_DIR/.travis/check_core_header.sh" &&
mkdir -p "$TRAVIS_BUILD_DIR"/lmc &&
cd "$TRAVIS_BUILD_DIR/lmc" &&
git clone "$LMC_REPO" . &&
git checkout $(cat "$TRAVIS_BUILD_DIR/feeds/feed") &&
"$TRAVIS_BUILD_DIR/feeds/scripts/clean_feeds.sh" ./;
fi