Skip to content

Build_ipq807x_ax9000_61 #48

Build_ipq807x_ax9000_61

Build_ipq807x_ax9000_61 #48

name: Build_ipq807x_ax9000_61
on:
repository_dispatch:
workflow_dispatch:
# 定时触发编译
schedule:
- cron: 15 18 * * 5
# 点赞☆Star触发编译
# watch:
# types: [started]
jobs:
Build_ipq807x_ax9000_61:
runs-on: ubuntu-20.04
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo timedatectl set-timezone "Asia/Shanghai"
sudo -E swapoff -a
sudo -E rm -f /swapfile
sudo -E docker image prune -a -f
sudo -E snap set system refresh.retain=2
sudo -E apt-get -y purge dotnet* firefox ghc* google* hhvm llvm* mono* mysql* openjdk* php* zulu*
sudo -E apt-get -y autoremove --purge
sudo -E rm -rf /usr/share/dotnet /usr/local/lib/android/sdk /etc/mysql /etc/php /usr/local/share/boost
[ -n "$AGENT_TOOLSDIRECTORY" ] && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo -E apt-get update -y
sudo -E apt-get install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev libfuse-dev python3-setuptools g++ file clang
pip install aligo
sudo -E apt-get clean
git config --global user.name 'GitHub Actions' && git config --global user.email '[email protected]'
df -h
- name: Clone source code
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
cp -f ../diy/lean/lean1.sh ./
chmod +x ./lean1.sh && ./lean1.sh
- name: Update & Install feeds
working-directory: ./openwrt
run: |
./scripts/feeds update -a
./scripts/feeds install -a
cp -f ../diy/lean/lean2.sh ./
chmod +x ./lean2.sh && ./lean2.sh
sed -i "s/KERNEL_PATCHVER:=*.*/KERNEL_PATCHVER:=6.1/g" target/linux/qualcommax/Makefile
sed -i "s/KERNEL_TESTING_PATCHVER:=*.*/KERNEL_TESTING_PATCHVER:=6.1/g" target/linux/qualcommax/Makefile
sed -i "s/DISTRIB_DESCRIPTION='*.*'/DISTRIB_DESCRIPTION='AE86Wrt-Xiaomi-AX9000-$(date +%Y%m%d)'/g" package/lean/default-settings/files/zzz-default-settings
- name: Configuration Customization - Build_ipq807x_ax9000_61
env:
CONFIG_FILE: './configs/ARM/ipq/ax9000_61.config'
run: |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
cd openwrt && make defconfig
- name: Download package
working-directory: ./openwrt
run: |
make download -j$(nproc)
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build firmware
working-directory: ./openwrt
run: |
make -j$(nproc) V=s
- name: Assemble Artifact
id: assemble_artifact
run: |
rm -rf ./ARM_Out
mkdir -p ./ARM_Out/
cp -a ./openwrt/.config ./ARM_Out/ax9000_61.config
getmd5()
{
md5sum=`md5sum $1`
md5=`echo ${md5sum% *}`
md5=`echo ${md5:0:10}`
}
rom=openwrt/bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-xiaomi_ax9000-squashfs-sysupgrade.bin
getmd5 $rom
cp -a $rom ./ARM_Out/AE86Wrt-Xiaomi-AX9000-6.1-2305-sysupgrade-$(date +%Y%m%d)_${md5}.bin
rom=openwrt/bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-xiaomi_ax9000-squashfs-factory.ubi
getmd5 $rom
cp -a $rom ./ARM_Out/AE86Wrt-Xiaomi-AX9000-6.1-2305-factory-$(date +%Y%m%d)_${md5}.ubi
- name: Upload Firmwares
uses: actions/upload-artifact@main
with:
name: AX9000-OpenWrt
path: ARM_Out/AE86*
- name: Upload config
uses: actions/upload-artifact@main
with:
name: AX9000-config
path: ARM_Out/ax9000_61.config
- name: Upload Packages
uses: actions/upload-artifact@main
with:
name: AX9000-61-Packages
path: openwrt/bin/packages
- name: Generate Tag & Release Name
id: generate_name
run: |
time=$(date +%Y%m%d%H%M%S)
release_tag="$time"
release_name="小米AX9000-6.1内核-2305-$(date +%Y%m%d)"
echo "release_name=$release_name" >> $GITHUB_OUTPUT
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT
- name: Create Release & Upload
uses: ncipollo/[email protected]
with:
artifacts: ARM_Out/AE86*
name: ${{ steps.generate_name.outputs.release_name }}
tag: ${{ steps.generate_name.outputs.release_tag }}
token: ${{ secrets.GITHUB_TOKEN }}