forked from wznpp1/ShadowClash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
81 lines (74 loc) · 2.24 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
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 python3.6;
git clone https://github.com/benlau/qtci.git;
source qtci/path.env;
install-qt 5.13.2;
sudo wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz;
sudo tar -xvf go1.13.1.linux-amd64.tar.gz;
sudo mv go /usr/local;
export GOROOT=/usr/local/go;
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH;
fi
- if [ "$BADGE" = "osx" ]; then
brew upgrade go --verbose;
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/89bf3a54383d884f8b8511c6237325dd5b5ae6ba/Formula/qt.rb --verbose;
fi
before_script:
- if [ "$BADGE" = "osx" ]; then export PATH="/usr/local/Cellar/qt/5.13.1/bin:$PATH"; fi
script:
- git submodule update --init
- python3 install_dependency.py
- cd clashr && python3 build_clashr.py
- cd ..
- mkdir build && cd ./build
- if [ "$BADGE" = "osx" ]; then
qmake ../;
make -j$(nproc);
fi
- if [ "$BADGE" = "linux" ]; then
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/;
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
fi
defore_deploy:
- cd ..
- python3 release.py
deploy:
provider: release
file: build\ShdowClash-windows.zip
api_key: $GIT_REPO_TOKEN
skip_cleanup: true
overwrite: true
on:
branch: master
tags: true