forked from kuoruan/luci-app-v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
88 lines (88 loc) · 3.19 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
dist: trusty
sudo: false
notifications:
email: false
language: c
compiler: gcc
cache:
ccache: true
directories:
- "$HOME/dl"
- "$HOME/files"
- "$HOME/feeds"
git:
depth: 3
submodules: false
addons:
apt:
packages:
- subversion
- build-essential
- libncurses5-dev
- zlib1g-dev
- gettext
- libssl-dev
- xsltproc
- zip
env:
global:
- PACKAGE=luci-app-v2ray
- GITHUB_USER=kuoruan
- GITHUB_REPO=luci-app-v2ray
- SDK_PATH=https://downloads.openwrt.org/releases/18.06.4/targets/x86/64
- SDK=-sdk-18.06.4-x86-64_
install:
- test -d "$HOME/files" || mkdir -p "$HOME/files"
- cd "$HOME/files"
- wget "$SDK_PATH/sha256sums" -O sha256sums
- |
if ! grep -- "$SDK" sha256sums > sha256sums.small 2>/dev/null ; then
printf "\033[1;31m=== Can not find ${SDK} file in sha256sums.\033[m\n"
exit 1
fi
- export SDK_FILE="$(cat sha256sums.small | cut -d' ' -f2 | sed 's/*//g')"
- |
if ! sha256sum -c ./sha256sums.small 2>/dev/null ; then
wget "$SDK_PATH/$SDK_FILE" -O "$SDK_FILE"
if ! sha256sum -c ./sha256sums.small 2>/dev/null ; then
printf "\033[1;31m=== SDK can not be verified!\033[m\n"
exit 1
fi
fi
- file "$HOME/files/$SDK_FILE"
- export SDK_HOME="$(mktemp -d)"
- cd "$SDK_HOME"
- tar -Jxf "$HOME/files/$SDK_FILE" --strip=1
- test -d "$HOME/dl" || mkdir -p "$HOME/dl"
- test -d "dl" && rm -rf dl || true
- test -d "feeds" && rm -rf feeds || true
- ln -s "$HOME/dl/" dl
- ln -s "$HOME/feeds" feeds
- echo "src-git base https://github.com/openwrt/openwrt.git" >feeds.conf
- echo "src-git packages https://github.com/openwrt/packages.git" >>feeds.conf
- echo "src-git luci https://github.com/openwrt/luci.git" >>feeds.conf
- echo "src-git routing https://git.openwrt.org/feed/routing.git" >>feeds.conf
- echo "src-git telephony https://github.com/openwrt/telephony.git" >>feeds.conf
- ln -s "$TRAVIS_BUILD_DIR" "package/$PACKAGE"
script:
- cd "$SDK_HOME"
- ./scripts/feeds update -a >/dev/null
- ./scripts/feeds install -a >/dev/null
- make defconfig
- make package/$PACKAGE/{clean,compile} -j2
- find "$SDK_HOME/bin/"
- find "$SDK_HOME/bin/" -name luci-*-v2ray*.ipk -exec cp {} "$TRAVIS_BUILD_DIR" \;
- ls -hl "$TRAVIS_BUILD_DIR" | grep .*\.ipk
after_failure:
- cd "$SDK_HOME"
- make package/$PACKAGE/compile V=s
deploy:
provider: releases
file_glob: true
file: "$TRAVIS_BUILD_DIR/*.ipk"
skip_cleanup: true
on:
tags: true
all_branches: true
api_key:
secure: eePvdLjXTvHqFH2Vx3gNCsPL5qzVVaQ1XcLUg5WekHpLfyt/VpzDZPu5jiJg6zLH0N4k5+Xb49I+E1JEMSCoV1Gjwq1E0GO6uu5Nrv1r9tsqWilY87YLQyhmKAOGNoJcieb4qYyqzV1eLkjMWnvwZ+kwqyJ16EiPiO5hZ2qNq+npe7N4CKkZdGBclB2odKVLtZB3s8lngmvwiWzKCTrBaP+z4akQCxp3++DO2BgfzTxO3Cg4EUyTSryzhaV0UEnHky0nIrP3e/DapbVAkIUXlv9hZ9ins5M4j0vQJmmB5bN2JsTNfYZVG/09sVgdNKc6hBUieVfDLnJ+kzpeXHjWGcuBfuvdHlq8n+hBo3w0dMccVr7FfDuMmkvOWyiDuTNbboJe0eg9D4a5PAKtYwGJeqHAF8PG/wGC6qa7d2pcnM6hTIREjU7J3IbKlLPwErK+2zL88IGGDiqkdVlZeKXscZcuOL3OlwdOBGWEP1uICXIOZawjNHIqqEmNml/C+FX4oCD7udOcc1V1gbvBrirbcy05HS12pNjKGYjpIAu6LInPPNxjUrrAUrMnsR1OCsfIIH/L91wkq6pO1D7hKK8a7cUVH60YDQs08r/c5NggK6cdkEylkkSEK2g3pFjiVBkR/mtKrvuAlCv2X8lJm+k7KJ+x1X3oS0I81xh3vGVRvQU=