2017-04-02 12:17:32 +00:00
|
|
|
language: cpp
|
|
|
|
|
2017-09-25 17:51:49 +00:00
|
|
|
cache: ccache
|
2017-09-25 17:34:38 +00:00
|
|
|
|
2017-11-25 11:51:46 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-06-21 14:40:49 +00:00
|
|
|
- debug
|
2017-11-25 11:51:46 +00:00
|
|
|
- /^v\d.*$/
|
2018-09-30 11:10:44 +00:00
|
|
|
- deploy-test
|
2017-11-25 11:51:46 +00:00
|
|
|
|
2017-10-23 10:49:46 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2017-10-23 10:52:36 +00:00
|
|
|
- os: linux
|
2018-03-04 09:33:57 +00:00
|
|
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
2017-10-23 10:52:36 +00:00
|
|
|
- os: linux
|
2018-03-04 09:33:57 +00:00
|
|
|
env: BUILD_SYSTEM=cmake
|
2017-10-23 10:52:36 +00:00
|
|
|
- os: osx
|
2018-12-21 19:48:39 +00:00
|
|
|
osx_image: xcode10.1
|
2018-03-04 09:33:57 +00:00
|
|
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
2017-10-23 10:52:36 +00:00
|
|
|
- os: osx
|
2018-12-21 19:48:39 +00:00
|
|
|
osx_image: xcode10.1
|
2018-03-04 09:33:57 +00:00
|
|
|
env: BUILD_SYSTEM=cmake
|
2017-10-11 12:18:34 +00:00
|
|
|
|
2017-10-02 16:41:40 +00:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
|
|
|
|
2018-12-18 09:04:23 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- sourceline: "ppa:beineri/opt-qt596-trusty"
|
|
|
|
packages:
|
|
|
|
- qt59base
|
|
|
|
- qt59svg
|
|
|
|
- qt59webengine
|
|
|
|
homebrew:
|
|
|
|
update: true
|
|
|
|
brewfile: scripts/Brewfile
|
2017-10-02 16:41:40 +00:00
|
|
|
|
|
|
|
install:
|
2018-04-14 09:39:44 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/qt/bin:$PATH" ; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source scripts/prepare_python_macos.sh ; fi
|
2017-10-02 16:41:40 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-04-14 09:39:44 +00:00
|
|
|
source /opt/qt5*/bin/qt5*-env.sh
|
2017-10-02 16:41:40 +00:00
|
|
|
; fi
|
2018-04-14 09:39:44 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source scripts/prepare_python_linux.sh ; fi
|
2017-10-02 16:41:40 +00:00
|
|
|
|
|
|
|
before_script:
|
2018-12-26 12:45:41 +00:00
|
|
|
- echo "Using tag $TRAVIS_TAG"
|
2018-12-24 14:53:09 +00:00
|
|
|
- if [[ "$TRAVIS_TAG" == "" ]]; then export TAGNAME="nightly" && export NIGHTLY="-nightly" ; else export TAGNAME="$TRAVIS_TAG" && export NIGHTLY="" ; fi
|
2018-12-26 12:45:41 +00:00
|
|
|
- echo "TAGNAME $TAGNAME NIGHTLY $NIGHTLY"
|
2017-04-02 12:17:32 +00:00
|
|
|
- git submodule init ; git submodule update
|
|
|
|
- cd radare2
|
2017-09-25 17:51:49 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
INSTALL_TARGET=install sys/install.sh;
|
|
|
|
else
|
|
|
|
LDFLAGS=-headerpad_max_install_names INSTALL_TARGET=install sys/install.sh;
|
|
|
|
fi
|
2017-04-02 12:17:32 +00:00
|
|
|
- cd ..
|
2017-10-02 16:41:40 +00:00
|
|
|
|
|
|
|
script:
|
2017-09-25 17:51:49 +00:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2018-03-04 09:33:57 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
2018-10-02 10:54:23 +00:00
|
|
|
PKG_CONFIG_PATH="$CUSTOM_PYTHON_PREFIX/lib/pkgconfig" qmake CUTTER_ENABLE_JUPYTER=true CUTTER_ENABLE_QTWEBENGINE=false PREFIX=/usr APPIMAGE=1 ../src && make -j4;
|
2018-03-04 09:33:57 +00:00
|
|
|
elif [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
|
|
|
cmake ../src && make -j4;
|
|
|
|
fi
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
2018-10-02 10:54:23 +00:00
|
|
|
qmake CUTTER_ENABLE_JUPYTER=true CUTTER_ENABLE_QTWEBENGINE=false CUTTER_BUNDLE_R2_APPBUNDLE=true PYTHON_FRAMEWORK_DIR=$PYTHON_FRAMEWORK_DIR ../src &&
|
2018-03-05 20:39:36 +00:00
|
|
|
make -j4;
|
2018-03-04 09:33:57 +00:00
|
|
|
elif [[ "$BUILD_SYSTEM" == "qmake" ]]; then
|
|
|
|
cmake ../src && make -j4;
|
|
|
|
fi
|
|
|
|
fi
|
2017-09-26 10:09:00 +00:00
|
|
|
|
2018-04-14 09:39:44 +00:00
|
|
|
after_success:
|
2018-10-02 11:21:39 +00:00
|
|
|
- export CUTTER_VERSION=$(python ../scripts/get_version.py)
|
2018-10-02 10:54:23 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2018-12-12 08:31:42 +00:00
|
|
|
macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
|
2018-11-23 16:36:43 +00:00
|
|
|
macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter -libpath="../Frameworks" &&
|
2018-04-14 09:39:44 +00:00
|
|
|
"$TRAVIS_BUILD_DIR/scripts/appbundle_embed_python.sh" "$PYTHON_FRAMEWORK_DIR/Python.framework" Cutter.app Cutter.app/Contents/MacOS/Cutter &&
|
2018-04-15 12:41:10 +00:00
|
|
|
mkdir -p Cutter.app/Contents/Resources/r2/share &&
|
|
|
|
cp -a /usr/local/share/radare2 Cutter.app/Contents/Resources/r2/share/ &&
|
2018-04-14 09:39:44 +00:00
|
|
|
mkdir image && cp -a Cutter.app image/ &&
|
2018-12-04 05:38:16 +00:00
|
|
|
export VOL_NAME="Cutter v${CUTTER_VERSION}" &&
|
|
|
|
export DMG_TMP_FILE="Cutter-v$CUTTER_VERSION-x64.macOS-tmp.dmg" &&
|
2018-12-24 12:07:46 +00:00
|
|
|
export DMG_FILE="Cutter-v$CUTTER_VERSION-x64$NIGHTLY.macOS.dmg" &&
|
2018-12-04 05:38:16 +00:00
|
|
|
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}" &&
|
2018-10-02 11:21:39 +00:00
|
|
|
export FILE_TO_UPLOAD="$DMG_FILE"
|
2018-04-14 09:39:44 +00:00
|
|
|
; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-07-13 19:04:42 +00:00
|
|
|
make INSTALL_ROOT=appdir install &&
|
2018-04-14 09:39:44 +00:00
|
|
|
cp -r /usr/share/radare2 appdir/usr/share/ &&
|
2018-04-14 13:21:35 +00:00
|
|
|
"$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" "$CUSTOM_PYTHON_PREFIX" appdir &&
|
2018-07-15 12:17:15 +00:00
|
|
|
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" &&
|
2018-04-14 09:39:44 +00:00
|
|
|
chmod a+x linuxdeployqt*.AppImage &&
|
|
|
|
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH &&
|
2018-07-13 19:04:42 +00:00
|
|
|
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
|
|
|
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
2018-04-14 09:39:44 +00:00
|
|
|
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq &&
|
2018-12-24 12:07:46 +00:00
|
|
|
export APPIMAGE_FILE="Cutter-v$CUTTER_VERSION-x64$NIGHTLY.Linux.AppImage" &&
|
2018-10-02 11:21:39 +00:00
|
|
|
mv Cutter-x86_64.AppImage "$APPIMAGE_FILE" &&
|
|
|
|
export FILE_TO_UPLOAD="$APPIMAGE_FILE"
|
2018-04-14 09:39:44 +00:00
|
|
|
; fi
|
|
|
|
|
2017-09-26 10:09:00 +00:00
|
|
|
deploy:
|
|
|
|
skip_cleanup: true
|
|
|
|
provider: releases
|
2018-11-30 10:27:06 +00:00
|
|
|
draft: false
|
|
|
|
prerelease: true
|
2018-12-24 12:07:46 +00:00
|
|
|
tag_name: $TAGNAME
|
2017-09-26 10:09:00 +00:00
|
|
|
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:
|
2017-09-26 10:25:49 +00:00
|
|
|
- "${FILE_TO_UPLOAD}"
|
2017-09-26 10:09:00 +00:00
|
|
|
on:
|
2018-03-07 15:03:12 +00:00
|
|
|
condition: $DEPLOY = 1
|
2017-10-13 16:11:32 +00:00
|
|
|
|