Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build-padavan.yml #11

Closed
wants to merge 13 commits into from
102 changes: 32 additions & 70 deletions .github/workflows/build-padavan.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,64 @@
#修改TNAME: K2P 中的K2P为你需要编译的型号,注意名称要与configs/templates/目录下的名字相同
name: Build Padavan
#修改TNAME: K2P中的K2P为你需要编译的型号,注意名称要与configs/templates/目录下的名称相同
名称:建造帕达文

on:
release:
types: [published]
types: [ 类型:[已发布]]
push:
tags:
- 'v*'
# branches:
# - master
# 分支机构:# branches:
# - 掌握# - master
# schedule:
# - cron: 0 8 * * 5
watch:
types: [started]
types: [ 类型:[开始]]

jobs:
build:
runs-on: ubuntu-18.04
if: github.event.repository.owner.id == github.event.sender.id
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
- name: - 名称:结帐
uses: 使用:actions/checkout@master
- name: - name: 初始化环境
env:
DEBIAN_FRONTEND: noninteractive
DEBIAN_FRONTEND: DEBIAN_FRONTEND:非交互式
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
- name: - 名称:克隆源代码
run: |
git clone --depth=1 https://github.com/MeIsReallyBa/padavan-4.4.git /opt/rt-n56u
cd /opt/rt-n56u/toolchain-mipsel
git clone --depth=1 https://github.com/sunnyguhz/Padavan.git /opt/PSG1218
cd /opt/PSG1218/toolchain-mipsel
sh dl_toolchain.sh
mkdir -p /opt/images/
- name: Build Firmware
env:
TNAME: K2P
run: |
cd /opt/rt-n56u/trunk
if [ ! -f configs/templates/$TNAME.config ] ; then
echo "configs/templates/$TNAME.config not found "
exit 1
fi
mkdir -p /opt/图像/
-名称:构建固件
环境:
名称: PSG1218
运行:|
cd /opt/PSG1218/trunk
如果 [ -f configs/templates/$TNAME.config ] ; 然后
echo“未找到配置/模板/$TNAME.config
1号出口
cp -f configs/templates/$TNAME.config .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=n/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y/g' .config
################################################################################################
#因不同型号配置功能不一样,所以先把配置项删除,如果你自己要添加其他的,也要写上删除这一条,切记!!!
################################################################################################
sed -i 's/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=y/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=n/g' .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_MENTOHUST=y/CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n/g' .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=y/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=n/g' .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_SRELAY=y/CONFIG_FIRMWARE_INCLUDE_SRELAY=n/g' .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=n/g' .config
######################################################################
#以下选项是定义你需要的功能(y=集成,n=忽略),重新写入到.config文件
######################################################################
##科学上网##
echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y" >> .config #科学上网插件,选择n后全部有关插件都不集成
echo "CONFIG_FIRMWARE_INCLUDE_XRAY=n" >> .config #集成xray执行文件 ~4.5M
echo "CONFIG_FIRMWARE_INCLUDE_V2RAY=n" >> .config #集成v2ray执行文件
echo "CONFIG_FIRMWARE_INCLUDE_TROJAN=y" >> .config #集成trojan执行文件 ~1.2M
echo "CONFIG_FIRMWARE_INCLUDE_SSOBFS=y" >> .config #simple-obfs混淆插件
##科学上网##

##广告管理##
echo "CONFIG_FIRMWARE_INCLUDE_ADBYBY=y" >> .config #adbyby plus+
##DNS服务##
echo "CONFIG_FIRMWARE_INCLUDE_SMARTDNS=n" >> .config #smartdns
echo "CONFIG_FIRMWARE_INCLUDE_ADGUARDHOME=n" >> .config #adg DNS去AD






##内网穿透服务##
echo "CONFIG_FIRMWARE_INCLUDE_ZEROTIER=y" >> .config #zerotier ~1.3M
echo "CONFIG_FIRMWARE_INCLUDE_ALIDDNS=y" >> .config #aliddns
echo "CONFIG_FIRMWARE_INCLUDE_DDNSTO=y" >> .config #ddnsto ~0.5M
echo "CONFIG_FIRMWARE_INCLUDE_WIREGUARD=y" >> .config #wireguard ~10k
##内网穿透服务##
echo "CONFIG_FIRMWARE_INCLUDE_ALDRIVER=y" >> .config #ALDRIVER ~3m
echo "CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n" >> .config #mentohust

##流控QOS##
echo "CONFIG_FIRMWARE_INCLUDE_SQM=y" >> .config #SQM QOS#CPU超频
echo "CONFIG_FIRMWARE_INCLUDE_OC=n" >> .config #CPU超频开关
echo 'CONFIG_FIRMWARE_MT7621_OC="0x312"' >> .config #此处填写对应频率的十六进制:1000Mhz=0x312 1100Mhz=0x362 1120Mhz=0x372 1200Mhz=0x3B2

#########################################################################################
#自定义添加其它功能请参考源码configs/templates/目录下的config文件。按照上面的格式添加即可
#格式如下:
#sed -i '/自定义项/d' .config
#echo "自定义项=y" >> .config
#########################################################################################
sudo ./clear_tree
须藤 ./clear_tree
sudo ./build_firmware_modify $TNAME 0
sudo mv -f images/*.trx /opt/images/
- name : Upload packages
sudo mv -f 图片/*.trx /opt/images/
- name :上传包
uses: actions/upload-artifact@master
if: always()
with:
Expand Down