Skip to content

Build Padavan

Build Padavan #2

Workflow file for this run

#修改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
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/1050495008/rt-n56u.git /opt/rt-n56u
cd /opt/rt-n56u/toolchain-mipsel
sh dl_toolchain.sh
mkdir -p /opt/images/
- name: Build Firmware
env:
TNAME: CR660x
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_OPENSSL_EXE=n/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y/g' .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