forked from chongshengB/Padavan-build
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (92 loc) · 4.13 KB
/
build-padavan.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
#修改TNAME: K2P 中的K2P为你需要编译的型号,注意名称要与configs/templates/目录下的名字相同
name: Build Padavan
on:
release:
types: [published]
push:
tags:
- 'v*'
# branches:
# - master
# schedule:
# - cron: 0 8 * * 5
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-20.04
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get -y install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd fakeroot \
cpio git python-docutils gettext automake autopoint texinfo build-essential help2man \
pkg-config zlib1g-dev libgmp3-dev libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget
- name: Clone source code
run: |
git clone --depth=1 https://github.com/SturdyCat/Padavan.git /opt/rt-n56u
cd /opt/rt-n56u/toolchain-mipsel
sh dl_toolchain.sh
mkdir -p /opt/images/
- name: Build Firmware
env:
TNAME: NEWIFI3
run: |
cd /opt/rt-n56u/trunk
if [ ! -f configs/templates/$TNAME.config ] ; then
echo "configs/templates/$TNAME.config not found "
exit 1
fi
cp -f configs/templates/$TNAME.config .config
#########################################################################################
sed -i "s/CONFIG_FIRMWARE_INCLUDE_QOS=n/CONFIG_FIRMWARE_INCLUDE_QOS=y/g" .config
sed -i "s/CONFIG_FIRMWARE_INCLUDE_IFB=n/CONFIG_FIRMWARE_INCLUDE_IFB=y/g" .config
echo "CONFIG_FIRMWARE_INCLUDE_SFE=y" >> .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS/d" .config
echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y" >> .config #科学上网插件
sed -i "/CONFIG_FIRMWARE_INCLUDE_XRAY/d" .config
echo "CONFIG_FIRMWARE_INCLUDE_XRAY=y" >> .config #集成xray执行文件 ~4.5M
sed -i "/CONFIG_FIRMWARE_INCLUDE_SMARTDNS/d" .config
echo "CONFIG_FIRMWARE_INCLUDE_SMARTDNS=y" >> .config #smartdns
sed -i "/CONFIG_FIRMWARE_INCLUDE_OPENVPN/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_XUPNPD/d" .config
sed -i "/CONFIG_FIRMWARE_ENABLE_FUSE/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_AUDIO/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_UVC/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_ARIA/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_ARIA_WEB_CONTROL/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_TROJAN/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_WYY/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_LPRD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_FTPD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SMBD36/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SMBD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION_WEB_CONTROL/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_WIREGUARD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SOCAT/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SRELAY/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_MTR/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_RTL_SDR/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_DUMP1090/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_TTYD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT/d" .config
sed -i "/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER/d" .config
cp -f .config configs/templates/$TNAME.config
#########################################################################################
sudo ./clear_tree
sudo ./build_firmware_modify $TNAME 0
sudo mv -f images/*.trx /opt/images/
- name : Upload packages
uses: actions/upload-artifact@master
if: always()
with:
name: Padavan-packages
path: /opt/images