forked from awslabs/amazon-kinesis-video-streams-producer-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
176 lines (157 loc) · 5.78 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
language: cpp
sudo: true
branches:
only:
- master
cache:
- directories:
- $HOME/.cache
addons:
apt:
packages:
- gdb
script:
- export AWS_KVS_LOG_LEVEL=3
- make
- ulimit -c unlimited -S
- timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure
after_failure:
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/tst/producer_test core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
matrix:
# MemorySanitizer and UndefinedBehaviorSanitizer are still WIP
allow_failures:
- env: allowTestFail=true
include:
#clang check
- name: "clang-format Check"
os: linux
compiler: clang
before_script:
- sudo apt-get -q update
- sudo apt-get -y install clang-format
- mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE
script:
- cd ..
- bash scripts/check-clang.sh
# MacOS Builds
- name: "OSX GCC"
os: osx
compiler: gcc
before_script:
- mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE
script:
- make
- ./tst/producer_test --gtest_break_on_failure
after_failure: skip # timeout not available on MacOS
- name: "OSX Clang"
os: osx
compiler: clang
before_script:
- mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
script:
- make
- ./tst/producer_test --gtest_break_on_failure
after_failure: skip # timeout not available on MacOS
# Code Coverage
- name: "Linux GCC Code Coverage"
os: linux
compiler: gcc
before_script:
- mkdir build && cd build && cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE
after_success:
- for test_file in $(find cproducer.dir kvsCommonCurl.dir kvsCommonLws.dir -name '*.gcno'); do gcov $test_file; done
- bash <(curl -s https://codecov.io/bash)
# AddressSanitizer
- name: "Linux Clang AddressSanitizer"
os: linux
compiler: clang
# env: ASAN_OPTIONS=detect_odr_violation=0:detect_leaks=1
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE
# UndefinedBehaviorSanitizer
- name: "Linux Clang UndefinedBehaviorSanitizer"
os: linux
compiler: clang
# env: UBSAN_OPTIONS=halt_on_error=1
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE
# MemorySanitizer
- name: "Linux Clang MemorySanitizer"
os: linux
compiler: clang
env: allowTestFail=true
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE
# ThreadSanitizer
- name: "Linux Clang ThreadSanitizer"
os: linux
compiler: clang
env: allowTestFail=true
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE
# Old Version GCC 4.4
- name: "Linux GCC 4.4 Build"
os: linux
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
- sudo apt-get -y install gcc-4.4
- sudo apt-get -y install gdb
compiler: gcc
before_script: export CC=gcc-4.4 && mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE
# Cross-compilation to ARM, no tests are run
- name: "ARM Cross-compilation"
os: linux
addons:
apt:
packages:
- gcc-arm-linux-gnueabi
- g++-arm-linux-gnueabi
- binutils-arm-linux-gnueabi
compiler: gcc
before_script:
- export CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ AR=arm-linux-gnueabi-ar
- mkdir build && cd build
- cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32
script: make
- name: "Windows MSVC"
os: windows
script:
- choco install nasm strawberryperl
- unset CC CC_FOR_BUILD CXX CXX_FOR_BUILD # We want to use MSVC
- export "PATH=/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Strawberry/c/bin:/c/Program Files/NASM:`pwd`/open-source/lib:`pwd`/open-source/bin:$PATH"
- .github/build_windows.bat
- cd build/tst && ./producer_test.exe --gtest_break_on_failure
# Generate Doxygen
- name: "Generate Doxygen"
if: type = push
env: allowTestFail=true
before_install:
- docker run -w /src/.github -dit --name alpine -v $(pwd):/src alpine
- alpine() { docker exec -it alpine "$@"; }
- alpine apk update
- alpine apk add doxygen graphviz
- alpine apk add --no-cache ttf-freefont
script:
# Add SSH key to agent
- |
eval "$(ssh-agent -s)"
openssl aes-256-cbc -K $encrypted_1858eb369f49_key -iv $encrypted_1858eb369f49_iv -in github_deploy_key.enc -out ~\/.ssh/travis_prodc/github_deploy_key -d
chmod 600 .github/github_deploy_key
ssh-add .github/github_deploy_key
rm .github/github_deploy_key
# Generate doxygen in container, need latest version
- alpine doxygen Doxyfile
- alpine chmod -R 777 doc
- mv .github/doc/html /tmp
# Unshallow repo
- |
git remote rm origin
git remote add origin [email protected]:awslabs/awslabs/amazon-kinesis-video-streams-producer-c.git
git fetch
# Move to gh-pages and create new commit
- |
git checkout gh-pages
rm -rf * .github
mv /tmp/html/* .
# Commit and push
- |
git add .
git commit -m "Auto-generated from travis"
git push