forked from luncliff/coroutine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
executable file
·192 lines (174 loc) · 4.69 KB
/
.travis.yml
File metadata and controls
executable file
·192 lines (174 loc) · 4.69 KB
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
#
# Author
# - luncliff@gmail.com
#
sudo: false
git:
submodules: true
depth: 5
notifications:
email:
- luncliff@gmail.com
language: cpp
compiler: clang # expect 5.0+, recommend 6.0
addons:
homebrew:
packages:
- ninja
- tree
- cmake
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-6.0
# - llvm-toolchain-xenial-7 # already installed
packages:
- g++-7
- g++-8
- clang-6.0
- llvm-6.0-tools
- libc++-dev
- libc++abi-dev
- unzip
- ninja-build
- tree
- cmake
install:
- echo ${TRAVIS_OS_NAME};
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then
sudo bash ./scripts/install-compilers.sh;
sudo bash ./scripts/install-cmake-3.14.sh;
sudo bash ./scripts/install-libc++8.sh;
sudo rm -rf prebuilt libcxx* llvm*;
sudo rm -rf cmake-3.14*;
fi
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
brew info llvm;
fi
script:
- mkdir -p build && cd build;
# perform build / install
- cmake ../
-G "Ninja"
-DBUILD_SHARED_LIBS=${SHARED}
-DCMAKE_BUILD_TYPE=${CONFIG}
-DCMAKE_INSTALL_PREFIX=../install
-DCMAKE_CXX_COMPILER=${CXX}
${EXT_ARGS}
- ninja install;
# perform tests
- ./test/coroutine_test [primitive];
- ./test/coroutine_test [return];
- ./test/coroutine_test [thread];
- ./test/coroutine_test [channel];
- ./test/coroutine_test [generic];
- ./test/coroutine_test [network];
- ./test/coroutine_test [event];
after_success:
- cd ${TRAVIS_BUILD_DIR}
- tree ./install
matrix:
allow_failures:
- os: windows
include:
- name: Mac Debug
os: osx
osx_image: xcode10.2
env:
- CONFIG=Debug SHARED=true
- name: Mac Release
os: osx
osx_image: xcode10.2
env:
- CONFIG=Release SHARED=true
- name: Ubuntu(Xenial) Debug
os: linux
dist: xenial
env:
- CONFIG=Debug SHARED=true
- name: Ubuntu(Xenial) Release
os: linux
dist: xenial
env:
- CONFIG=Release SHARED=true
- name: iPhone OS
os: osx
osx_image: xcode10.1
compiler: clang
script:
- mkdir -p build && cd build;
# to ensure intended symbols are in the library,
# the build generated shared object.
# however, for deployment, it needs te be static. (libcoroutine.a)
- cmake ../
-DBUILD_SHARED_LIBS=true
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=../install
-DCMAKE_TOOLCHAIN_FILE=../external/ios-cmake/ios.toolchain.cmake
-DENABLE_BITCODE=false
-DIOS_DEPLOYMENT_TARGET=11.0
# by using 11.0 or later, ensure target platform is 64 bit.
- make install;
- name: Android NDK
language: android
android:
components:
- tools
- platform-tools
- android-25 # 7.0
- android-27 # 8.1
- android-28 # 9.0
- build-tools-28.0.3
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- wget
- tar
- ninja-build
- tree
before_install:
# Install CMake 3.14.1 (build.gradle requires the exact version)
- sudo bash ./scripts/install-cmake-3.14.sh;
# Install Gradle from https://sdkman.io/
- curl -s "https://get.sdkman.io" | bash > /dev/null
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk version
- sdk install gradle
- sdk use gradle
- gradle --version
install:
# Accept SDK Licenses + Install NDK
- yes | sdkmanager --update > /dev/null 2>&1
- sdkmanager ndk-bundle > /dev/null 2>&1
script:
- gradle clean
- gradle assemble -warning-mode all
#
# test implementation in <coroutine/frame.h>
#
- name: Mac Debug (Custom)
os: osx
osx_image: xcode10.2
env:
- CONFIG=Debug SHARED=true
- EXT_ARGS=-DUSE_CUSTOM_HEADER=true
- name: Mac Release (Custom)
os: osx
osx_image: xcode10.2
env:
- CONFIG=Release SHARED=true
- EXT_ARGS=-DUSE_CUSTOM_HEADER=true
- name: Ubuntu(Xenial) Debug (Custom)
os: linux
dist: xenial
env:
- CONFIG=Debug SHARED=true
- EXT_ARGS=-DUSE_CUSTOM_HEADER=true
- name: Ubuntu(Xenial) Release (Custom)
os: linux
dist: xenial
env:
- CONFIG=Release SHARED=true
- EXT_ARGS=-DUSE_CUSTOM_HEADER=true