forked from MaurycyLiebner/enve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
128 lines (127 loc) · 5.6 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
language: cpp
sudo: required
matrix:
include:
- os: linux
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- # sourceline: 'ppa:beineri/opt-qt-5.12.0-xenial'
- # sourceline: 'ppa:jonathonf/ffmpeg-4'
packages:
- g++-7
- # qt512base qt512multimedia qt512svg
- # ffmpeg debs dependencies
- libvorbisfile3 libsoxr0 libcrystalhd3 libgsm1 libmp3lame0
- libopus0 libshine3 libsnappy1v5 libspeex1 libtheora0 libtwolame0
- libwavpack1 libxvidcore4 libzvbi0
- libbluray1 libgme0 libssh-gcrypt-4
- # libswresample-dev libswscale-dev libavcodec-dev libavformat-dev libavresample-dev
- libglib2.0-dev
- unzip
- libjson-c-dev intltool pkg-config
- # for gperftools
- autoconf automake libtool libunwind-dev
- # skia dependencies
- build-essential freeglut3-dev libfontconfig-dev libfreetype6-dev
- libgif-dev libgl1-mesa-dev libglu1-mesa-dev libharfbuzz-dev
- libicu-dev libjpeg-dev libpng-dev libwebp-dev
- p7zip-full libpulse-dev libxkbcommon-x11-0 libgstreamer-plugins-base1.0-0
- libgtk2.0-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- QT_INSTALL_DIR=~/Qt
- QT_VERSION=5.12.4
- QT_BIN=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64/bin
- PATH="${QT_BIN}:${PATH}"
- QT_LIB=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64/lib
- LD_LIBRARY_PATH="${QT_LIB}:${LD_LIBRARY_PATH}"
before_install:
- eval "${MATRIX_EVAL}"
- wget https://raw.githubusercontent.com/qbs/qbs/master/scripts/install-qt.sh
- chmod +x install-qt.sh
- ./install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} qtbase qttools qtsvg qtmultimedia qtdeclarative icu
install:
- ## FFMPEG
- wget https://github.com/MaurycyLiebner/enve/files/3968745/ffmpeg-dev-4.2.tar.gz
- tar xf ffmpeg-dev-4.2.tar.gz
- cd ffmpeg-dev-4.2
- chmod +x install.py
- sudo python install.py
- cd ..
- # skia dependencies
- cd third_party
- # build skia
- tar xf skia.tar.xz
- cd skia
- python tools/git-sync-deps
- # sudo tools/install_dependencies.sh
- wget https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip
- unzip ninja-linux.zip
- chmod +x ninja
- bin/gn gen out/Release --args='is_official_build=true is_debug=false extra_cflags=["-Wno-error"] target_os="linux" target_cpu="x64" skia_use_system_expat=false skia_use_system_freetype2=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_harfbuzz=false cc="gcc-7" cxx="g++-7"'
- ./ninja -C out/Release -j 2
- cd ..
- # build libmypaint
- tar xf libmypaint.tar.xz
- cd libmypaint-1.3.0
- export CFLAGS='-fopenmp -Ofast -ftree-vectorize -fopt-info-vec-optimized -funsafe-math-optimizations -funsafe-loop-optimizations -fPIC'
- ./configure --enable-static --enable-openmp --enable-shared=false
- sudo make
- unset CFLAGS
- cd ..
- # build gperftools
- cd gperftools-2.7-enve-mod
- ./autogen.sh
- ./configure --prefix /usr LIBS=-lpthread
- make
- cd ../../
before_script:
- cd build
- wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
- chmod +x linuxdeployqt-6-x86_64.AppImage
- wget https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64
- mv AppRun-patched-x86_64 AppRun
- chmod +x AppRun
- wget https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so
- mv exec-x86_64.so exec.so
- cd Release
script:
- # source /opt/qt512/bin/qt512-env.sh
- # embed commit hash and date
- LATEST_COMMIT_HASH=\"$(git log --pretty=format:'%h' -n 1)\"
- enveSplash=../../src/app/GUI/envesplash.h
- echo "#ifndef LATEST_COMMIT_HASH" >> $enveSplash
- echo "#define LATEST_COMMIT_HASH $LATEST_COMMIT_HASH" >> $enveSplash
- echo "#endif" >> $enveSplash
- LATEST_COMMIT_DATE=\"$(git log -1 --format=%ai)\"
- echo "#ifndef LATEST_COMMIT_DATE" >> $enveSplash
- echo "#define LATEST_COMMIT_DATE $LATEST_COMMIT_DATE" >> $enveSplash
- echo "#endif" >> $enveSplash
- qmake ../../enve.pro
- make -j 2 CC=gcc-7 CPP=g++-7 CXX=g++-7 LD=g++-7
- cd ..
- # Generate AppImage
- cp AppRun AppDir/
- cp exec.so AppDir/usr/optional
- mkdir AppDir/usr/optional/libstdc++
- cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/
- cp Release/src/app/enve AppDir/usr/bin/
- cp -av Release/src/core/*.so* AppDir/usr/lib/
- cp -av ../third_party/gperftools-2.7-enve-mod/.libs/libtcmalloc.so* AppDir/usr/lib/
- ./linuxdeployqt-6-x86_64.AppImage AppDir/usr/share/applications/enve.desktop -appimage
after_success:
- |
export GREP_PATH=grep;
curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/MaurycyLiebner/enve/commits/master -o repo.txt;
export REMOTE=$($GREP_PATH -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1 repo.txt);
export LOCAL=$(git rev-parse HEAD);
if [[ "$REMOTE" != "$LOCAL" ]]; then echo "Build no longer current. $REMOTE vs $LOCAL - aborting upload."; exit 0; fi;
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh;
bash upload.sh enve*.AppImage*;
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)/