File: .travis.yml

package info (click to toggle)
lief 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 16,036 kB
  • sloc: cpp: 76,013; python: 6,167; ansic: 3,355; pascal: 404; sh: 98; makefile: 32
file content (235 lines) | stat: -rw-r--r-- 9,701 bytes parent folder | download | duplicates (2)
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
language: cpp
git:
  depth: false


matrix:
    include:
        # Linux gcc 5.0 - Python 2.7
        - os: linux
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test']
              packages: ['g++-5', 'ccache', 'libpython2.7']
          env: >
            [
            CXX_COMPILER=g++-5                        ,
            C_COMPILER=gcc-5                          ,
            PYTHON_VERSION=2.7                        ,
            PYTHON_INCLUDE_DIR=/usr/include/python2.7 ,
            PYTHON_LIBRARY=/usr/lib/libpython2.7.so   ,
            PYTHON_BINARY=/usr/bin/python2.7          ,
            LIEF_TEST_STATIC=ON                       ,
            LIEF_TEST_SHARED=OFF                      ,
            ]


        # Linux gcc 5.0 - Python 3.5
        - os: linux
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-5', 'gcc-5', 'ccache', 'python3.5-dev']
          env: >
            [
            CXX_COMPILER=g++-5                         ,
            C_COMPILER=gcc-5                           ,
            PYTHON_VERSION=3.5                         ,
            PYTHON_INCLUDE_DIR=/usr/include/python3.5m ,
            PYTHON_LIBRARY=/usr/lib/libpython3.5m.so   ,
            PYTHON_BINARY=/usr/bin/python3.5           ,
            LIEF_TEST_STATIC=OFF                       ,
            LIEF_TEST_SHARED=ON                        ,
            ]


        # Linux gcc 6 - Python 3.6
        - os: linux
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-6', 'gcc-6', 'ccache', 'python3.6-dev']
          env: >
            [
            CXX_COMPILER=g++-6                         ,
            C_COMPILER=gcc-6                           ,
            PYTHON_VERSION=3.6                         ,
            PYTHON_INCLUDE_DIR=/usr/include/python3.6m ,
            PYTHON_LIBRARY=/usr/lib/libpython3.6m.so   ,
            PYTHON_BINARY=/usr/bin/python3.6           ,
            LIEF_TEST_STATIC=ON                        ,
            LIEF_TEST_SHARED=ON                        ,
            ]

        # OSX 10.11 - xcode 7.3 - Python 2.7
        - os: osx
          osx_image: xcode7.3
          compiler: clang
          env: >
            [
            CXX_COMPILER=clang++ ,
            C_COMPILER=clang     ,
            PYTHON_VERSION=2.7   ,
            LIEF_TEST_STATIC=ON  ,
            LIEF_TEST_SHARED=OFF ,
            ]

        # OSX 10.12 - xcode 8.2 - Python 3.5
        - os: osx
          osx_image: xcode8.2
          compiler: clang
          env: >
            [
            CXX_COMPILER=clang++ ,
            C_COMPILER=clang     ,
            PYTHON_VERSION=3.5   ,
            LIEF_TEST_STATIC=OFF ,
            LIEF_TEST_SHARED=ON  ,
            ]


        ## OSX 10.12 - xcode 8.2 - Python 3.6
        - os: osx
          osx_image: xcode8.2
          compiler: clang
          env: >
            [
            CXX_COMPILER=clang++ ,
            C_COMPILER=clang     ,
            PYTHON_VERSION=3.6   ,
            LIEF_TEST_STATIC=ON  ,
            LIEF_TEST_SHARED=ON  ,
            ]

#branches:
#  only:
#  - master


notifications:
  email:
    on_success: never
    on_failure: always

sudo: required

cache:
  - apt
  - ccache
  - $HOME/.pyenv
  - build/rang_cpp_color-prefix
  - build/mbed_tls
  - build/libjson-prefix
  - build/easyloggingpp-prefix
  - build/tests/YAMLCPP
  - build/tests/lief-samples
  - build/tests/catch
  - build/api/python/pybind11-prefix

before_install:
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -q; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install python-setuptools; fi
  - export CC="$C_COMPILER"
  - export CXX="$CXX_COMPILER"
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PREFIX="/usr/local"; fi
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ccache; 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

  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then pyenv install 2.7.12; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.5" ]]; then pyenv install 3.5.0; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.6" ]]; then pyenv install 3.6.0; fi

  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then export PYTHON_INCLUDE_DIR=$(pyenv root)/versions/2.7.12/include/python2.7  ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then export PYTHON_LIBRARY=$(pyenv root)/versions/2.7.12/lib/libpython2.7.dylib ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then export PYTHON_BINARY=$(pyenv root)/versions/2.7.12/bin/python2.7           ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then $PYTHON_BINARY -m pip install --upgrade pip                                ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "2.7" ]]; then $PYTHON_BINARY -m pip install --upgrade setuptools                         ;fi

  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.5" ]]; then export PYTHON_INCLUDE_DIR=$(pyenv root)/versions/3.5.0/include/python3.5m ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.5" ]]; then export PYTHON_LIBRARY=$(pyenv root)/versions/3.5.0/lib/libpython3.dylib   ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.5" ]]; then export PYTHON_BINARY=$(pyenv root)/versions/3.5.0/bin/python3.5           ;fi

  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.6" ]]; then export PYTHON_INCLUDE_DIR=$(pyenv root)/versions/3.6.0/include/python3.6m ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.6" ]]; then export PYTHON_LIBRARY=$(pyenv root)/versions/3.6.0/lib/libpython3.dylib   ;fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" && "$PYTHON_VERSION" == "3.6" ]]; then export PYTHON_BINARY=$(pyenv root)/versions/3.6.0/bin/python3.6           ;fi

install:
  - if [ "$GCOV" == "ON" ]; then sudo ln -sf /usr/bin/gcov-5 /usr/bin/gcov; fi
  - if [ "$GCOV" == "ON" ]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz; fi
  - if [ "$GCOV" == "ON" ]; then tar xf lcov_1.13.orig.tar.gz; fi
  - if [ "$GCOV" == "ON" ]; then sudo make -C lcov-1.13/ install; fi

  # Setup CMake 3.1 for Linux
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate http://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz   ;fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xzf cmake-3.7.2-Linux-x86_64.tar.gz                                                  ;fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$PWD/cmake-3.7.2-Linux-x86_64/bin:$PATH                                       ;fi

  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py   ;fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo $PYTHON_BINARY ./get-pip.py ;fi

  # Prepare build
  - mkdir build
  - cd build


script:
  - >
    cmake
    -DCMAKE_C_COMPILER=$C_COMPILER
    -DCMAKE_CXX_COMPILER=$CXX_COMPILER
    -DPYTHON_VERSION=$PYTHON_VERSION
    -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR
    -DPYTHON_LIBRARY=$PYTHON_LIBRARY
    -DPYTHON_EXECUTABLE=$PYTHON_BINARY
    -DLIEF_TESTS=on
    -DLIEF_PYTHON_API=on
    -DLIEF_EXAMPLES=on
    -DLIEF_TEST_SHARED=$LIEF_TEST_SHARED
    -DLIEF_TEST_STATIC=$LIEF_TEST_STATIC
    ..
  - make -j3 lief_samples
  - cmake ..
  - make -j3 all
  - make -j3 check-lief

#- sudo make check-lief

after_success:
  - make package
  - sudo $PYTHON_BINARY -m pip install setuptools
  - sudo $PYTHON_BINARY -m pip install requests
  - sudo $PYTHON_BINARY -m pip install --upgrade setuptools
  - cd api/python
  - $PYTHON_BINARY setup.py bdist_egg
  - if [[ -z "$TRAVIS_TAG" ]]; then $PYTHON_BINARY setup.py sdist --dev --formats=zip ;fi
  - if [[ -n "$TRAVIS_TAG" ]]; then $PYTHON_BINARY setup.py sdist --formats=zip       ;fi
  - cd $TRAVIS_BUILD_DIR
  - bash ./.github/deploy.sh
  - if [[ "$TRAVIS_OS_NAME" == "linux" && "$PYTHON_VERSION" == "3.6" ]]; then $PYTHON_BINARY ./.github/trigger_docker.py ;fi


deploy:
  provider: releases
  api_key:
    - secure: "RlyaagAWt1BrcOBDSpmOnP+/FYUJqQiURlWw7JWvuBBWBDPBta+WI1zZvH6x5H+1bm8F77LrGdU1mRES/MAlhzb8o/VHgOAFhu2si/A+A7Xa9fAIOQw12jcGbtZQUQ7HCkRfa5VGrW4IlMI5+FJ7uFUU2lLoWOsA3u8pLEwApbdiB/LmtEY+kKhXzX0bT3h9cZATDWTeEoopXOseaBmTFC9IUATE3Ht1wVP49wXRUZHNJA10PJILbKtR1OITCAKm0iu1rVdLhoMzqH3T2dXDZ5ykF9TuYQaXJzKMFHaAeSe135JYOiIEWUUiif80q/mTWXiJAQ6gQXXOyDVu6R0Hi03TKsWXPlEKDBpDCRDu58I2hJyxsc5MPbFg8IAjraXkOLIQkIpgBOfV0JYVihikOLTfbCBKO+w9RFwrEVy91YsKCDosEAUa9p5nyRoV+k9Epmr/2atlHY8z7RyycB2fNQv3/NkHX8jZesiUFUwu5SHaZD76mKGELEZlf7LW8XwL4Cwfa2OB2vsKFcN1qyGUmXS57MODVBAUubQY4oTFwFJJUv28s06KA6BfZE4QqAeWoRSslDr9ORLUlsHHoCpZrAAY0uyl8kff/jL8IJMd8qng9bBTLu8hiK0yyQWKkebMvMWXhvAjssXeqWt3OeL2mssbUG5N1pXt6eHFmQvxqzs="
  file_glob: true
  file:
    - ${TRAVIS_BUILD_DIR}/build/api/python/dist/*.egg
    - ${TRAVIS_BUILD_DIR}/build/api/python/dist/*.zip
    - ${TRAVIS_BUILD_DIR}/build/*.tar.gz
  skip_cleanup: true
  on:
    #branch: master
    tags: true