forked from kuoruan/openwrt-v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
89 lines (89 loc) · 3.84 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
dist: trusty
sudo: false
notifications:
email: false
language: c
compiler: gcc
cache:
bundler: true
directories:
- "${HOME}/dl"
- "${HOME}/files"
git:
depth: 3
submodules: false
env:
global:
- PACKAGE=v2ray-core
- USER=kuoruan
- REPO=openwrt-v2ray
- CCACHE_VERSION=3.6
- DOWNLOAD_DIR=${HOME}/files
matrix:
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/ar71xx/generic SDK=-sdk-ar71xx-generic_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/ramips/mt7620 SDK=-sdk-ramips-mt7620_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/brcm63xx/generic SDK=-sdk-brcm63xx-generic_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/bcm53xx/generic SDK=-sdk-bcm53xx_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/brcm47xx/generic SDK=-sdk-brcm47xx-
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/ipq806x/generic SDK=-sdk-ipq806x_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/x86/generic SDK=-sdk-x86-generic_
- SDK_PATH=https://downloads.openwrt.org/snapshots/targets/x86/64 SDK=-sdk-x86-64_
install:
- |
if [ -z "$TRAVIS_TAG" ] && [ "x$SDK" != "x-sdk-x86-64_" ] ; then
travis_terminate 0
fi
- mkdir -p "$DOWNLOAD_DIR" && cd "$DOWNLOAD_DIR"
- wget -c "http://us.archive.ubuntu.com/ubuntu/pool/main/c/ccache/ccache_${CCACHE_VERSION}-1_amd64.deb"
- mkdir -p "${HOME}/local"
- sudo apt-get install -yq dpkg
- dpkg -x "ccache_${CCACHE_VERSION}-1_amd64.deb" "${HOME}/local"
- export PATH="${HOME}/local/usr/bin:$PATH"
- cd "$DOWNLOAD_DIR"
- 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 "${DOWNLOAD_DIR}/${SDK_FILE}"
- export SDK_HOME="$(mktemp -d)"
- cd "$SDK_HOME"
- tar -Jxf "${DOWNLOAD_DIR}/${SDK_FILE}" --strip=1
- test -d "${HOME}/dl" || mkdir -p "${HOME}/dl"
- test -d "dl" && rm -rf dl
- ln -s "${HOME}/dl/" dl
- 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}/compile V=s
- find "${SDK_HOME}/bin/"
- find "${SDK_HOME}/bin/" -name v2*.ipk -exec cp {} "$TRAVIS_BUILD_DIR" \;
- ls -hl "$TRAVIS_BUILD_DIR" | grep .*\.ipk
deploy:
provider: releases
file_glob: true
file: "${TRAVIS_BUILD_DIR}/*.ipk"
skip_cleanup: true
on:
tags: true
all_branches: true
api_key:
secure: Qe6flWqUJbBE9dmGBTCV0IKLh6m0G5PxyJJ/fr1ZBpVuh5P4vZ7zrbpkNFLgL0aODsUi8gZGJIhwIXlMkja+VpmU/YFed+gy5W2Y1fcB3I4/IAVaH+bNTGjR6Np8rN1cEbWifRyNe0WMks0uqHq78MZgfJFNETOJyfJYxLkGcYKiDopH4gTCJagQ9Jh/TnNl+DXzmf7LTRa9wpey4tGbreAyEj5KirDfP8xOOKJBjbHn3JLH4iC3u7Czc9xxtRWu/rfnVKstdjt9tHjgoTgX2CIYyA3dYEiJHsWuJh6gTNTQaAGtD3QF5ecPY99VjoIOeC1Lwoy1fAgOd8ayHtlXhUYil+bMD6jOxSuO3KW4FB0M/M5QGthWegHM5wuQwcYNEHaVrbD42phH+W0tO7V1mFRrax5JuI0bSC8PHYw98oi4z1ZimjR6ZGv+D579V/t2WlarsQIkyZD8nbdVSVSEQqoD6SarKR0FYM2eTctHrxwRO+iAfM+0wmPAdDVtZElNrMLddT+90ii8EytW8KwsJikGepeAMnhT7BKB/PXhZCh6MX/SV32QfNSjJ1pWfs8FXAfa55ywz3drcAtHXky6yUceTzUqU1PB6Cv29pzdp2LMIXLI7ZuvAceqLijRtJjqM3b2MeAtT1Ta8GKsa6BQtClrCzWjcC9Z4145Wm07MFc=