cutter/.travis.yml

120 lines
5.8 KiB
YAML
Raw Normal View History

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
branches:
only:
- master
- /^v\d.*$/
2017-10-23 10:49:46 +00:00
matrix:
include:
2017-10-23 10:52:36 +00:00
- os: linux
env: BUILD_SYSTEM=qmake DEPLOY=1
2017-10-23 10:52:36 +00:00
- os: linux
env: BUILD_SYSTEM=cmake
2017-10-23 10:52:36 +00:00
- os: osx
env: BUILD_SYSTEM=qmake DEPLOY=1
2017-10-23 10:52:36 +00:00
- os: osx
env: BUILD_SYSTEM=cmake
2017-10-11 12:18:34 +00:00
2017-10-02 16:41:40 +00:00
sudo: required
dist: trusty
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2017-10-11 12:23:12 +00:00
sudo add-apt-repository ppa:beineri/opt-qt591-trusty -y &&
2017-10-02 16:41:40 +00:00
sudo apt-get update -qq
; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
2018-03-05 20:39:36 +00:00
brew install p7zip ccache qt5 openssl xz &&
export PATH="/usr/local/opt/qt/bin:$PATH" &&
mkdir python && cd python && wget "https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz" && tar -xf Python-3.6.4.tar.xz &&
export PYTHON_FRAMEWORK_DIR="`pwd`/framework" && cd Python-3.6.4 &&
CPPFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" ./configure --enable-framework=$PYTHON_FRAMEWORK_DIR &&
make -j4 && make frameworkinstallframework > /dev/null &&
PYTHONHOME=$PYTHON_FRAMEWORK_DIR/Python.framework/Versions/Current $PYTHON_FRAMEWORK_DIR/Python.framework/Versions/Current/bin/pip3 install jupyter &&
cd ../..
2017-10-02 16:41:40 +00:00
; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2018-02-24 13:47:16 +00:00
sudo apt-get -y install qt59base qt59svg qt59webengine --allow-unauthenticated &&
source /opt/qt5*/bin/qt5*-env.sh &&
mkdir python && cd python && wget "https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz" && tar -xf Python-3.6.4.tar.xz &&
export CUSTOM_PYTHON_PREFIX="`pwd`/prefix" && cd Python-3.6.4 &&
echo "Building Python to install to prefix $CUSTOM_PYTHON_PREFIX" &&
./configure --enable-shared --prefix=$CUSTOM_PYTHON_PREFIX && make -j4 && make install > /dev/null &&
PYTHONHOME=$CUSTOM_PYTHON_PREFIX LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib "$CUSTOM_PYTHON_PREFIX/bin/pip3" install jupyter &&
cd ../..
2017-10-02 16:41:40 +00:00
; fi
after_success:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
2018-03-05 20:39:36 +00:00
macdeployqt Cutter.app &&
mkdir -p Cutter.app/Contents/Frameworks &&
2018-03-07 12:01:19 +00:00
cp -a "$PYTHON_FRAMEWORK_DIR/Python.framework" Cutter.app/Contents/Frameworks/ &&
install_name_tool -change `otool -L Cutter.app/Contents/MacOS/Cutter | sed -n "s/^[[:blank:]]*\([^[:blank:]]*Python\) (.*$/\1/p"` @executable_path/../Frameworks/Python.framework/Versions/Current/Python Cutter.app/Contents/MacOS/Cutter &&
cd Cutter.app/Contents/Frameworks/Python.framework &&
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf &&
rm -r Versions/Current/Resources/* Versions/Current/lib/python3.6/test Versions/Current/lib/python3.6/idlelib Versions/Current/lib/python3.6/curses Versions/Current/lib/python3.6/lib2to3 &&
cd ../../../.. &&
2018-03-05 20:39:36 +00:00
mkdir image && cp -r Cutter.app image/ &&
hdiutil create -srcfolder image -volname Cutter -fs HFS+ Cutter.dmg &&
export FILE_TO_UPLOAD="Cutter.dmg"
2017-10-02 16:41:40 +00:00
; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2018-03-05 20:39:36 +00:00
sudo make INSTALL_ROOT=appdir install &&
sudo chown -R $USER appdir &&
cp -r /usr/share/radare2 appdir/usr/share/ &&
cp -RT "$CUSTOM_PYTHON_PREFIX" appdir/usr/ &&
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" &&
chmod a+x linuxdeployqt*.AppImage &&
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH &&
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -verbose=2 &&
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -verbose=2 &&
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq &&
export FILE_TO_UPLOAD="Cutter-x86_64.AppImage"
2017-10-02 16:41:40 +00:00
; fi
before_script:
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
2017-10-23 21:08:36 +00:00
sed -i 's,R2_PREFIX.*,R2_PREFIX "/tmp/.cutter_usr",' libr/include/r_userconf.h.acr;
2017-09-25 17:51:49 +00:00
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
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
PKG_CONFIG_PATH="$CUSTOM_PYTHON_PREFIX/lib/pkgconfig" qmake CONFIG+=CUTTER_ENABLE_JUPYTER CONFIG+=CUTTER_ENABLE_QTWEBENGINE PREFIX=/usr APPIMAGE=1 ../src && make -j4;
elif [[ "$BUILD_SYSTEM" == "qmake" ]]; then
cmake ../src && make -j4;
fi
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$BUILD_SYSTEM" == "qmake" ]]; then
2018-03-05 20:39:36 +00:00
qmake CONFIG+=CUTTER_ENABLE_JUPYTER CONFIG+=CUTTER_ENABLE_QTWEBENGINE PYTHON_FRAMEWORK_DIR=$PYTHON_FRAMEWORK_DIR ../src &&
make -j4;
elif [[ "$BUILD_SYSTEM" == "qmake" ]]; then
cmake ../src && make -j4;
fi
fi
2017-09-26 10:09:00 +00:00
deploy:
skip_cleanup: true
provider: releases
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:
2017-11-20 20:37:00 +00:00
tags: true
2017-10-13 16:11:32 +00:00