forked from projectNe10/Ne10
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
167 lines (149 loc) · 4.07 KB
/
circle.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
all_jobs: &all_jobs
jobs:
- ios-armv7-release
- ios-armv7-debug
- ios-aarch64-release
- ios-aarch64-debug
- android-armv7-release
- android-armv7-debug
- android-aarch64-release
- android-aarch64-debug
- linux-armv7-release
- linux-armv7-debug
- linux-aarch64-release
- linux-aarch64-debug
build_steps: &build_steps
steps:
- run:
name: Setup
command: |
if [ "${PLATFORM}" == "ios" ]; then
mkdir -p ~/cmake
curl -L https://cmake.org/files/v3.10/cmake-3.10.3-Darwin-x86_64.tar.gz | \
tar -xz -C ~/cmake --strip-components 1
CMAKE_BIN_DIR="${HOME}/cmake/CMake.app/Contents/bin"
LOCAL_BIN_DIR="/usr/local/bin"
ln -s ${CMAKE_BIN_DIR}/cmake ${LOCAL_BIN_DIR}/cmake
ln -s ${CMAKE_BIN_DIR}/cpack ${LOCAL_BIN_DIR}/cpack
ln -s ${CMAKE_BIN_DIR}/ctest ${LOCAL_BIN_DIR}/ctest
elif [ "${PLATFORM}" == "android" ]; then
NDK_VERSION="r16b"
sudo apt-get update
sudo apt-get install cmake
cd ${HOME}
curl -L https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-x86_64.zip -o ndk.zip
unzip ndk.zip
mv android-ndk-${NDK_VERSION} android-ndk
else
sudo apt-get update
sudo apt-get install cmake
if [ "${ARCH}" == "armv7" ]; then
sudo apt-get install g++-arm-linux-gnueabihf
else
# gcc7 aarch64 fails due to this bug:
# https://bugs.launchpad.net/gcc-linaro/+bug/1759369
# sudo apt-get install g++-aarch64-linux-gnu
sudo apt-get install g++-8-aarch64-linux-gnu
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-8 1 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-8
fi
fi
- checkout
- run:
name: Build
command: |
./circle/build_${PLATFORM}.sh
environment:
TERM: "xterm" # color output
mac_build: &mac_build
macos:
xcode: "9.2.0"
<<: *build_steps
linux_build: &linux_build
docker:
- image: circleci/buildpack-deps:bionic
<<: *build_steps
# TODO(tom): release/debug variant
# also clang variant for NDK
# enable warnings as errors
version: 2
jobs:
ios-armv7-release:
<<: *mac_build
environment:
- PLATFORM: "ios"
- ARCH: "armv7"
ios-armv7-debug:
<<: *mac_build
environment:
- PLATFORM: "ios"
- ARCH: "armv7"
- DEBUG: "1"
ios-aarch64-release:
<<: *mac_build
environment:
- PLATFORM: "ios"
- ARCH: "aarch64"
ios-aarch64-debug:
<<: *mac_build
environment:
- PLATFORM: "ios"
- ARCH: "aarch64"
- DEBUG: "1"
android-armv7-release:
<<: *linux_build
environment:
- PLATFORM: "android"
- ARCH: "armv7"
android-armv7-debug:
<<: *linux_build
environment:
- PLATFORM: "android"
- ARCH: "armv7"
- DEBUG: "1"
android-aarch64-release:
<<: *linux_build
environment:
- PLATFORM: "android"
- ARCH: "aarch64"
android-aarch64-debug:
<<: *linux_build
environment:
- PLATFORM: "android"
- ARCH: "aarch64"
- DEBUG: "1"
linux-armv7-release:
<<: *linux_build
environment:
- PLATFORM: "linux"
- ARCH: "armv7"
linux-armv7-debug:
<<: *linux_build
environment:
- PLATFORM: "linux"
- ARCH: "armv7"
- DEBUG: "1"
linux-aarch64-release:
<<: *linux_build
environment:
- PLATFORM: "linux"
- ARCH: "aarch64"
linux-aarch64-debug:
<<: *linux_build
environment:
- PLATFORM: "linux"
- ARCH: "aarch64"
- DEBUG: "1"
workflows:
version: 2
continous:
<<: *all_jobs
nightly:
<<: *all_jobs
triggers:
- schedule:
cron: "0 8 * * *"
filters:
branches:
only:
- master
- circleci