Skip to content

Commit

Permalink
CI for CMake (radareorg#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
SiebelsTim authored and Maijin committed Oct 2, 2017
1 parent 2ba3d92 commit ff3ad1e
Showing 1 changed file with 50 additions and 35 deletions.
85 changes: 50 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,50 @@ language: cpp

cache: ccache

matrix:
include:
- os: osx
before_install:
- brew update
install:
- brew install p7zip ccache qt5
- export PATH="/usr/local/opt/qt/bin:$PATH"
after_success:
# TODO: include radare2/www for the webserver
- macdeployqt cutter.app -dmg
- export FILE_TO_UPLOAD="cutter.dmg"
- os: linux
dist: trusty
sudo: required
before_install:
- sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y
- sudo apt-get update -qq
install:
- sudo apt-get -y install qt56base qt56webengine
- source /opt/qt5*/bin/qt5*-env.sh
after_success:
- sudo make INSTALL_ROOT=appdir install
- sudo chown -R $USER appdir
- cp -r /usr/share/radare2 appdir/usr/share/
- 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
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -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"
os:
- linux
- osx

script:
sudo: required
dist: trusty

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y &&
sudo apt-get update -qq
; fi

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install p7zip ccache qt5 &&
export PATH="/usr/local/opt/qt/bin:$PATH"
; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -y install qt56base qt56webengine &&
source /opt/qt5*/bin/qt5*-env.sh
; fi

after_success:
# TODO: include radare2/www for the webserver
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
macdeployqt cutter.app -dmg &&
export FILE_TO_UPLOAD="cutter.dmg"
; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo make INSTALL_ROOT=appdir install &&
sudo chown -R $USER appdir &&
cp -r /usr/share/radare2 appdir/usr/share/ &&
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 &&
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2 &&
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -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" &&
; fi

before_script:
- git submodule init ; git submodule update
- cd radare2
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand All @@ -44,10 +54,15 @@ script:
LDFLAGS=-headerpad_max_install_names INSTALL_TARGET=install sys/install.sh;
fi
- cd ..

env:
- TEST_COMMAND="qmake PREFIX=/usr APPIMAGE=1 ../src && make -j4"
- TEST_COMMAND="cmake ../src && make -j4"

script:
- mkdir build
- cd build
- qmake PREFIX=/usr APPIMAGE=1 ../src
- make -j4
- (eval "$TEST_COMMAND")

deploy:
skip_cleanup: true
Expand Down

0 comments on commit ff3ad1e

Please # to comment.