-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (75 loc) · 2.8 KB
/
.travis.yml
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
language: cpp
sudo: require
dist: trusty
os:
- linux
- osx
matrix:
exclude:
# Don't build with clang on Linux
- os: linux
compiler: clang
# Don't build with gcc on OSX
- os: osx
compiler: gcc
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa;
sudo add-apt-repository --yes ppa:beineri/opt-qt591-trusty;
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo add-apt-repository --yes ppa:ppsspp/cmake;
sudo apt update -qq;
sudo apt install build-essential qt59base qt59quickcontrols qt59serialport qt59charts-no-lgpl g++-4.8 cmake git;
export CXX="g++-4.8";
git clone git://anongit.kde.org/extra-cmake-modules;
cd extra-cmake-modules;
mkdir ecm-build;
cd ecm-build;
cmake -DCMAKE_INSTALL_PREFIX=/usr ..;
make;
sudo make install;
cd ../../;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update > /dev/null;
brew install qt5;
brew tap KDE-mac/kde;
brew install kf5-extra-cmake-modules;
chmod -R 755 /usr/local/opt/qt5/*;
export QTDIR="/usr/local/opt/qt5";
export PATH="$QTDIR/bin:$PATH";
fi
script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
source /opt/qt*/bin/qt*-env.sh;
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_GUI=ON CMakeLists.txt;
make;
sudo make install;
make DESTDIR=appdir/ install; find appdir/;
mkdir -p appdir/usr/plugins;
mv appdir/usr/lib/x86_64-linux-gnu/plugins/AtCore/ appdir/usr/plugins/AtCore;
rm -rf appdir/usr/include appdir/usr/mkspecs appdir/usr/lib/x86_64-linux-gnu/;
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;
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
cmake -DBUILD_GUI=ON CMakeLists.txt;
make;
mkdir testclient/atcore-gui.app/Contents/MacOS/plugins;
mv src/plugins/*.dylib testclient/atcore-gui.app/Contents/MacOS/plugins/;
macdeployqt testclient/atcore-gui.app/ -dmg;
fi
after_success:
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq;
bash ./upload.sh ./AtCore*.AppImage*;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then bash ./upload.sh testclient/atcore-gui*.dmg*; fi
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/