-
Notifications
You must be signed in to change notification settings - Fork 96
/
.travis.yml
69 lines (60 loc) · 2.52 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
sudo: true
language: c
services:
- docker
addons:
apt:
packages:
- sshpass
env:
global:
- IMAGE_NAME="openwrtorg/sdk:ar71xx-generic"
- CODECOV_TOKEN="a2d4efa4-ec98-4768-a9cf-7f29c19c387a"
jobs:
include:
-
stage: unittests
name: "Unit Tests"
script:
- ./run_tests
-
stage: pkgbuild
name: "Build packages"
before_script:
- docker pull "$IMAGE_NAME" || true
script:
- |
cat <<EOF >> feeds.conf.default
src-git base https://git.openwrt.org/openwrt/openwrt.git;v18.06.1
src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5
src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913
src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76
src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b
src-git libremesh https://github.com/libremesh/lime-packages.git;$TRAVIS_BRANCH
src-git libremap https://github.com/libremesh/libremap-agent.git
EOF
- docker run
--user 0:0
-v "/output:/home/build/openwrt/bin/packages/mips_24kc/libremesh"
-v "$(pwd)/feeds.conf.default:/home/build/openwrt/feeds.conf.default"
-v "$(pwd)/libremesh.sdk.config:/home/build/openwrt/config"
"$IMAGE_NAME" /bin/bash -c
"./scripts/feeds update -a && ./scripts/feeds install -p libremesh -a && cp /home/build/openwrt/config /home/build/openwrt/.config && make defconfig && make -j2"
deploy:
- provider: script
script:
- rsync --delete-after -L -r -v -e "sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $CI_PORT"
"/output/" "${CI_USER}@${CI_SERVER}:${CI_STORE_PATH}/$STORE_PATH/packages/"
on:
branch: master
- provider: script
script:
- rsync --rsync-path="mkdir -p ${CI_STORE_PATH}/$STORE_PATH/branches/$TRAVIS_BRANCH/ && rsync"
--delete-after -L -r -v
-e "sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $CI_PORT"
"/output/" "${CI_USER}@${CI_SERVER}:${CI_STORE_PATH}/$STORE_PATH/branches/$TRAVIS_BRANCH/"
on:
all_branches: true
condition: $TRAVIS_BRANCH != master
#after_success:
# - bash <(curl -s https://codecov.io/bash)