forked from KDE/heaptrack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (63 loc) · 3.52 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
language: cpp
compiler: gcc
sudo: require
dist: trusty
before_install:
- sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y
- sudo apt-get update -qq
install:
- sudo apt-get -y install qt510base qt510svg qt510x11extras libdwarf-dev libboost-iostreams-dev libboost-program-options-dev
- source /opt/qt*/bin/qt*-env.sh
- # ecm
- git clone git://anongit.kde.org/extra-cmake-modules
- cd extra-cmake-modules && mkdir build && cd build && cmake .. && make -j$(nproc) && sudo make install && cd ../..
- # zstd
- git clone https://github.com/facebook/zstd.git
- cd zstd && make -j$(nproc) && sudo make install && cd ..
- # Precompiled KF5
- wget -nv -c "https://github.com/chigraph/precompiled-kf5-linux/releases/download/precompiled/kf5-gcc6-linux64-release.tar.xz"
- tar xf kf5-gcc6-linux64-release.tar.xz
- sudo cp -Rf root/kf5-release/* /opt/qt*/
- # kdiagram
- git clone git://anongit.kde.org/kdiagram
- cd kdiagram && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/qt510 -DBUILD_KGantt=OFF -DBUILD_TESTING=OFF .. && make -j$(nproc) && sudo make install && cd ../../
- # Precompiled version of libunwind in newer version (1.)2
- wget -nv -c "https://swanson.kdab.com/owncloud/index.php/s/ZETvRRZ7J5Nllo5/download" -O libunwind.tar.bz2
- tar xf libunwind.tar.bz2
- sudo cp -Rf libunwind-*/usr/* /usr/
- # Get AppImage tools
- wget -nv -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage
- sudo mv linuxdeployqt*.AppImage /usr/bin/linuxdeployqt
- wget -nv -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
- chmod a+x appimagetool-*.AppImage
- sudo mv appimagetool-*.AppImage /usr/bin/appimagetool
- wget -nv -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- chmod a+x upload.sh
- sudo mv upload.sh /usr/bin/github-upload
script:
- set -e # Exit immediately if anything fails
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DAPPIMAGE_BUILD=ON
- make -j$(nproc)
- make DESTDIR=appdir install
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- export LD_LIBRARY_PATH=/opt/qt510/lib/x86_64-linux-gnu # make sure this path is known so all Qt/KF5 libs are found
- linuxdeployqt ./appdir/usr/share/applications/org.kde.heaptrack.desktop -executable=./appdir/usr/lib/heaptrack/libexec/heaptrack_interpret -executable=./appdir/usr/lib/heaptrack/libheaptrack_preload.so -executable=./appdir/usr/lib/heaptrack/libheaptrack_inject.so -bundle-non-qt-libs
- # Ensure we prefer the bundled libs also when calling dlopen, cf.: https://github.com/KDAB/hotspot/issues/89
- mv ./appdir/usr/bin/heaptrack_gui{,_bin}
- echo -e '#!/bin/bash\nf="$(readlink -f "${0}")"\nd="$(dirname "$f")"\nLD_LIBRARY_PATH="$d/../lib:$LD_LIBRARY_PATH" "$d/heaptrack_gui_bin" "$@"' > ./appdir/usr/bin/heaptrack_gui
- chmod +x ./appdir/usr/bin/heaptrack_gui
- # include breeze icons
- cp -a /opt/qt*/share/icons/breeze ./appdir/usr/share/icons/
- # include zstd binary
- cp $(which zstd) ./appdir/usr/bin/zstd
- # use the shell script as AppRun entry point
- rm ./appdir/AppRun
- ln -sr ./appdir/usr/bin/heaptrack ./appdir/AppRun
- # Actually create the final image
- appimagetool ./appdir/
- # upload the appimage to GitHub
- mv Heaptrack-*.AppImage heaptrack-git.$(git rev-parse --short HEAD)-x86_64.AppImage
- github-upload ./heaptrack-git.*-x86_64.AppImage