From 8c888e703cd51ddf0bb64ae3f4f0dc2d663fa539 Mon Sep 17 00:00:00 2001 From: klever1988 <56048681+klever1988@users.noreply.github.com> Date: Wed, 19 Feb 2020 13:43:25 +0800 Subject: [PATCH] Create r1s_lean.yml --- .github/workflows/r1s_lean.yml | 97 ++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 .github/workflows/r1s_lean.yml diff --git a/.github/workflows/r1s_lean.yml b/.github/workflows/r1s_lean.yml new file mode 100644 index 0000000..5845f00 --- /dev/null +++ b/.github/workflows/r1s_lean.yml @@ -0,0 +1,97 @@ +name: r1s Lean版openwrt + +on: + push: + paths: + - '.github/workflows/r1s_lean.yml' + schedule: + - cron: '10 10 * * *' + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@master + with: + ref: master + + - name: Initialization Environment + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo rm -rf /etc/apt/sources.list.d + sudo apt-get update + sudo apt-get -y install bc build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler + wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash + sudo rm -rf /usr/share/dotnet /usr/local/lib/android/sdk + + - name: Install Repo + run: | + git clone https://github.com/friendlyarm/repo + sudo cp repo/repo /usr/bin/ + + - name: Init Source + run: | + mkdir friendlywrt-h5 + cd friendlywrt-h5 + repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master -m h5.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle + repo sync -c --no-clone-bundle + + - name: Mods + run: | + cd friendlywrt-h5 + . ../remove_used_config.sh + sed -i '/iptparser/d' configs/config_h5 + echo ' + CONFIG_OPENSSL_ENGINE_BUILTIN=y + CONFIG_OPENSSL_WITH_DTLS=y + CONFIG_OPENSSL_WITH_EC2M=y + CONFIG_OPENSSL_WITH_NPN=y + # CONFIG_PACKAGE_kmod-cryptodev is not set + # CONFIG_PACKAGE_libopenssl-devcrypto is not set + CONFIG_PACKAGE_luci-app-smartdns=y + CONFIG_PACKAGE_luci-i18n-smartdns-zh-cn=y + CONFIG_PACKAGE_luci-theme-argon=y + CONFIG_PACKAGE_luci-theme-material=y + CONFIG_PACKAGE_luci-theme-netgear=y + CONFIG_PACKAGE_smartdns=y + # CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO is not set + # CONFIG_PACKAGE_kmod-cryptodev is not set' >> configs/config_h5 + # CONFIG_V2RAY_COMPRESS_UPX is not set + 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/lede && git fetch upstream + git rebase 90bb1cf9c33e73de5019686b8bd495f689e675a4^ --onto upstream/master -X theirs + git checkout upstream/master -- feeds.conf.default + git commit -m 'update feeds' && git apply ../../0001-fix-upx.patch + + - name: Clean Feeds + run: | + cd friendlywrt-h5/friendlywrt + ./scripts/feeds clean -a + + - name: Build FriendlyWrt + run: | + cd friendlywrt-h5 + sed -i 's/set -eu/set -u/' scripts/mk-friendlywrt.sh + ./build.sh nanopi_r2s.mk + + - name: Zip Files + run: | + gzip friendlywrt-h5/out/*.img + - name: Assemble Artifact + run: | + rm -rf ./artifact/ + mkdir -p ./artifact/ + mv friendlywrt-h5/out/*img* ./artifact/ + cp friendlywrt-h5/friendlywrt/.config ./artifact/ + - name: Upload Artifact + uses: actions/upload-artifact@master + with: + name: FriendlyWrt_NanoPi-R1S + path: ./artifact/