Build_Newifi-D2_23.05 #2
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
#================================================= | |
# Description: Build OpenWrt using GitHub Actions | |
# Lisence: MIT | |
# Author: eSirPlayground | |
# Youtube Channel: https://goo.gl/fvkdwm | |
#================================================= | |
name: Build_Newifi-D2_23.05 | |
on: | |
# repository_dispatch: | |
workflow_dispatch: | |
# release: | |
# types: [published] | |
#push: | |
# branches: | |
# - master | |
#schedule: | |
# - cron: 0 8 * * 5 | |
#watch: | |
# types: [started] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set +e | |
docker rmi `docker images -q` | |
echo "Deleting files, please wait ..." | |
sudo rm -rf \ | |
/usr/share/dotnet \ | |
/etc/mysql \ | |
/etc/php | |
sudo -E apt-get -y purge \ | |
azure-cli \ | |
ghc* \ | |
zulu* \ | |
hhvm \ | |
llvm* \ | |
firefox \ | |
google* \ | |
dotnet* \ | |
powershell \ | |
openjdk* \ | |
mysql* \ | |
php* | |
sudo -E apt-get -qq update | |
sudo -E apt-get -qq full-upgrade | |
sudo -E apt-get -y -qq install sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib g++-multilib git gnutls-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool lld llvm lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply python3-docutils python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev | |
sudo -E apt-get -y autoremove --purge | |
sudo -E apt-get clean | |
- name: Clone source code | |
env: | |
REPO_URL: https://github.com/immortalwrt/immortalwrt | |
REPO_BRANCH: openwrt-23.05 | |
run: | | |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt | |
cd openwrt | |
echo "src-git ssrp https://github.com/fw876/helloworld.git" >> ./feeds.conf.default | |
- name: Update & Install feeds | |
working-directory: ./openwrt | |
run: | | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
./scripts/feeds install -a | |
curl -sSL https://raw.githubusercontent.com/chenmozhijin/turboacc/luci/add_turboacc.sh -o add_turboacc.sh && bash add_turboacc.sh | |
#- name: Import external feeds - passwall | |
# working-directory: ./openwrt | |
# run: | | |
# git clone https://github.com/xiaorouji/openwrt-passwall.git package/lienol | |
# git clone "your_github_link" package/"your_folder_name" | |
#- name: Import external feeds - JerryKuKu Argon | |
# working-directory: ./openwrt | |
# run: | | |
# git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon-jerrykuku | |
- name: Configuration Customization | |
env: | |
CONFIG_FILE: '.config23.05' | |
run: | | |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config | |
chmod +x ./customize.sh && ./customize.sh | |
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: | | |
echo -e "$(nproc) thread build." | |
make -j$(nproc) V=s | |
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV | |
- name : Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: immortalwrt_23.05${{ env.FILE_DATE }} | |
path: openwrt/bin/targets/ramips/mt7621 |