forked from emericg/SmartServoFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (55 loc) · 2.51 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
language: cpp
sudo: required
os:
- linux
- osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-add-repository ppa:beineri/opt-qt-5.10.1-trusty -y;
sudo apt-add-repository ppa:ubuntu-toolchain-r/test -y;
sudo apt-get update -q;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install g++-7 -y;
sudo apt-get install qt510base qt510svg qt510imageformats qt510tools -y;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install qt;
fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt510/bin/qt510-env.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-7" CC="gcc-7"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:/usr/local/opt/qt5/bin:/usr/local/bin; fi
- cd SmartServoGui/
- qmake CONFIG+=release PREFIX=/usr
script:
- |-
- make -j$(nproc)
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
make INSTALL_ROOT=appdir -j$(nproc) install; find appdir/;
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/5/linuxdeployqt-5-x86_64.AppImage";
chmod a+x linuxdeployqt-5-x86_64.AppImage;
unset QTDIR; unset QT_PLUGIN_PATH; unset LD_LIBRARY_PATH;
export VERSION=$(git rev-parse --short HEAD);
mkdir -p appdir/usr/plugins/imageformats/ appdir/usr/plugins/iconengines/;
cp /opt/qt510/plugins/imageformats/libqsvg.so appdir/usr/plugins/imageformats/;
cp /opt/qt510/plugins/iconengines/libqsvgicon.so appdir/usr/plugins/iconengines/;
./linuxdeployqt-5-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so,iconengines/libqsvgicon.so;
./linuxdeployqt-5-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make install;
fi
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq;
curl --upload-file SmartServoGui*.AppImage https://transfer.sh/SmartServoGui-git.$(git rev-parse --short HEAD)-linux64.AppImage;
echo '>> Uploading to transfer.sh completed';
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd bin/;
zip -r -X SmartServoGui.zip SmartServoGui.app;
curl --upload-file SmartServoGui*.zip https://transfer.sh/SmartServoGui-git.$(git rev-parse --short HEAD)-macOS.zip;
echo '>> Uploading to transfer.sh completed';
fi