Skip to content

Openwrt Build Bot

Openwrt Build Bot #69

Workflow file for this run

name: Openwrt Build Bot
on:
push:
branches: master
schedule:
- cron: 0 20 * * 4
jobs:
buildpkg:
name: Build Openwrt Package
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
SDK_URL:
#- https://downloads.openwrt.org/releases/22.03.5/targets/ipq806x/generic/openwrt-sdk-22.03.5-ipq806x-generic_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz
#- https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/openwrt-sdk-22.03.5-ipq40xx-generic_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz
#- https://downloads.openwrt.org/releases/22.03.5/targets/ramips/mt7621/openwrt-sdk-22.03.5-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz
#- https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/openwrt-sdk-22.03.5-ath79-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz
#- https://downloads.openwrt.org/releases/22.03.5/targets/ath79/nand/openwrt-sdk-22.03.5-ath79-nand_gcc-11.2.0_musl.Linux-x86_64.tar.xz
- https://downloads.openwrt.org/releases/22.03.5/targets/x86/64/openwrt-sdk-22.03.5-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz
- https://downloads.openwrt.org/releases/22.03.5/targets/rockchip/armv8/openwrt-sdk-22.03.5-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz
steps:
- uses: actions/checkout@master
- name: Env for Openwrt SDK
run: sudo apt install -y libev-dev libc-ares-dev libudns-dev libncurses-dev
- name: Download Openwrt SDK
env:
SDK_URL: ${{ matrix.SDK_URL }}
run: |
SDK_HOME=$(head -c -8 <<< $(basename $SDK_URL))
wget $SDK_URL
tar xf $(basename $SDK_URL) -C ~/
mv ~/$SDK_HOME ~/sdk
cp key-build ~/sdk/
- name: Download Packages
run: |
cd ~/sdk
echo 'src-git ssrp https://github.com/fw876/helloworld.git' >> feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install -a -f -p ssrp
- name: Compile
run: |
cd ~/sdk
# enable all packages
echo 'CONFIG_PACKAGE_luci-app-ssr-plus=m' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_NONE_Client=y' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Libev_Client is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Rust_Client is not set' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_NONE_Server=y' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Libev_Server is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Rust_Server is not set' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_NONE_V2RAY=y' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_V2ray is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Xray is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_SagerNet_Core is not set' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ChinaDNS_NG=y' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Hysteria is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_IPT2Socks is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Kcptun is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_NaiveProxy is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Redsocks2 is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Simple_Obfs is not set' >> .config
echo '# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_V2ray_Plugin is not set' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Libev_Client=y' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Libev_Server=y' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Trojan=y' >> .config
echo 'CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Tuic_Client=y' >> .config
echo 'CONFIG_PACKAGE_luci-i18n-ssr-plus-zh-cn=m' >> .config
make defconfig
# build packages
make package/luci-app-ssr-plus/compile V=s
make package/index
- name: Upload
env:
SDK_URL: ${{ matrix.SDK_URL }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
TAG=$(sed -n 's/.*targets\/\(\w*\)\/\(\w*\)\/.*/packages\/\1\/\2/p' <<< $SDK_URL)
# Upload base only
cd ~/sdk/bin/packages/*/ssrp
git init
git config user.name "bot"
git config user.email "[email protected]"
git add .
git commit -m "$TAG$(TZ='Asia/Shanghai' date +@%Y%m%d)"
git push --force --quiet "https://[email protected]/zlwu/helloworld-dist.git" HEAD:$TAG