forked from esirplayground/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 4.43 KB
/
Build_OP_Nanopi_R4S.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
name: Build_NanoPi_R4S
# Add a button to trigger the workflow
on:
repository_dispatch:
workflow_dispatch:
jobs:
OpenWrt-18_06:
runs-on: ubuntu-18.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Init Building Dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
set +e
docker rmi $(docker images -q)
sudo -E apt-get remove -y --purge azure-cli ghc zulu* hhvm llvm* firefox google* dotnet* powershell mysql* php* mssql-tools msodbcsql17 android*
sudo -E apt-get update -y
sudo -E apt-get full-upgrade -y
sudo -E apt-get install -y 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
for i in $(ls /usr/bin/*-8); do sudo -E ln -sf $i ${i%%-8*}; done
sudo -E ln -sf /usr/include/asm-generic /usr/include/asm
sudo -E apt-get autoremove -y --purge
sudo -E apt-get clean -y
sudo -E swapoff -a
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /usr/local/lib/android /opt/ghc /swapfile
- name: Server Benchmark
run: |
wget -qO- --no-check-certificate https://raw.githubusercontent.com/Kurokosama/serverbench/main/bench.sh | bash
- name: Clone Source
run: |
cd "/home/runner"
git clone --branch "openwrt-18.06-k5.4" --single-branch "https://github.com/immortalwrt/immortalwrt" "openwrt"
sudo chown -R runner:runner "openwrt"
cd "/home/runner/openwrt"
./scripts/feeds update -a
./scripts/feeds install -a
patch -p1 < "${GITHUB_WORKSPACE}/patches/1806-modify_for_r4s.patch"
- name: Build OpenWrt-18.06
run: |
cd "/home/runner/openwrt"
cp -f "${GITHUB_WORKSPACE}/Nanopi_R4S.config" ".config"
chmod +x ./customize.sh && ./customize.sh
make defconfig
make -j$[$(nproc)+1]
mv -f "bin/targets/rockchip/armv8/immortalwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz" "../immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz"
mv -f "bin/targets/rockchip/armv8/immortalwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz" "../immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz"
mv -f "bin/targets/rockchip/armv8/sha256sums" "../immortalwrt-18.06-sha256sums"
- name: Rebuild OpenWrt to Collect Error Log If Failed
if: failure()
run: |
cd "/home/runner/openwrt"
make -j1 V=s
mv -f "bin/targets/rockchip/armv8/immortalwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz" "../immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz"
mv -f "bin/targets/rockchip/armv8/immortalwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz" "../immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz"
mv -f "bin/targets/rockchip/armv8/sha256sums" "../immortalwrt-18.06-sha256sums"
- name: Upload OpenWrt-18.06 SHA256SUM Hash
uses: actions/upload-artifact@v2
with:
name: openwrt-18.06-sha256sums
path: /home/runner/openwrt-18.06-sha256sums
- name: Upload OpenWrt-18.06 EXT4 Firmware
uses: actions/upload-artifact@v2
with:
name: openwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz
path: /home/runner/immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz
- name: Upload OpenWrt-18.06 SquashFS Firmware
uses: actions/upload-artifact@v2
with:
name: openwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz
path: /home/runner/immortalwrt-18.06-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz
- name: Upload OpenWrt-18.06 IPK Packages
uses: actions/upload-artifact@v2
with:
name: IPK Packages
path: /home/runner/openwrt/bin/packages