forked from mosra/corrade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.yml
197 lines (188 loc) · 7.68 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
addons:
apt:
packages:
- g++-4.8
- ninja-build
matrix:
# The commented-out jobs are currently handled on Circle CI
include:
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- CONFIGURATION=Debug
#addons:
#apt:
#packages:
#- g++-4.8
#- ninja-build
#- lcov
#- language: cpp
#os: linux
#compiler: gcc
#dist: xenial
#env:
#- JOBID=linux-nondeprecated
#- TARGET=desktop
#- BUILD_DEPRECATED=OFF
#- CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT"
#- CONFIGURATION=Release
#- language: cpp
#os: linux
#compiler: gcc
#dist: xenial
#env:
#- JOBID=linux-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
#- language: cpp
#os: linux
#compiler: clang
#dist: xenial
#env:
#- JOBID=linux-sanitizers
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS="-fsanitize=address"
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- ninja-build
#- clang-3.8
#- language: cpp
#os: linux
#compiler: clang
#dist: xenial
#env:
#- JOBID=linux-threadsanitizer
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS="-fsanitize=thread"
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- ninja-build
#- clang-3.8
#- language: cpp
#os: osx
#compiler: clang
#env:
#- JOBID=macos
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- CONFIGURATION=Debug
#- language: cpp
#os: osx
#compiler: clang
#env:
#- JOBID=macos-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
- language: cpp
os: osx
osx_image: xcode7.3
env:
- JOBID=ios
- TARGET=ios-simulator
#- language: generic
#os: ubuntu
#services:
#- docker
#env:
#- JOBID=emscripten
#- TARGET=emscripten
#- EMSCRIPTEN_VERSION=1.39.1-upstream
#before_install:
#- docker pull emscripten/emsdk:${EMSCRIPTEN_VERSION}
#- docker ps -a
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android
- TARGET=android
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
# python preprocessor for magnum-singles, for a lack of better name
#- language: python
#python: 3.6
#env:
#- TARGET=acme
#- JOBID=acme
#addons:
#apt:
#packages: #none
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3
on_success: change
on_failure: always
on_start: never
cache:
directories:
- $HOME/cmake
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ] && [ ! "$TARGET" == "android" ]; then export CXX=g++-4.8; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-sanitizers" ]; then export CXX=clang++-3.8; fi
- if [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi
- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi
# so the directory tests pass (and then some workaround for crazy filesystem issues)
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then mkdir -p ~/.config/autostart; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then mkdir -p ~/.local; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi
# Download CMake 3.4.3 to ensure we're still compatible with it (Travis has
# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's
# separate (bit me two times already). Android needs CMake 3.7, but
# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so
# grab that.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.4.3-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.2-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.9.2-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi
# for python preprocessor for magnum-singles, for a lack of better name
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then pip install coverage codecov; fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/unix-desktop.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/unix-desktop.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi
- if [ "$TARGET" == "emscripten" ]; then docker run -v $TRAVIS_BUILD_DIR:/github -w /github -t emscripten/emsdk:${EMSCRIPTEN_VERSION} /bin/bash -c "apt update && apt install -y ninja-build && ./package/ci/emscripten.sh"; fi
# Travis somehow is not able to gather all output, try to force it using this
- sync
# python preprocessor for magnum-singles, for a lack of better name
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then cd $TRAVIS_BUILD_DIR/src/acme && coverage run -m unittest; fi
after_success:
# Keep in sync with PKBUILD-coverage and appveyor-lcov.sh, please
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Corrade/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/Corrade/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.info; fi
# python preprocessor for magnum-singles, for a lack of better name
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then cd $TRAVIS_BUILD_DIR/src/acme && codecov; fi