diff --git a/.github/workflows/r2s_lean.yml b/.github/workflows/r2s_lean.yml index 0e0c9556ce..b89a25c5b0 100644 --- a/.github/workflows/r2s_lean.yml +++ b/.github/workflows/r2s_lean.yml @@ -2,8 +2,7 @@ name: r2s Lean版openwrt on: push: - branches: - - master + branches: [ master ] paths: - '.github/workflows/r2s_lean.yml' schedule: @@ -26,30 +25,13 @@ jobs: - name: Initialization Environment env: DEBIAN_FRONTEND: noninteractive - run: | - sudo rm -rf /etc/apt/sources.list.d - sudo apt-get update - sudo apt-get -y --no-install-recommends install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler - curl https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | sed '/#/d' | sed 's/\\//g' | sed 's/exit 0//g' | sed 's/sudo apt -y install//g' | sed 's/sudo apt-get -y install//g' | sed 's/:i386//g' | xargs sudo apt-get -y --no-install-recommends install - docker rmi `docker images -q` - sudo rm -rf /usr/share/dotnet /usr/local/lib/android/sdk /usr/local/share/boost /opt/ghc + run: . 1_initialization_environment.sh - - name: Install Repo - run: | - git clone https://github.com/friendlyarm/repo - sudo cp repo/repo /usr/bin/ - - - name: Init Source - run: | - mkdir friendlywrt-rk3328 - cd friendlywrt-rk3328 - repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v19.07.1 -m rk3328.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle --depth=1 - repo sync -c --no-tags --no-clone-bundle -j8 - cd friendlywrt/ && git fetch --unshallow + - name: Clone Source + run: . 2_clone_rouce.sh - name: Patch Kernel - run: | - . patch_kernel_5.4.sh + run: . patch_kernel_5.4.sh - name: Mods run: | @@ -60,34 +42,20 @@ jobs: cat ../base_rk3328.seed > configs/config_rk3328 echo '# CONFIG_V2RAY_COMPRESS_UPX is not set' >> configs/config_rk3328 cd friendlywrt - git config --local user.email "action@github.com" && git config --local user.name "GitHub Action" git remote add upstream https://github.com/coolsnowwolf/openwrt && git fetch upstream git checkout upstream/lede-17.01 -b tmp #git checkout 33f7cb735300bd9a099995236ed768c8925fec75 -- target/linux/sunxi/image/ git rm README.md git commit -m 'reset' - git checkout origin/master-v19.07.1 + git checkout master-v19.07.1 git rebase adc1a9a3676b8d7be1b48b5aed185a94d8e42728^ --onto tmp -X theirs rm -f target/linux/rockchip-rk3328/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch target/linux/generic/hack-4.14/999-net-patch-linux-kernel-to-support-shortcut-fe.patch sed -i '/ipv6/,+3d' package/base-files/files/root/setup.sh git checkout upstream/lede-17.01 -- feeds.conf.default sed -i -E 's/#(src-git.+)(helloworld.+)/\1\2/' feeds.conf.default - cd package/ && git clone https://github.com/destan19/OpenAppFilter.git && cd ../ cd package/lean/ - git clone https://github.com/NateLol/luci-app-oled - git clone https://github.com/rufengsuixing/luci-app-adguardhome - #git clone https://github.com/jerrykuku/lua-maxminddb.git - #git clone https://github.com/jerrykuku/luci-app-vssr.git - #cd luci-app-vssr/root/etc/ - #echo 'china_ssr.txt - #config/black.list - #config/white.list - #dnsmasq.oversea/oversea_list.conf - #dnsmasq.ssr/ad.conf - #dnsmasq.ssr/gfw_base.conf' | xargs rm - #cd ../../../ rm -rf luci-theme-argon - git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git + . ../../../../3_prepare_packages.sh cd ../../ git apply ../../enable_autocore.diff #git apply ../../fix_cpufreq.diff @@ -108,20 +76,10 @@ jobs: ./build.sh nanopi_r2s.mk cd .. && sudo bash fix_ownership.sh - - name: Zip Files - run: | - gzip friendlywrt-rk3328/out/*.img - name: Assemble Artifact id: assemble_artifact run: | - rm -rf ./artifact/ - mkdir -p ./artifact/ - mv friendlywrt-rk3328/out/*img* ./artifact/ - cp friendlywrt-rk3328/friendlywrt/.config ./artifact/ - cd ./artifact/ - md5sum *img* > md5sum.txt - cd .. - zip -r artifact.zip ./artifact/ + . x_assemble_artifact.sh release_tag="R2S-Lean-$(date +%Y-%m-%d)" echo "##[set-output name=release_tag;]$release_tag" - name: Create Release diff --git a/.github/workflows/r2s_lean_minimal-dev.yml b/.github/workflows/r2s_lean_minimal-dev.yml index cbf7d6b1c6..8d4268897d 100644 --- a/.github/workflows/r2s_lean_minimal-dev.yml +++ b/.github/workflows/r2s_lean_minimal-dev.yml @@ -38,8 +38,9 @@ jobs: cd friendlywrt-rk3328 . ../remove_unused_config.sh cat configs/config_rk3328 | grep "TARGET" >> ../base_rk3328.seed + cat ../minimal_config.seed >> ../base_rk3328.seed cat ../base_rk3328.seed > configs/config_rk3328 - cat ../minimal_config.seed >> configs/config_rk3328 + cd friendlywrt git remote add upstream https://github.com/project-openwrt/openwrt && git fetch upstream git checkout upstream/openwrt-19.07 -b tmp @@ -54,7 +55,6 @@ jobs: rm -rf luci-app-oled/ && git clone https://github.com/NateLol/luci-app-oled cd ../../ git apply ../../enable_autocore_ctcgfw.diff - #sed -i 's/@LINUX_5_4//' package/lean/luci-app-flowoffload/Makefile sed -i '/uci commit luci/i\uci set luci.main.mediaurlbase="/luci-static/argon"' package/lean/default-settings/files/zzz-default-settings sed -i '/exit/i\chown -R root:root /usr/share/netdata/web' package/lean/default-settings/files/zzz-default-settings sed -i '/exit/i\find /etc/rc.d/ -name *docker* -delete' package/lean/default-settings/files/zzz-default-settings diff --git a/.github/workflows/r2s_lean_minimal.yml b/.github/workflows/r2s_lean_minimal.yml index 9d68395913..faf23300e1 100644 --- a/.github/workflows/r2s_lean_minimal.yml +++ b/.github/workflows/r2s_lean_minimal.yml @@ -2,8 +2,7 @@ name: r2s Lean版openwrt minimal on: push: - branches: - - master + branches: [ master ] paths: - '.github/workflows/r2s_lean_minimal.yml' schedule: @@ -39,8 +38,9 @@ jobs: cd friendlywrt-rk3328 . ../remove_unused_config.sh cat configs/config_rk3328 | grep "TARGET" >> ../base_rk3328.seed + cat ../minimal_config.seed >> ../base_rk3328.seed cat ../base_rk3328.seed > configs/config_rk3328 - cat ../minimal_config.seed >> configs/config_rk3328 + cd friendlywrt git remote add upstream https://github.com/coolsnowwolf/openwrt && git fetch upstream git checkout upstream/lede-17.01 -b tmp @@ -53,10 +53,8 @@ jobs: git checkout upstream/lede-17.01 -- feeds.conf.default sed -i -E 's/#(src-git.+)(helloworld.+)/\1\2/' feeds.conf.default cd package/lean/ - git clone https://github.com/NateLol/luci-app-oled - git clone https://github.com/rufengsuixing/luci-app-adguardhome rm -rf luci-theme-argon - git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git + . ../../../../3_prepare_packages.sh cd ../../ git apply ../../enable_autocore.diff sed -i 's/@LINUX_5_4//' package/lean/luci-app-flowoffload/Makefile diff --git a/3_prepare_packages.sh b/3_prepare_packages.sh new file mode 100644 index 0000000000..de987c6bc3 --- /dev/null +++ b/3_prepare_packages.sh @@ -0,0 +1,5 @@ +git clone https://github.com/NateLol/luci-app-oled +git clone https://github.com/destan19/OpenAppFilter.git +git clone https://github.com/rufengsuixing/luci-app-adguardhome +git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git +git clone https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom