forked from chongshengB/Padavan-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26daeef
commit e5c99d6
Showing
1 changed file
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#修改TNAME: K2P-5.0 中的K2P-5.0为你需要编译的型号,注意名称要与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-18.04 | ||
|
||
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 \ | ||
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 | ||
- name: Clone source code | ||
run: | | ||
git clone --depth=1 https://github.com/chongshengB/rt-n56u.git /opt/rt-n56u | ||
cd /opt/rt-n56u/toolchain-mipsel | ||
mkdir -p toolchain-3.4.x | ||
wget https://github.com/hanwckf/padavan-toolchain/releases/download/v1.0/mipsel-linux-uclibc.tar.xz | ||
tar -xvf mipsel-linux-uclibc.tar.xz -C toolchain-3.4.x | ||
mkdir -p /opt/images/ | ||
- name: Build Firmware | ||
env: | ||
TNAME: K2P-5.0 | ||
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 '/CONFIG_FIRMWARE_INCLUDE_MENTOHUST/d' .config #删除配置项MENTOHUST | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT/d' .config #删除配置项SCUTCLIENT | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS/d' .config #删除配置项SS plus+ | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_SSSERVER/d' .config #删除配置项SS server | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER/d' .config #删除配置项DNSFORWARDER | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_ADBYBY/d' .config #删除配置项adbyby plus+ | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_FRPC/d' .config #删除配置项adbyby plus+ | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_FRPS/d' .config #删除配置项adbyby plus+ | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_TUNSAFE/d' .config #删除配置项adbyby plus+ | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_PDNSD/d' .config #删除配置项Pdnsd | ||
sed -i '/CONFIG_FIRMWARE_INCLUDE_ALIDDNS/d' .config #删除配置项阿里DDNS | ||
###################################################################### | ||
#以下选项是定义你需要的功能(y=集成,n=忽略),重新写入到.config文件 | ||
###################################################################### | ||
echo "CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n" >> .config #MENTOHUST | ||
echo "CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=n" >> .config #SCUTCLIENT | ||
echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y" >> .config #SS plus+ | ||
echo "CONFIG_FIRMWARE_INCLUDE_SSSERVER=n" >> .config #SS server | ||
echo "CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=n" >> .config #DNSFORWARDER | ||
echo "CONFIG_FIRMWARE_INCLUDE_ADBYBY=y" >> .config #adbyby plus+ | ||
echo "CONFIG_FIRMWARE_INCLUDE_FRPC=n" >> .config #内网穿透FRPC | ||
echo "CONFIG_FIRMWARE_INCLUDE_FRPS=n" >> .config #内网穿透FRPS | ||
echo "CONFIG_FIRMWARE_INCLUDE_TUNSAFE=n" >> .config #TUNSAFE | ||
echo "CONFIG_FIRMWARE_INCLUDE_PDNSD=y" >> .config #DNS加速 | ||
echo "CONFIG_FIRMWARE_INCLUDE_ALIDDNS=y" >> .config #阿里DDNS | ||
######################################################################################### | ||
#自定义添加其它功能请参考源码configs/templates/目录下的config文件。按照上面的格式添加即可 | ||
#格式如下: | ||
#sed -i '/自定义项/d' .config | ||
#echo "自定义项=y" >> .config | ||
######################################################################################### | ||
sudo ./clear_tree | ||
sudo ./build_firmware_bkye $TNAME | ||
sudo mv -f images/*.trx /opt/images/ | ||
- name : Upload packages | ||
uses: actions/upload-artifact@master | ||
if: always() | ||
with: | ||
name: Padavan-packages | ||
path: /opt/images |