forked from Trojan-Qt5/Trojan-Qt5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
150 lines (143 loc) · 5.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: cpp
matrix:
include:
- os: osx
osx_image: xcode11
env: BADGE=osx
- os: linux
dist: xenial
sudo: required
env:
- BADGE=linux
- QT_CI_PACKAGES=qt.qt5.5132.gcc_64,qt.qt5.5132.qtwebengine PATH="$TRAVIS_BUILD_DIR/Qt/5.13.2/gcc_64/bin:${PATH}"
addons:
apt:
packages:
- libxkbcommon-x11-0
- libgl1-mesa-dev
services:
- xvfb
before_install:
- if [ "$BADGE" = "linux" ]; then
sudo apt-get update;
fi
- if [ "$BADGE" = "osx" ]; then
brew update;
fi
install:
- if [ "$BADGE" = "linux" ]; then
sudo apt-get install libgl-dev git build-essential g++ python-dev autoconf autotools-dev libicu-dev libbz2-dev checkinstall zlib1g zlib1g-dev python3 -y;
git clone https://github.com/benlau/qtci.git;
source qtci/path.env;
install-qt 5.13.2 >/dev/null 2>&1;
echo "Installing Zlib 1.2.11...";
wget https://www.zlib.net/zlib-1.2.11.tar.gz;
tar -xf zlib-1.2.11.tar.gz;
cd zlib-1.2.11;
./configure --prefix=/usr/local/zlib >/dev/null 2>&1;
make -j$(nproc) >/dev/null 2>&1;
sudo make install >/dev/null 2>&1;
cd ..;
echo "Installing Pcre 8.43...";
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz;
tar -xf pcre-8.43.tar.gz;
cd pcre-8.43;
./configure --prefix=/usr/local/pcre >/dev/null 2>&1;
make -j$(nproc) >/dev/null 2>&1;
sudo make install >/dev/null 2>&1;
cd ..;
echo "Installing ZBar 0.10...";
wget -O zbar-0.10.tar.gz https://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10.tar.gz/download;
tar -xf zbar-0.10.tar.gz;
cd zbar-0.10;
export CFLAGS="";
./configure --prefix=/usr/local/zbar --disable-video --without-qt --without-gtk --without-python >/dev/null 2>&1;
make -j$(nproc) >/dev/null 2>&1;
sudo make install >/dev/null 2>&1;
cd ..;
echo "Installing libqrencode...";
git clone https://github.com/fukuchi/libqrencode.git;
cd libqrencode;
./autogen.sh >/dev/null 2>&1;
./configure --prefix=/usr/local/qrencode >/dev/null 2>&1;
make -j$(nproc) >/dev/null 2>&1;
sudo make install >/dev/null 2>&1;
cd ..;
echo "Installing openssl 1.1.1f...";
wget https://www.openssl.org/source/openssl-1.1.1f.tar.gz;
tar -xf openssl-1.1.1f.tar.gz;
cd openssl-1.1.1f;
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib >/dev/null 2>&1;
make -j$(nproc) >/dev/null 2>&1;
sudo make install >/dev/null 2>&1;
cd ..;
echo "Installing boost 1_72_0...";
wget -O boost_1_72_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.gz/download >/dev/null 2>&1;
tar -xf boost_1_72_0.tar.gz;
cd boost_1_72_0/;
./bootstrap.sh --prefix=/usr/local/boost >/dev/null 2>&1;
./b2 --with-system --with-program_options -j$(nproc);
sudo ./b2 install >/dev/null 2>&1;
cd ..;
fi
- if [ "$BADGE" = "osx" ]; then
brew install zbar qrencode boost [email protected] zlib pcre python3;
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/89bf3a54383d884f8b8511c6237325dd5b5ae6ba/Formula/qt.rb --verbose;
cp -r framework/Sparkle.framework /usr/local/Cellar/qt/5.13.1/lib;
cp -r framework/LetsMove.framework /usr/local/Cellar/qt/5.13.1/lib;
fi
before_script:
- if [ "$BADGE" = "osx" ]; then export PATH="/usr/local/Cellar/qt/5.13.1/bin:$PATH"; fi
script:
- git submodule update --init --recursive
- cd 3rd/qthttpserver
- qmake && make -j$(nproc) && make install
- cd ../..
- cd 3rd/yaml-cpp
- cmake . && make -j$(nproc)
- cd ../..
- if [ "$BADGE" = "osx" ]; then
mkdir build && cd ./build;
qmake ../;
make -j$(nproc);
fi
- if [ "$BADGE" = "linux" ]; then
cd src/privoxy;
autoheader && autoconf && ./configure;
cd ../..;
mkdir build && cd ./build;
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage";
chmod a+x linuxdeployqt-continuous-x86_64.AppImage;
qmake CONFIG+=release .. PREFIX=/usr;
make -j$(nproc);
make INSTALL_ROOT=appdir -j$(nproc) install ; find appdir/;
fi
defore_deploy:
- if [ "$BADGE" = "osx" ]; then
xattr -c -r trojan-qt5.app;
xattr -d com.apple.quarantine trojan-qt5.app;
macdeployqt trojan-qt5.app -dmg;
mv trojan-qt5.dmg Trojan-Qt5-macOS.dmg;
brew link --overwrite python;
python3 ../scripts/checksum.py Trojan-Qt5-macOS.dmg Trojan-Qt5-macOS.hash;
fi
- if [ "$BADGE" = "linux" ]; then
export LD_LIBRARY_PATH=/usr/loal/zlib/lib:/usr/local/pcre/lib:/usr/local/zbar/lib/:/usr/local/qrencode/lib/:/usr/local/boost/lib/:/usr/local/openssl/lib/:$LD_LIBRARY_PATH;
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage;
mv Trojan-Qt5*.AppImage Trojan-Qt5-Linux.AppImage;
python3 ../scripts/checksum.py Trojan-Qt5-Linux.AppImage Trojan-Qt5-Linux.hash;
fi
- cd ..
deploy:
provider: release
file:
- build/Trojan-Qt5-macOS.dmg
- build/Trojan-Qt5-macOS.hash
- build/Trojan-Qt5-Linux.AppImage
- build/Trojan-Qt5-Linux.hash
api_key: $GIT_REPO_TOKEN
skip_cleanup: true
overwrite: true
on:
branch: master
tags: true