-
Notifications
You must be signed in to change notification settings - Fork 35
109 lines (93 loc) · 3.15 KB
/
R1S-H5-Autobuild.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#=================================================
# Description: NanoPi R1S-H5 OpenWrt 19.07 Autobuild
# Lisence: MIT
# Author: tjuyy
#=================================================
name: NanoPi R1S-H5 OpenWrt 19.07 Autobuild
on:
release:
types: [published]
push:
branches:
- master
paths:
- "R1S-H5.diffconfig"
# schedule:
# - cron: 0 8 * * 5
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo -E apt-get update
sudo -E apt-get clean
sudo wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash
sudo -E apt-get -y install bc
- name: Clone Lean's OpenWrt source code
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: git clone --depth 1 $REPO_URL -b $REPO_BRANCH lede
- name: Clone Friendlyarm's OpenWrt source code
env:
BRANCH: master
run: |
git clone https://github.com/friendlyarm/repo
sudo cp repo/repo /usr/bin/
mkdir friendlywrt-h5
cd friendlywrt-h5
repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b $BRANCH -m h5.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle
repo sync -c --no-clone-bundle -j$(nproc)
- name: Merge Lean's OpenWrt source
run: |
cd friendlywrt-h5/friendlywrt
cp -r ../../lede/package/lean package/
sed -i 's/dnsmasq /dnsmasq-full default-settings luci /' include/target.mk
- name: Update and install feeds
run: |
cd friendlywrt-h5/friendlywrt
./scripts/feeds update -a
./scripts/feeds install -a
- name: Load custom configuration
env:
CONFIG_FILE: "R1S-H5.diffconfig"
run: |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE friendlywrt-h5/friendlywrt/.config
cd friendlywrt-h5/friendlywrt
make defconfig
- name: Download package
if: always()
run: |
cd friendlywrt-h5/friendlywrt
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build
if: always()
run: |
cd friendlywrt-h5
echo "Start building..."
./build.sh nanopi_r1s.mk
- name: Zip Files
if: always()
run: |
find friendlywrt-h5/out/ -name "FriendlyWrt_*img*" | xargs -i zip -r {}.zip {}
- name: Assemble Artifact
if: always()
run: |
rm -rf ./artifact/
mkdir -p ./artifact/
find friendlywrt-h5/out/ -name "FriendlyWrt_*img.zip*" | xargs -i mv -f {} ./artifact/
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@master
with:
name: FriendlyWrt_NanoPi-R1S
path: ./artifact/