Skip to content

Update build-openwrt.yml #49

Update build-openwrt.yml

Update build-openwrt.yml #49

Workflow file for this run

name: Build OpenWRT in Github owned Actions
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up environment
run: |
sudo apt update
sudo apt install -y build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev python3-setuptools rsync swig unzip zlib1g-dev file wget coreutils ccache
#sudo yum groupinstall "Development Tools" -y
#sudo yum install cmake ncurses-devel zlib-devel gcc gcc-c++ patch unzip bzip2 gettext perl-Data-Dumper rsync -y
#sudo yum install git subversion gawk libtool zlib-devel gcc make ncurses-devel patch wget bzip2 flex bison gperf python3 python3-pip python3-setuptools -y
#sudo yum install glibc-devel glibc-static texinfo expat-devel gettext-devel openssl-devel -y
#sudo yum install perl perl-CPAN -y
#sudo cpan IPC::Cmd
#yes
- name: Configure ccache
uses: hendrikmuhs/[email protected]
- name: Cache OpenWRT dl folder
uses: actions/cache@v3
with:
path: $GITHUB_WORKSPACE/dl
key: ${{ runner.os }}-openwrt-dl-${{ hashFiles('$GITHUB_WORKSPACE/feeds.conf.default') }}
restore-keys: |
${{ runner.os }}-openwrt-dl-
- name: Cache OpenWRT build_dir
uses: actions/cache@v3
with:
path: $GITHUB_WORKSPACE/build_dir
key: ${{ runner.os }}-openwrt-build-${{ hashFiles('$GITHUB_WORKSPACE/.config') }}
restore-keys: |
${{ runner.os }}-openwrt-build-
- name: Clone OpenWRT
run: |
cd $GITHUB_WORKSPACE
./scripts/feeds update -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
cd $GITHUB_WORKSPACE/package
git clone https://github.com/jerrykuku/luci-theme-argon.git
- name: Configure .config
run: |
cd $GITHUB_WORKSPACE
rm -rf .config
printf "%s\n" \
"CONFIG_ALL_KMODS=y" \
"CONFIG_ALL_NONSHARED=y" \
"CONFIG_TARGET_mediatek_filogic_DEVICE_xiaomi_mi-router-ax3000t=y" \
"CONFIG_TARGET_mediatek_filogic=y" \
"CONFIG_TARGET_mediatek=y" \
"CONFIG_ZRAM_DEF_COMP_ZSTD=y" \
"CONFIG_FEED_luci=y" \
"CONFIG_FEED_packages=y" \
"CONFIG_FEED_routing=y" \
"CONFIG_FEED_telephony=y" \
"CONFIG_PACKAGE_wpad=y" \
"CONFIG_LUCI_LANG_zh_Hans=y" \
"CONFIG_PACKAGE_luci-app-firewall=y" \
"CONFIG_PACKAGE_luci-app-opkg=y" \
"CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_BBR_CCA=y" \
"CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_NFT_FULLCONE=y" \
"CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_OFFLOADING=y" \
"CONFIG_PACKAGE_luci-base=y" \
"CONFIG_PACKAGE_luci-i18n-base-zh-cn=y" \
"CONFIG_PACKAGE_luci-i18n-dashboard-zh-cn=y" \
"CONFIG_PACKAGE_luci-i18n-firewall-zh-cn=y" \
"CONFIG_PACKAGE_luci-i18n-opkg-zh-cn=y" \
"CONFIG_PACKAGE_luci-lib-base=y" \
"CONFIG_PACKAGE_luci-lib-ip=y" \
"CONFIG_PACKAGE_luci-lib-jsonc=y" \
"CONFIG_PACKAGE_luci-lib-nixio=y" \
"CONFIG_PACKAGE_luci-light=y" \
"CONFIG_PACKAGE_luci-lua-runtime=y" \
"CONFIG_PACKAGE_luci-mod-admin-full=y" \
"CONFIG_PACKAGE_luci-mod-dashboard=y" \
"CONFIG_PACKAGE_luci-mod-network=y" \
"CONFIG_PACKAGE_luci-mod-status=y" \
"CONFIG_PACKAGE_luci-mod-system=y" \
"CONFIG_PACKAGE_luci-proto-ipv6=y" \
"CONFIG_PACKAGE_luci-proto-ppp=y" \
"CONFIG_PACKAGE_luci-theme-argon=y" \
"CONFIG_PACKAGE_luci-theme-bootstrap=y" \
"CONFIG_PACKAGE_luci=y" \
"CONFIG_PACKAGE_luci-theme-openwrt-2020=y" \
"CONFIG_PACKAGE_zram-swap=y" \
"CONFIG_PACKAGE_btop=y" \
"CONFIG_BPF=y" \
"CONFIG_BPF_SYSCALL=y" \
"CONFIG_BPF_JIT=y" \
"CONFIG_CGROUPS=y" \
"CONFIG_KPROBES=y" \
"CONFIG_NET_INGRESS=y" \
"CONFIG_NET_EGRESS=y" \
"CONFIG_NET_SCH_INGRESS=m" \
"CONFIG_NET_CLS_BPF=m" \
"CONFIG_NET_CLS_ACT=y" \
"CONFIG_BPF_STREAM_PARSER=y" \
"CONFIG_DEBUG_INFO=y" \
"# CONFIG_DEBUG_INFO_REDUCED is not set" \
"CONFIG_DEBUG_INFO_BTF=y" \
"CONFIG_KPROBE_EVENTS=y" \
"CONFIG_BPF_EVENTS=y" \
"CONFIG_PACKAGE_wpad-wolfssl=m" \
"CONFIG_PACKAGE_kmod=y" \
"CONFIG_CCACHE=y" \
> .config
make defconfig
- name: Build OpenWRT
run: |
cd $GITHUB_WORKSPACE
make -j$(nproc) V=s || make V=s
- name: Upload firmware
uses: actions/upload-artifact@v2
with:
name: openwrt-firmware
path: |
bin/targets/*