My_Build_x86_64 #19
This file contains hidden or 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: My_Build_x86_64 | |
# Add a button to trigger the workflow | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
docker rmi `docker images -q` | |
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android | |
sudo -E apt-mark hold grub-efi-amd64-signed | |
sudo -E apt update | |
sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap* | |
sudo -E apt -y full-upgrade | |
sudo -E apt -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 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 systemctl daemon-reload | |
sudo -E apt -y autoremove --purge | |
sudo -E apt clean | |
sudo -E timedatectl set-timezone "Asia/Shanghai" | |
- 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 | |
echo "src-git ssrp https://github.com/fw876/helloworld.git" >> ./feeds.conf.default | |
echo "src-git darkmatter https://github.com/apollo-ng/luci-theme-darkmatter.git" >> ./feeds.conf.default | |
- name: Update & Install feeds | |
working-directory: ./openwrt | |
run: | | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
#- 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: 'my_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 -j4 | |
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 -j1 V=s | |
- name : Upload artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: OpenWrt | |
path: openwrt/bin |