-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.travis.yml
More file actions
65 lines (59 loc) · 2.6 KB
/
.travis.yml
File metadata and controls
65 lines (59 loc) · 2.6 KB
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
language: cpp
dist: xenial
osx_image: xcode11
os:
- linux
- osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-add-repository ppa:beineri/opt-qt-5.15.2-xenial -y;
sudo apt-get update -q;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install qt515base qt515svg qt515imageformats qt515tools qt515serialport -y;
sudo apt-get install libgl1-mesa-dev -y;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install qt;
fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt515/bin/qt515-env.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:/usr/local/opt/qt5/bin:/usr/local/bin; fi
- qmake --version
- 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/6/linuxdeployqt-7-x86_64.AppImage";
chmod a+x linuxdeployqt-7-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/qt515/plugins/imageformats/libqsvg.so appdir/usr/plugins/imageformats/;
cp /opt/qt515/plugins/iconengines/libqsvgicon.so appdir/usr/plugins/iconengines/;
./linuxdeployqt-7-x86_64.AppImage appdir/usr/share/applications/*.desktop -unsupported-allow-new-glibc -bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so,iconengines/libqsvgicon.so;
./linuxdeployqt-7-x86_64.AppImage appdir/usr/share/applications/*.desktop -unsupported-allow-new-glibc -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
- echo '>> End of CI build script!';