forked from dunkeng/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 3.01 KB
/
Build_OP_wrt1200ac.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
name: Build_wrt1200ac
on:
release:
types: [published]
#push:
# branches:
# - master
# schedule:
# - cron: 0 19 * * *
# watch:
# types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php*
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php
sudo -E apt-get update
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
df -h
- name: Clone source code
env:
REPO_URL: git://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt
- name: Update & Install feeds
working-directory: ./openwrt
run: |
echo "src-git ssrp git://github.com/fw876/helloworld.git" >> ./feeds.conf.default
perl -pi -e 's/https/git/' ./feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install -a
- name: Configuration Customization - Build_wrt1200ac
run: |
cp -f wrt1200ac.config openwrt/.config
chmod +x ./customize_wrt1200ac.sh && ./customize_wrt1200ac.sh
cd openwrt && make defconfig
- name: Download package
working-directory: ./openwrt
run: |
make download -j8
find dl -size -1024c -exec rm -f {} \;
- name: Build firmware
working-directory: ./openwrt
run: |
echo -e "$(nproc) thread build."
# make -j$(nproc) V=s
make -j$(nproc)
echo "======================="
echo "Space usage:"
echo "======================="
df -h
echo "======================="
du -h --max-depth=1 ./ --exclude=build_dir --exclude=bin
du -h --max-depth=1 ./build_dir
du -h --max-depth=1 ./bin
- name: Assemble artifact
working-directory: ./openwrt
run: |
rm -rf ./artifact/
mkdir -p ./artifact/
# find ./bin/targets/ -name "*combined*img*" | xargs -i mv -f {} ./artifact/
# find ./bin/targets/ -name "*factory*img*" | xargs -i mv -f {} ./artifact/
find ./bin/targets/ -name "*sysupgrade*bin*" | xargs -i mv -f {} ./artifact/
- name : Upload artifact
uses: actions/upload-artifact@master
with:
name: OpenWrt
path: ./openwrt/artifact/