From 4d449ee6c6dc68efeb41b141acd600308b90fd4a Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Thu, 23 Jul 2020 12:29:55 +0800 Subject: [PATCH] Create AutoBuild_NEWIFI_D2.yml --- .github/workflows/AutoBuild_NEWIFI_D2.yml | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/AutoBuild_NEWIFI_D2.yml diff --git a/.github/workflows/AutoBuild_NEWIFI_D2.yml b/.github/workflows/AutoBuild_NEWIFI_D2.yml new file mode 100644 index 0000000..ea6ae80 --- /dev/null +++ b/.github/workflows/AutoBuild_NEWIFI_D2.yml @@ -0,0 +1,101 @@ +#================================================= +# Description: Build OpenWrt using GitHub Actions +# Lisence: MIT +# Author: P3TERX,eSirPlayground +# Modify: Hyy2001 +#================================================= + +name: AutoBuild_NEWIFI_D2 + +on: + release: + types: [published] + + #push: + # branches: + # - master + + #schedule: + # - cron: 0 8 * * 5 + + #watch: + # types: [started] + +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` + echo "Deleting files, please wait ..." + sudo rm -rf \ + /usr/share/dotnet \ + /etc/mysql \ + /etc/php + sudo -E apt-get -y purge \ + azure-cli \ + ghc* \ + zulu* \ + hhvm \ + llvm* \ + firefox \ + google* \ + dotnet* \ + powershell \ + openjdk* \ + mysql* \ + php* + sudo -E apt-get update + sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 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 g++-multilib antlr3 gperf wget swig + sudo -E apt-get -y autoremove --purge + sudo -E apt-get clean + + - 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 + sed -i "s/#src-git helloworld/src-git helloworld/g" feeds.conf.default + + - name: Update & Install feeds + working-directory: ./openwrt + run: | + ./scripts/feeds update -a + ./scripts/feeds install -a + ./scripts/feeds install -a + + - name: Configuration Customization - AutoBuild_NEWIFI_D2 + env: + CONFIG_FILE: '.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 -j$(nproc) + 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 -j$(nproc) V=s + + - name : Upload artifact + uses: actions/upload-artifact@master + with: + name: OpenWrt + path: openwrt/bin