forked from esirplayground/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (86 loc) · 3.19 KB
/
Build_OP_Redmi_AC2100.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#=================================================
# Description: Build OpenWrt using GitHub Actions
# Lisence: MIT
# Author: eSirPlayground
# Youtube Channel: https://goo.gl/fvkdwm
#=================================================
name: Build_Redmi_AC2100
# Add a button to trigger the workflow
on:
repository_dispatch:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
set +e
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 ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
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
echo "src-git ssrp https://github.com/fw876/helloworld.git" >> ./feeds.conf.default
- name: Update & Install feeds
working-directory: ./openwrt
run: |
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install -a
#- name: Import external feeds - JerryKuKu Argon
# working-directory: ./openwrt
# run: |
# git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon-jerrykuku
- name: Configuration Customization - Build_Redmi_AC2100
env:
CONFIG_FILE: 'redmi_ac2100.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