forked from lief-project/LIEF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
322 lines (301 loc) · 12.4 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
language: cpp
git:
depth: false
jobs:
include:
- if: branch = master AND tag IS present
services: docker
name: "Linux Python 3.5"
script:
- >
docker run --name lief_35
-e PYTHON_BINARY=/opt/python/cp35-cp35m/bin/python3.5
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux.sh
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
docker run \
-v $TRAVIS_BUILD_DIR:/src \
-e TRAVIS="true" \
-e TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE \
-e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
-e LIEF_AUTOMATIC_BUILDS_KEY=$LIEF_AUTOMATIC_BUILDS_KEY \
-e LIEF_AUTOMATIC_BUILDS_IV=$LIEF_AUTOMATIC_BUILDS_IV \
--rm \
liefproject/deploy python3 /src/.github/deploy.py;
fi
- if: branch = master AND tag IS present
services: docker
name: "Linux Python 3.6"
script:
- >
docker run --name lief_36
-e PYTHON_BINARY=/opt/python/cp36-cp36m/bin/python3.6
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux.sh
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
docker run \
-v $TRAVIS_BUILD_DIR:/src \
-e TRAVIS="true" \
-e TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE \
-e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
-e LIEF_AUTOMATIC_BUILDS_KEY=$LIEF_AUTOMATIC_BUILDS_KEY \
-e LIEF_AUTOMATIC_BUILDS_IV=$LIEF_AUTOMATIC_BUILDS_IV \
--rm \
liefproject/deploy python3 /src/.github/deploy.py;
fi
- services: docker
name: "Linux Python 3.7 | SDK | Doc Trigger"
script:
- >
docker run --name lief_37
-e PYTHON_BINARY=/opt/python/cp37-cp37m/bin/python3.7
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux.sh
- >
docker run --name lief_sdk
-e PYTHON_BINARY=$PYTHON_BINARY
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux-sdk.sh
- >
sudo chmod -R 777 $TRAVIS_BUILD_DIR/build &&
sudo chown -R 1000:1000 $TRAVIS_BUILD_DIR/build
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
docker run \
-v $TRAVIS_BUILD_DIR:/src \
-e TRAVIS="true" \
-e TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE \
-e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
-e LIEF_AUTOMATIC_BUILDS_KEY=$LIEF_AUTOMATIC_BUILDS_KEY \
-e LIEF_AUTOMATIC_BUILDS_IV=$LIEF_AUTOMATIC_BUILDS_IV \
--rm \
liefproject/deploy python3 /src/.github/deploy.py;
fi
after_success:
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]];
then
docker run --rm
-e CIRCLE_CI_TOKEN=$CIRCLE_CI_TOKEN
liefproject/manylinux1_x86_64
bash -c "curl --request POST --url https://circleci.com/api/v2/project/gh/lief-project/doc/pipeline --header 'Circle-Token: ${CIRCLE_CI_TOKEN}' --header 'content-type: application/json'";
fi
- services: docker
name: "Linux Python 3.8"
script:
- >
docker run --name lief_38
-e PYTHON_BINARY=/opt/python/cp38-cp38/bin/python3.8
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux.sh
- >
sudo chmod -R 777 $TRAVIS_BUILD_DIR/build &&
sudo chown -R 1000:1000 $TRAVIS_BUILD_DIR/build
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
docker run \
-v $TRAVIS_BUILD_DIR:/src \
-e TRAVIS="true" \
-e TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE \
-e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
-e LIEF_AUTOMATIC_BUILDS_KEY=$LIEF_AUTOMATIC_BUILDS_KEY \
-e LIEF_AUTOMATIC_BUILDS_IV=$LIEF_AUTOMATIC_BUILDS_IV \
--rm \
liefproject/deploy python3 /src/.github/deploy.py;
fi
- services: docker
name: "Linux Python 3.9"
script:
- >
docker run --name lief_39
-e PYTHON_BINARY=/opt/python/cp39-cp39/bin/python3.9
-e CCACHE_DIR=/ccache
-v $HOME/.ccache:/ccache
-v $TRAVIS_BUILD_DIR:/src
liefproject/manylinux1_x86_64
bash /src/scripts/docker/travis-linux.sh
- >
sudo chmod -R 777 $TRAVIS_BUILD_DIR/build &&
sudo chown -R 1000:1000 $TRAVIS_BUILD_DIR/build
- >
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
docker run \
-v $TRAVIS_BUILD_DIR:/src \
-e TRAVIS="true" \
-e TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE \
-e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
-e LIEF_AUTOMATIC_BUILDS_KEY=$LIEF_AUTOMATIC_BUILDS_KEY \
-e LIEF_AUTOMATIC_BUILDS_IV=$LIEF_AUTOMATIC_BUILDS_IV \
--rm \
liefproject/deploy python3 /src/.github/deploy.py;
fi
## macOS 10.14.6 - xcode 11 - Python 3.5
#- if: branch = master AND tag IS present AND type = push
# os: osx
# osx_image: xcode11
# compiler: clang
# script:
# - pyenv install --skip-existing 3.5.0
# - >
# export PYTHON_BINARY=$(pyenv root)/versions/3.5.0/bin/python3.5 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools wheel &&
# $PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
# after_success:
# - >
# if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
# export PYTHON_BINARY=$(pyenv root)/versions/3.5.0/bin/python3.5 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools requests mako wheel &&
# cd $TRAVIS_BUILD_DIR &&
# bash ./.github/deploy.sh;
# fi
## macOS 10.14.6 - xcode 11 - Python 3.6
#- if: branch = master AND tag IS present AND type = push
# os: osx
# osx_image: xcode11
# compiler: clang
# script:
# - pyenv install --skip-existing 3.6.0
# - >
# export PYTHON_BINARY=$(pyenv root)/versions/3.6.0/bin/python3.6 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools wheel &&
# $PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
# after_success:
# - >
# if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
# export PYTHON_BINARY=$(pyenv root)/versions/3.6.0/bin/python3.6 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools requests mako wheel &&
# cd $TRAVIS_BUILD_DIR &&
# bash ./.github/deploy.sh;
# fi
## macOS 10.14.6 - xcode 11 - Python 3.7
#- os: osx
# osx_image: xcode11
# compiler: clang
# script:
# - pyenv install --skip-existing 3.7.0
# - >
# export PYTHON_BINARY=$(pyenv root)/versions/3.7.0/bin/python3.7 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools wheel &&
# $PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
# after_success:
# - >
# if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
# export PYTHON_BINARY=$(pyenv root)/versions/3.7.0/bin/python3.7 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools requests mako wheel &&
# cd $TRAVIS_BUILD_DIR &&
# bash ./.github/deploy.sh;
# fi
# macOS 10.14.6 - xcode 11 - Python 3.8
#- os: osx
# osx_image: xcode11
# compiler: clang
# name: "OSX Python 3.8"
# script:
# - pyenv install --skip-existing 3.8.0
# - >
# export PYTHON_BINARY=$(pyenv root)/versions/3.8.0/bin/python3.8 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools wheel &&
# $PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
# after_success:
# - >
# if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
# export PYTHON_BINARY=$(pyenv root)/versions/3.8.0/bin/python3.8 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools requests mako wheel &&
# cd $TRAVIS_BUILD_DIR &&
# bash ./.github/deploy.sh;
# fi
## macOS 10.14.6 - xcode 11 - Python 3.9
#- os: osx
# osx_image: xcode11
# compiler: clang
# name: "OSX Python 3.9 | SDK"
# script:
# - pyenv install --skip-existing 3.9.0
# - >
# export PYTHON_BINARY=$(pyenv root)/versions/3.9.0/bin/python3.9 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools wheel &&
# $PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
# - bash scripts/osx/package_sdk.sh
# after_success:
# - >
# if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
# export PYTHON_BINARY=$(pyenv root)/versions/3.9.0/bin/python3.9 &&
# sudo $PYTHON_BINARY -m pip install --upgrade pip setuptools requests mako wheel &&
# cd $TRAVIS_BUILD_DIR &&
# bash ./.github/deploy.sh;
# fi
#branches:
# only:
# - master
notifications:
email:
on_success: never
on_failure: always
cache:
- ccache: true
- directories:
- $HOME/.pyenv
- $HOME/.ccache
env:
global:
- USE_CCACHE=1
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=10.0G
- CCACHE_CPP2=1
addons:
homebrew:
packages:
- pyenv
- ccache
- ninja
update: true
before_install:
- ccache --set-config=max_size=10.0G
- ccache --zero-stats --version
- ccache --set-config=compiler_check=content
- ccache -p
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker pull liefproject/manylinux1_x86_64:latest; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PREFIX="/usr/local"; fi
#- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-unicode=ucs2"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pyenv root; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pyenv install --list ;fi
after_script:
- ccache --show-stats
#deploy:
# provider: releases
# token:
# - secure: LTJMZp9kJ9/tmv73YGktP3Bdhh3moettDNooiRlQfUEgUemRlp9K+ybbufN0ya0Md0bouOJ/7nWqFToWl1G5/kcRr4MjV/P2c+iH8W7mvWcFupLGdwm1+aqpin3hiGsdYz0a1TK37y6DANspFwHILjq1SPf5L8kGEHnYSIfyUFHaETbv7GHL+4gf1XG/55KVuyFa3vZ2BPa3sIXr4bRypdNsqssFOZ7qeoJawtcI3TbjmLqx+sOGR2aiG+9lX+/vcYVGECHOE4KdV5BbTFitDLkJ0toAQrgN4XuB6XMXEnijU0RGtpkvsUAYJUuYaNcV2ea4bwLPCKz0IJvzTw3gtyB/pioP4OUx0xY2csuNuGfppZ0Fb+BWhPx9wOg209lrPjtoWszK8vo4PywKlEUviNG+3hEYx9x382IbtbXvIxp+c2iYdRicudFIdjjSZt7fy1MwBvHhWoBRl1hVw5fpFvRIC6Q1/B6MV55Jc3LVYCs+QHPAXq2KJ1KWK/Q7mmlriG3O+dvswcE1l0/AmeqKuXLsgUMuzScYa4fMFvXL3l/B8bKw205ynMzKvbb61P3sGrJJ+AFDEoHDk8yNtSaTowoUveu75DbL1s1p02QjYeVt7AJS8AsqUm7QPcUU5iXW1gSgt50jD/46/uvK7NZCFj2LzkiVzM5JIbiUANx8pKA=
# file_glob: true
# file:
# - ${TRAVIS_BUILD_DIR}/dist/*.whl
# - ${TRAVIS_BUILD_DIR}/build/*.tar.gz
# on:
# tags: true