-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (73 loc) · 2.42 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
dist: trusty
os: linux
notifications:
email: false
language: c
compiler: gcc
cache:
ccache: true
directories:
- "$HOME/dl"
- "$HOME/files"
- "$HOME/feeds"
git:
depth: 3
submodules: false
env:
global:
- PACKAGE=luci-app-ss-domain-rule
- DOWNLOAD_DIR=${HOME}/files
- SDK_PATH=https://downloads.openwrt.org/releases/18.06.7/targets/x86/64
- SDK=-sdk-18.06.7-x86-64_
- CONFIG_CCACHE=y
install:
- 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;v18.06.7" >feeds.conf
- echo "src-git packages https://github.com/openwrt/packages.git^925068d4f8366240d2aeb2d69b3df12382320ec3" >>feeds.conf
- echo "src-git luci https://github.com/openwrt/luci.git^41e2258d6dc1ebe8d3874ae6d6b13db49cff2c5c" >>feeds.conf
- echo "src-git routing https://git.openwrt.org/feed/routing.git^0e63ef9276bf41c0d4176127f9f047343b8ffe32" >>feeds.conf
- echo "src-git telephony https://github.com/openwrt/telephony.git^8ecbdabc7c5cadbe571eb947f5cd333a5a785010" >>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}
- find "$SDK_HOME/bin/"
- find "$SDK_HOME/bin/" -name luci-*-ss-domain-rule*.ipk -exec cp {} "$TRAVIS_BUILD_DIR"
\;
- ls -hl "$TRAVIS_BUILD_DIR" | grep .*\.ipk
deploy:
provider: releases
file_glob: true
file: "$TRAVIS_BUILD_DIR/*.ipk"
cleanup: false
edge: true
token: $GITHUB_TOKEN
on:
tags: true