Build_HomLede_x86_64 #5
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_HomLede_x86_64 | |
on: | |
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` | |
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android | |
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* adoptopenjdk* mysql* php* mongodb* dotnet* moby* snapd* || true | |
sudo -E apt-get update | |
sudo -E apt-get -y install ack antlr3 aria2 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-pip libpython3-dev qemu-utils 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/xiaoqingfengATGH/HomeLede.git | |
REPO_BRANCH: k5 | |
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 | |
sed -i 's/#src-git helloworld/src-git helloworld/g' ./feeds.conf.default | |
- name: Update & Install feeds | |
working-directory: ./openwrt | |
run: | | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
./prepareCompile.sh | |
- name: Generate configuration file | |
working-directory: ./openwrt | |
run: make defconfig | |
#- 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 - Build_x86_64 | |
# env: | |
# CONFIG_FILE: 'x86_64.config' | |
# 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 | |
- name : Upload artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: OpenWrt | |
path: openwrt/bin |