forked from esirplayground/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (154 loc) · 7.52 KB
/
Build_X86_64_kiddin9.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#=================================================
# Description: Build OpenWrt using GitHub Actions
# Lisence: MIT
# Author: eSirPlayground
# Youtube Channel: https://goo.gl/fvkdwm
#=================================================
name: Build_x86_64_kiddin9
on:
repository_dispatch:
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: 'true'
#push:
# branches:
# - master
#schedule:
# - cron: 0 8 * * 5
#watch:
# types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
set +e
docker rmi `docker images -q`
echo "Deleting files, please wait ..."
sudo rm -rf \
/usr/share/dotnet \
/etc/mysql \
/etc/php
sudo -E apt-get -y purge \
azure-cli \
ghc* \
zulu* \
hhvm \
llvm* \
firefox \
google* \
dotnet* \
powershell \
openjdk* \
mysql* \
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
- name: Clone source code
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV
echo "src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git" >> ./feeds.conf.default
#echo "src-git jerryk https://github.com/jerrykuku/openwrt-package.git" >> ./feeds.conf.default
- name: Update & Install feeds
#working-directory: ./openwrt
run: |
cd openwrt
./scripts/feeds update -a
rm -rf feeds/luci/themes/luci-theme-argon
#cd feeds/luci/applications
#rm -rf luci-app-accesscontrol luci-app-acme luci-app-adbyby-plus luci-app-airplay2 luci-app-aliyundrive-fuse luci-app-aliyundrive-webdav luci-app-amule \
# luci-app-argon-config luci-app-aria2 luci-app-arpbind luci-app-attendedsysupgrade luci-app-autoreboot luci-app-baidupcs-web luci-app-cifs-mount \
# luci-app-cpufreq luci-app-dawn luci-app-ddns luci-app-diskman luci-app-dnsforwarder luci-app-docker luci-app-dump1090 \
# luci-app-e2guardian luci-app-easymesh luci-app-filetransfer luci-app-frpc luci-app-frps luci-app-guest-wifi luci-app-haproxy-tcp \
# luci-app-ipsec-server luci-app-ipsec-vpnd luci-app-kodexplorer luci-app-ltqtapi luci-app-lxc luci-app-mosdns luci-app-music-remote-center \
# luci-app-mwan3 luci-app-mwan3helper luci-app-n2n luci-app-netdata luci-app-nfs luci-app-nps luci-app-ocserv luci-app-olsr-services luci-app-olsr-viz \
# luci-app-omcproxy luci-app-openvpn-server luci-app-pagekitec luci-app-pgyvpn luci-app-phtunnel luci-app-pppoe-relay luci-app-pptp-server \
# luci-app-ps3netsrv luci-app-pushbot luci-app-qbittorrent luci-app-ramfree luci-app-rclone luci-app-rp-pppoe-server luci-app-serverchan \
# luci-app-shadowsocks-libev luci-app-socat luci-app-softethervpn luci-app-squid luci-app-ssrserver-python luci-app-syncdial luci-app-transmission \
# luci-app-turboacc luci-app-udpxy luci-app-unblockmusic luci-app-unbound luci-app-upnp luci-app-usb-printer luci-app-uugamebooster luci-app-v2ray-server \
# luci-app-verysync luci-app-vlmcsd luci-app-vsftpd luci-app-watchcat luci-app-webadmin luci-app-webdav luci-app-wrtbwmon luci-app-xlnetacc luci-app-zerotier
cd $OPENWRTROOT/feeds/kiddin9
rm -rf homeproxy luci-app-acme luci-app-aliddns luci-app-apinger luci-app-bitsrunlogin-go luci-app-keepalived luci-app-lorawan-basicstation luci-app-oscam luci-app-unblockneteasemusic luci-app-unblockneteasemusic-go #luci-app-alist
cd $OPENWRTROOT
./scripts/feeds install -a
./scripts/feeds install -a
- name: Import external packages - sirpdboy and kenzok8
working-directory: ./openwrt
run: |
git clone https://github.com/kenzok8/openwrt-packages.git kenzo
git clone https://github.com/sirpdboy/sirpdboy-package.git sirpdboy
mkdir package/crarm
cp -r kenzo/luci-app-argonne-config package/crarm/luci-app-argonne-config
cp -r kenzo/luci-app-ikoolproxy package/crarm/luci-app-ikoolproxy
cp -r kenzo/luci-app-koolproxyR package/crarm/luci-app-koolproxyR
cp -r kenzo/luci-theme-argonne package/crarm/luci-theme-argonne
cp -r kenzo/luci-theme-atmaterial_new package/crarm/luci-theme-atmaterial_new
cp -r kenzo/luci-theme-ifit package/crarm/luci-theme-ifit
cp -r kenzo/luci-theme-mcat package/crarm/luci-theme-mcat
cp -r kenzo/luci-theme-neobird package/crarm/luci-theme-neobird
cp -r kenzo/luci-theme-opentopd package/crarm/luci-theme-opentopd
cp -r kenzo/luci-theme-tomato package/crarm/luci-theme-tomato
cp -r sirpdboy/luci-app-poweroffdevice package/crarm/luci-app-poweroffdevice
cp -r sirpdboy/luci-app-rebootschedule package/crarm/luci-app-rebootschedule
cp -r sirpdboy/luci-app-switch-lan-play package/crarm/luci-app-switch-lan-play
cp -r sirpdboy/switch-lan-play package/crarm/switch-lan-play
cp -r sirpdboy/luci-theme-btmod package/crarm/luci-theme-btmod
cp -r sirpdboy/luci-theme-opentomato package/crarm/luci-theme-opentomato
cp -r sirpdboy/luci-theme-opentomcat package/crarm/luci-theme-opentomcat
#- name: Import external feeds - JerryKuKu Argon
# working-directory: ./openwrt
# run: |
# git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon-jerrykuku
- name: Configuration Customization - Build_x86_64
env:
CONFIG_FILE: 'x86_64x.config'
run: |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
chmod +x ./customize.sh && ./customize.sh
cd openwrt && make defconfig
- name: SSH connection to Actions
uses: P3TERX/[email protected]
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
env:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
- name: make diffconfig
working-directory: ./openwrt
run: |
./scripts/diffconfig.sh > diffconfig
- name : Upload diffconfig
uses: actions/upload-artifact@master
with:
name: config
path: openwrt/diffconfig
- name: Download package
working-directory: ./openwrt
run: |
make download -j$(nproc)
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build firmware
working-directory: ./openwrt
run: |
echo -e "$(nproc) thread build."
make -j$(nproc) V=s
- name : Upload artifact
uses: actions/upload-artifact@master
with:
name: OpenWrt
path: openwrt/bin