File: .travis.yml

package info (click to toggle)
radare2-cutter 1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,768 kB
  • sloc: cpp: 38,432; python: 507; sh: 505; xml: 115; makefile: 89; ansic: 10; javascript: 3
file content (294 lines) | stat: -rw-r--r-- 11,920 bytes parent folder | download
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
language: cpp

cache: ccache

branches:
  only:
  - master
  - debug
  - /^v\d.*$/
  - /^deploy-test(-.*)?$/

matrix:
  include:
  - name: Linux QMake
    os: linux
    dist: xenial
    env: BUILD_SYSTEM=qmake
    addons:
      apt:
        packages:
         - mesa-common-dev
         - libgl1-mesa-glx
         - libgl1-mesa-dev
         - libxkbcommon-x11-dev
         - ninja-build/xenial-backports

  - name: Linux CMake
    os: linux
    env: BUILD_SYSTEM=cmake_nodep
    before_install:
      - ls $(pyenv root)/versions
      - pyenv global 3.7
      - pip3 install meson
    addons:
      apt:
        packages:
         - mesa-common-dev
         - ninja-build
         - libgraphviz-dev
         - qt5-default
         - libqt5svg5-dev
         - qttools5-dev

  - name: Linux CMake + Deploy
    os: linux
    env: BUILD_SYSTEM=cmake DEPLOY=1
    dist: xenial
    addons:
      apt:
        packages:
         - mesa-common-dev
         - libgl1-mesa-glx
         - libgl1-mesa-dev
         - libxkbcommon-x11-dev
         - ninja-build/xenial-backports

  - name: Linux Ubuntu 16.04 # test that Cutter can be built on an old distro using system libraries
    os: linux
    env: BUILD_SYSTEM=cmake_nodep PATH="/usr/bin:$PATH"
    dist: xenial
    addons:
      apt:
        packages:
         - ninja-build
         - libgraphviz-dev
         - qt5-default
         - libqt5svg5-dev
         - qttools5-dev
         - qttools5-dev-tools
         - cmake
    before_install:
      - pyenv install 3.5.2
      - pyenv global 3.5.2
      - pip install meson==0.52.1


  - name: macOS QMake + Deploy
    os: osx
    osx_image: xcode11
    env: BUILD_SYSTEM=qmake DEPLOY=1
    before_install: ~

  - name: macOS CMake
    os: osx
    osx_image: xcode11
    env: BUILD_SYSTEM=cmake
    before_install: ~
    addons:
      homebrew:
        brewfile: scripts/Brewfile
        update: true # updating brew to get slightly newer meson, 0.54 doesn't work on macOS.

  - name: Documentation + Deploy
    os: linux
    cache: ~
    addons:
      apt:
        packages:
         - doxygen
         - libgraphviz-dev
    before_install:
      - pyenv global 3.7
      - pip3 install -U sphinx
      - pip3 install -U breathe
      - pip3 install -U sphinx-rtd-theme
      - pip3 install -U recommonmark
    install: ~
    before_script: ~
    after_success: ~
    script:
    - cd docs
    - make html
    before_deploy:
    - cd "$TRAVIS_BUILD_DIR"
    - openssl aes-256-cbc -K $encrypted_bd0ed4c1fd75_key -iv $encrypted_bd0ed4c1fd75_iv -in scripts/deploy_docs_rsa.enc -out scripts/deploy_docs_rsa -d
    - chmod 600 scripts/deploy_docs_rsa
    - export GIT_SSH_COMMAND="/usr/bin/ssh -i $TRAVIS_BUILD_DIR/scripts/deploy_docs_rsa"
    - git config --global user.name "Travis CI"
    - git config --global user.email "travis@travis-ci.com"
    deploy:
      skip_cleanup: true
      provider: script
      script: bash scripts/deploy_docs.sh
      on:
        repo: radareorg/cutter
        branch: master


sudo: required
dist: bionic

addons:
  homebrew:
    brewfile: scripts/Brewfile
    # update: true

before_install:
  - ls $(pyenv root)/versions
  - pyenv global 3.7.1
  - pip3 install meson

install:
  - if [[ "$BUILD_SYSTEM" != "cmake_nodep" ]]; then
      scripts/fetch_deps.sh;
      source cutter-deps/env.sh;
    fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        export PATH=/usr/local/opt/llvm/bin:$PATH;
        source scripts/prepare_breakpad_macos.sh;
    fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
        export LD_LIBRARY_PATH="`llvm-config --libdir`:$LD_LIBRARY_PATH";
        source scripts/prepare_breakpad_linux.sh;
    fi

before_script:
  - cd radare2
  - if [[ "$BUILD_SYSTEM" == "qmake" ]] || ([[ "$BUILD_SYSTEM" == "cmake" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]) ; then
        if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
            INSTALL_TARGET=install sys/install.sh /usr;
        else
            LDFLAGS=-headerpad_max_install_names INSTALL_TARGET=install sys/install.sh;
        fi
    fi
  - cd ..

script:
  - mkdir build
  - cd build
  - export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$CUSTOM_PYTHON_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
        if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
            qmake
                CUTTER_ENABLE_PYTHON=true
                CUTTER_ENABLE_PYTHON_BINDINGS=true
                CUTTER_ENABLE_CRASH_REPORTS=true
                PREFIX=/usr
                ../src &&
            make -j4;
        elif [[ "$BUILD_SYSTEM" == "cmake" ]]; then
            cmake
                -DCMAKE_BUILD_TYPE=Release
                -DCMAKE_PREFIX_PATH="$Qt5_ROOT"
                -DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.so.1.0"
                -DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m"
                -DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3"
                -DCUTTER_ENABLE_PYTHON=ON
                -DCUTTER_ENABLE_PYTHON_BINDINGS=ON
                -DCUTTER_ENABLE_CRASH_REPORTS=ON
                -DCUTTER_USE_BUNDLED_RADARE2=OFF
                -DCUTTER_APPIMAGE_BUILD=ON
                -DCMAKE_INSTALL_PREFIX=appdir/usr
                ../src &&
            make -j4;
       elif [[ "$BUILD_SYSTEM" == "cmake_nodep" ]]; then
            cmake
                -DCMAKE_BUILD_TYPE=Release
                -DCUTTER_USE_BUNDLED_RADARE2=ON
                ../src &&
            make -j4;
       fi
    elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
            qmake
                CUTTER_ENABLE_PYTHON=true
                CUTTER_ENABLE_PYTHON_BINDINGS=true
                SHIBOKEN_EXTRA_OPTIONS=-isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include
                CUTTER_BUNDLE_R2_APPBUNDLE=true
                CUTTER_ENABLE_CRASH_REPORTS=true
                PYTHON_FRAMEWORK_DIR=$CUTTER_DEPS_PYTHON_FRAMEWORK_DIR
                BREAKPAD_FRAMEWORK_DIR=$BREAKPAD_FRAMEWORK_DIR
                ../src &&
            make -j4;
        elif [[ "$BUILD_SYSTEM" == "cmake" ]]; then
            cmake
                -DCMAKE_BUILD_TYPE=Release
                -DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.dylib"
                -DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m"
                -DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3"
                -DCUTTER_ENABLE_PYTHON=ON
                -DCUTTER_ENABLE_PYTHON_BINDINGS=ON
                -DSHIBOKEN_EXTRA_OPTIONS=-isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include
                -DCUTTER_ENABLE_CRASH_REPORTS=ON
                -DCUTTER_USE_BUNDLED_RADARE2=ON
                -DBREAKPAD_FRAMEWORK_DIR="$BREAKPAD_FRAMEWORK_DIR"
                ../src &&
            make -j4;
       fi
    fi

after_success:
  - export CUTTER_VERSION=$(python ../scripts/get_version.py)
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      lrelease ../src/Cutter.pro &&
      mkdir -p Cutter.app/Contents/Resources/translations &&
      cp ../src/translations/*.qm Cutter.app/Contents/Resources/translations/ &&
      macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
      macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
      cp -a "$QTDIR/lib/QtDBus.framework" "$QTDIR/lib/QtPrintSupport.framework" Cutter.app/Contents/Frameworks &&
      cp -a "$BREAKPAD_FRAMEWORK_DIR/Breakpad.framework" Cutter.app/Contents/Frameworks &&
      "$TRAVIS_BUILD_DIR/scripts/appbundle_embed_python.sh" "$CUTTER_DEPS_PYTHON_FRAMEWORK_DIR/Python.framework" Cutter.app Cutter.app/Contents/MacOS/Cutter &&
      mv Cutter.app/Contents/MacOS/Cutter Cutter.app/Contents/MacOS/Cutter.bin &&
      cp ../src/macos/Cutter.sh Cutter.app/Contents/MacOS/Cutter &&
      chmod +x Cutter.app/Contents/MacOS/Cutter &&
      mkdir -p Cutter.app/Contents/Resources/r2/share &&
      cp -a /usr/local/share/radare2 Cutter.app/Contents/Resources/r2/share/ &&
      "$TRAVIS_BUILD_DIR/scripts/r2ghidra.sh" -DCMAKE_INSTALL_PREFIX="`pwd`/Cutter.app/Contents/Resources/r2" -DBUILD_CUTTER_PLUGIN=ON -DCUTTER_INSTALL_PLUGDIR="`pwd`/Cutter.app/Contents/Resources/plugins/native" -DCUTTER_SOURCE_DIR="$TRAVIS_BUILD_DIR" &&
      "$TRAVIS_BUILD_DIR/scripts/r2dec.sh" --prefix="`pwd`/Cutter.app/Contents/Resources/r2" &&
      mkdir image && cp -a Cutter.app image/ &&
      export VOL_NAME="Cutter v${CUTTER_VERSION}" &&
      export DMG_TMP_FILE="Cutter-v$CUTTER_VERSION-x64.macOS-tmp.dmg" &&
      export DMG_FILE="Cutter-v$CUTTER_VERSION-x64.macOS.dmg" &&
      export SIZE=`du -sh "image" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'` &&
      export SIZE=`echo "${SIZE} + 10.0" | bc | awk '{print int($1+0.5)}'` &&
      hdiutil create -srcfolder image -volname "${VOL_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "$DMG_TMP_FILE" &&
      export DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP_FILE}" | egrep '^/dev/' | sed 1q | awk '{print $1}') &&
      sleep 2 &&
      ../scripts/prepare_package_ui_macos.sh "Cutter" "${PWD}/../src/macos/cutter_mac_app.png" "${VOL_NAME}" &&
      hdiutil detach "${DEVICE}" &&
      hdiutil convert "${DMG_TMP_FILE}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FILE}" &&
      export FILE_TO_UPLOAD="$DMG_FILE"
    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $DEPLOY == 1 ]]; then
      export VERSION=$CUTTER_VERSION &&
      make install &&
      cp -r /usr/share/radare2 appdir/usr/share/ &&
      "$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" appdir &&
      "$TRAVIS_BUILD_DIR/scripts/r2ghidra.sh" -DCMAKE_INSTALL_PREFIX="`pwd`/appdir/usr" -DBUILD_CUTTER_PLUGIN=ON -DCUTTER_SOURCE_DIR="$TRAVIS_BUILD_DIR" &&
      "$TRAVIS_BUILD_DIR/scripts/r2dec.sh" --prefix=`pwd`/appdir/usr &&
      wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage" &&
      chmod a+x linuxdeployqt*.AppImage &&
      rm -fv "$TRAVIS_BUILD_DIR/cutter-deps/qt/plugins/imageformats/libqjp2.so" &&
      ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -executable=./appdir/usr/bin/python3 -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so,libqjp2.so -ignore-glob=usr/lib/python3.6/**/* -verbose=2 &&
      ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -executable=./appdir/usr/bin/python3 -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so,libqjp2.so -ignore-glob=usr/lib/python3.6/**/* -verbose=2 &&
      find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq &&
      export APPIMAGE_FILE="Cutter-v$CUTTER_VERSION-x64.Linux.AppImage" &&
      mv Cutter-*-x86_64.AppImage "$APPIMAGE_FILE" &&
      export FILE_TO_UPLOAD="$APPIMAGE_FILE"
    ; fi

deploy:
  skip_cleanup: true
  provider: releases
  draft: true
  prerelease: true
  tag_name: $TRAVIS_TAG
  api_key:
    secure: ZXuSX8JXyL0HlJvSIda3ftMkvYsrxoWDcWm2LxO+f0uNFghCHNnISuH/btdipn2mjCBaBQl6/1IK5cg/AZ5OSkiaVsJJqY8kkPsZvR8K+k4oarsr2ApetlLZiZWtydC3J+UyNhsgCt4iuYPsvusANFPZBpVmqT+A5CHS7aPIqP00awbkJYG1uOENe2XVZ0vyotBqU0E7A9f8UO5ps0+qysS8W+NDB+CGLgKLeBfCk3U+IYKGYXcv66xCmSSZ5f7IVIXEjG4voFHGp9XLRY2R/iJgiKQKDbu519vUB3iKPzmLTB/Q9bNz4VMZCREa4SHaLDen730fMHbfm6ZhGZDzXg1DgZoh6RHptWf0WjcHTr1ch8ajpnBMxh/qmoRpaS00FJQMraMT3Il38ekYd+hOhsP58Bj1Db2vjBKopGEHGmVyFQZKuynrdKmpmY+kRNUT3QerIsiAHwHV2QXnMARHYXJrM0T7LNACa2mhiwQD2vNIqLRieIbHbSWgDUrTVTDeII23AAHCzD0YxcCAjSExjun/rc9dJjevgCoBpTM/NHPLCW4big1myx+vRQGPNdlf+dI7igm6bPVWB7znp5uXlI8q5irvqTVtRSvKbcaeDWOz/ki7QgOzaxmGFtaw30hxeY0wFlnSMXc8m42udWLkp/l0b4L0hcoaMTc1TvVU0i4=
  file:
    - "${FILE_TO_UPLOAD}"
  on:
    tags: true
    condition: $DEPLOY = 1