forked from GoogleCloudPlatform/iot-device-sdk-embedded-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (104 loc) · 3.42 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
sudo: false
language: c
compiler:
- clang
- gcc
env:
global:
- IOTC_BSP_TLS=mbedtls
- IOTC_MAKETARGET=tests
matrix:
- PRESET=ARM_REL
IOTC_MAKETARGET="utests"
- PRESET=ARM_REL_MIN
IOTC_MAKETARGET="utests"
- PRESET=POSIX_DEV
- PRESET=POSIX_DEV_MIN
- PRESET=POSIX_REL
- PRESET=POSIX_REL_MIN
- PRESET=FREERTOS_POSIX_DEV
BEFORE_SCRIPT_ACTION="make PRESET=FREERTOS_POSIX_REL prereqs"
- PRESET=FREERTOS_POSIX_REL
BEFORE_SCRIPT_ACTION="make PRESET=FREERTOS_POSIX_REL prereqs"
# WOLFSSL Tests
- PRESET=POSIX_DEV
IOTC_BSP_TLS=wolfssl
IOTC_BSP_CRYPTO=wolfssl
- PRESET=POSIX_REL
IOTC_BSP_TLS=wolfssl
IOTC_BSP_CRYPTO=wolfssl
- PRESET=POSIX_THREADING_REL
# - PRESET=POSIX_UNSECURE_REL
# IOTC_BSP_TLS=""
- TESTS=fuzztests
PRESET=FUZZ_TESTS
IOTC_BSP_TLS=""
IOTC_MAKETARGET="fuzz_tests"
CXX=clang++
# - PRESET=ZEPHYR
# IOTC_MAKETARGET=""
cache:
apt
addons:
apt:
sources:
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
packages:
- clang-3.8
- qemu-system
- libc6:i386
- libc6-dev-i386
- gcc-multilib
- linux-libc-dev:i386
- expect
- device-tree-compiler
- gperf
- dfu-util
- xz-utils
- python3-pip
matrix:
exclude:
- compiler: clang
env: PRESET=ARM_REL_MIN IOTC_MAKETARGET="utests"
- compiler: clang
env: PRESET=ARM_REL IOTC_MAKETARGET="utests"
- compiler: gcc
env: TESTS=fuzztests PRESET=FUZZ_TESTS IOTC_BSP_TLS="" IOTC_MAKETARGET="fuzz_tests" CXX=clang++
- compiler: gcc
env: PRESET=POSIX_DEV IOTC_BSP_TLS=wolfssl
- compiler: gcc
env: PRESET=POSIX_REL IOTC_BSP_TLS=wolfssl
before_script:
# https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace_Protection
- "if [[ ! $TESTS == 'fuzztests' ]]; then
if [[ $CC == *'clang'* ]]; then export CC='clang-3.8'; fi;
else
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope;
fi"
- "if [[ $IOTC_BSP_TLS == 'wolfssl' ]]; then
git clone -b v3.15.3-stable https://github.com/wolfSSL/wolfssl $HOME/build/GoogleCloudPlatform/iot-device-sdk-embedded-c/third_party/tls/wolfssl;
fi;"
- "$BEFORE_SCRIPT_ACTION"
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
fi
script:
- "set -e"
- "cd $HOME/build/GoogleCloudPlatform/iot-device-sdk-embedded-c"
- "if [[ $IOTC_BSP_TLS == 'wolfssl' ]]; then
expect res/travis/travis_build_wolfssl.expect make PRESET=$PRESET IOTC_DEBUG_OUTPUT=0 $IOTC_MAKETARGET;
else
expect res/travis/travis_build_mbedtls.expect make PRESET=$PRESET IOTC_DEBUG_OUTPUT=0 $IOTC_MAKETARGET;
fi;"
- "if [[ ! $CC == 'gcc' && ! $TESTS == 'fuzztests' ]]; then
if [[ $PRESET == 'FREERTOS_POSIX_REL' || $PRESET == 'FREERTOS_POSIX_DEV' ]]; then
make -C examples/freertos_linux/Linux_gcc_gcp_iot IOTC_CLIENT_LIB_PATH=../../../bin/freertos-linux IOTC_BSP_TLS=$IOTC_BSP_TLS;
elif [[ $PRESET == 'ZEPHYR' ]]; then
make -C examples/zephyr_native_posix/build VERBOSE=1;
else
make -C examples/iot_core_mqtt_client IOTC_CLIENT_LIB_PATH=../../bin/linux IOTC_BSP_TLS=$IOTC_BSP_TLS;
fi;
fi;"