-
Notifications
You must be signed in to change notification settings - Fork 80
/
.travis.yml
78 lines (78 loc) · 3.15 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
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=luci-app-frpc
- USER=kuoruan
- REPO=luci-app-frpc
- CCACHE_VERSION=3.6
- DOWNLOAD_DIR=${HOME}/files
- SDK_PATH=https://downloads.openwrt.org/releases/18.06.2/targets/x86/generic
- SDK=-sdk-18.06.2-x86-generic_
install:
- 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 -j2 || make package/${PACKAGE}/{clean,compile} V=s
- find "${SDK_HOME}/bin/"
- find "${SDK_HOME}/bin/" -name luci-*-frpc*.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: jWKTRI/enOoZKErOcklanj0UnunpdnJVfKM8i/WKEG8ZV0aX12SkSSbRP1TVGuFT2gn7CTowaJOOd/64FmCYBVQH+TEw5MwJ1REHKMVS7LNHc3sR6m5OjBCBhLm/TIVNoN9MzKqSPEeP5YUVnwv6Fo2a4rjb9xOhb7cCjbmh97YnwJn0YQqY/G+xQY38HiB+NTFoAepJ3m8EfJfQ2DL8HAw4c4Syv+W9YEoW2q+v0r2kBHlfSdKWS2as/K7kwFTHVgdQtMDiw5CepODwsFNxy1eXBz7qRb3EZlTA5UURpqjhZT6qh4yaYxgNxbMYAyPYOvEyM3CZQGZcfaUoIi4L3+RY0cAWtqfDbBdFslIZ6zq5PmzGENPMBX2Nk7pKYRGbEc68y4GNH19pDmdUUHNp5e6WormoRtY2FhmKzh/+GXSwcsMpSG9JsbP8CU+3J3hzulA8h+fteLNnwOx30aN39jWL7850Bxhu57Do+jtknY2BCxBlX6IvAloNf2zUiotlQzeZDvri4Wm99BtwjPPWqJ3JMmB8PzOBsXR33ietdkh/zW7BmY400fjyL305n7OGWgDHD3vkv4zacfrZCWTtNp40lbNR4IQcmg2RR+IAACpLmsVtvCgUNBJSrtPJ3JwmJj9DFBtbzAYXNXrz7XUrSoVu+oG9VwEsqVMM+mxT0VY=