Build Padavan #36
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
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 update | |
sudo apt install -y 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: | | |
sudo git clone --depth=1 https://github.com/hanwckf/rt-n56u.git /opt/rt-n56u | |
cd /opt/rt-n56u/toolchain-mipsel | |
sudo ./dl_toolchain.sh | |
sudo mkdir -p /opt/images/ | |
- name: Build Firmware | |
env: | |
TNAME: K2P_nano-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 | |
sudo ./clear_tree | |
sudo ./build_firmware_modify $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 |