Skip to content

Commit

Permalink
ci: add test build
Browse files Browse the repository at this point in the history
Signed-off-by: sbwml <[email protected]>
  • Loading branch information
sbwml committed Sep 23, 2024
1 parent 8468253 commit c579abb
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: sbwml/actions@openwrt-build-setup

- name: Install LLVM
uses: sbwml/actions@install-llvm
uses: sbwml/actions@install-llvm-19

- name: Compile OpenWrt
id: compile
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
echo y | aliyunpan logout
- name: Release OTA
uses: sbwml/FTP-Deploy-Action@master
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.ftp_address }}
username: ${{ matrix.model }}-minimal
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
uses: sbwml/actions@openwrt-build-setup

- name: Install LLVM
uses: sbwml/actions@install-llvm
uses: sbwml/actions@install-llvm-19

- name: Compile OpenWrt
id: compile
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
echo "<center><h1>x86_64 虚拟机平台镜像</h1></center>" > README.md
- name: Create release
uses: sbwml/release-action@main
uses: ncipollo/release-action@v1.14.0
with:
name: OpenWrt-${{ env.latest_release }}
allowUpdates: true
Expand All @@ -160,7 +160,7 @@ jobs:

- name: Release kmods
if: env.release_kmod == 'true'
uses: sbwml/release-action@main
uses: ncipollo/release-action@v1.14.0
with:
name: OpenWrt-${{ env.latest_release }}
allowUpdates: true
Expand Down Expand Up @@ -212,19 +212,19 @@ jobs:
export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan"
version=$(cat openwrt/version.txt)
if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then
aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-ext4-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-squashfs-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/manifest.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r4s-ext4-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r4s-squashfs-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/
elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then
aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/manifest.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r5c-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r5c-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r5s-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*-r5s-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/
elif [ "${{ matrix.model }}" = "x86_64" ]; then
aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/
Expand All @@ -239,10 +239,10 @@ jobs:
aliyunpan upload --timeout 30 --retry 10 --ow virtual_images/*.vhd openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/
aliyunpan upload --timeout 30 --retry 10 --ow virtual_images/*.qcow2 openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/
elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then
aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 30 --retry 10 --ow rom/*.chk openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/config.buildinfo openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/manifest.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow info/sha256sums.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
aliyunpan upload --timeout 20 --retry 10 --ow rom/*.chk openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/
fi
aliyunpan recycle delete -all
echo y | aliyunpan logout
Expand All @@ -254,7 +254,7 @@ jobs:
sshpass -p ${{ secrets.user_password }} ssh root@${{ secrets.ftp_address }} "/opt/sbin/fw-upload ${{ matrix.model }}"
- name: Release OTA
uses: sbwml/FTP-Deploy-Action@master
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.ftp_address }}
username: ${{ matrix.model }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: sbwml/actions@openwrt-build-setup

- name: Install LLVM
uses: sbwml/actions@install-llvm
uses: sbwml/actions@install-llvm-19

- name: Compile OpenWrt
id: compile
Expand Down
130 changes: 130 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Build Testing

on:
workflow_dispatch:

jobs:
build:
name: Build ${{ matrix.model }}-${{ matrix.tag.version }}
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
model:
- armv8
- nanopi-r4s
- nanopi-r5s
- x86_64
- netgear_r8500
tag:
- type: rc2
version: openwrt-23.05

steps:
- name: Setup variables
run: |
sudo timedatectl set-timezone 'Asia/Shanghai'
git config --global user.name 'actions'
git config --global user.email '[email protected]'
echo WORKDIR="/builder" >> "$GITHUB_ENV"
- name: Show system
run: |
echo -e "\n\e[1;32mCPU:\e[0m"
echo "$(grep 'model name' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}') ($(grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}')MHz) x $(grep processor /proc/cpuinfo | wc -l)"
echo -e "\n\e[1;32mMemory:\e[0m"
free -h
echo -e "\n\e[1;32mStorage:\e[0m"
df -Th / /mnt
echo -e "\n\e[1;32mSystem:\e[0m"
lsb_release -a
echo -e "\n\e[1;32mKernel:\e[0m"
uname -a
echo
- name: Free disk space
uses: sbwml/actions@free-disk
with:
build-mount-path: /builder

- name: Build System Setup
uses: sbwml/actions@openwrt-build-setup

- name: Install LLVM
uses: sbwml/actions@install-llvm-19

- name: Compile OpenWrt
id: compile
continue-on-error: true
working-directory: /builder
env:
git_password: ${{ secrets.ftp_password }}
run: |
[ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y
export TESTING_KERNEL=y BUILD_FAST=y ENABLE_OTA=y ENABLE_BPF=y ENABLE_LTO=y ENABLE_LRNG=y USE_GCC15=y ENABLE_MOLD=y
bash <(curl -sS ${{ secrets.script_url_general }}) ${{ matrix.tag.type }} ${{ matrix.model }}
cd openwrt
tags=$(git describe --abbrev=0 --tags)
echo "latest_release=$tags" >>$GITHUB_ENV
- name: Extensive logs after a failed compilation
if: steps.compile.outcome == 'failure'
working-directory: /builder
run: |
cd openwrt
make V=s
- name: Prepare Firmware Files
working-directory: /builder
run: |
mkdir -p rom info
if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then
cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/
cp -a openwrt/bin/targets/rockchip/*/*-r4s.manifest info/manifest.txt
cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo
cd rom && sha256sum * > ../info/sha256sums.txt
elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then
cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/
cp -a openwrt/bin/targets/rockchip/*/*.manifest info/manifest.txt
cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo
cd rom && sha256sum * > ../info/sha256sums.txt
elif [ "${{ matrix.model }}" = "x86_64" ]; then
cp -a openwrt/bin/targets/x86/*/*-ext4-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/x86/*/*-squashfs-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/x86/*/*-generic-rootfs.tar.gz rom/
cp -a openwrt/bin/targets/x86/*/*-x86-64-generic.manifest info/manifest.txt
cp -a openwrt/bin/targets/x86/*/config.buildinfo info/config.buildinfo
cd rom && sha256sum * > ../info/sha256sums.txt
elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then
cp -a openwrt/bin/targets/bcm53xx/generic/*-bcm53xx-generic-netgear_r8500-squashfs.chk rom/
cp -a openwrt/bin/targets/bcm53xx/generic/*.manifest info/manifest.txt
cp -a openwrt/bin/targets/bcm53xx/generic/config.buildinfo info/config.buildinfo
cd rom && sha256sum * > ../info/sha256sums.txt
elif [ "${{ matrix.model }}" = "armv8" ]; then
tar zcf rom/u-boot-qemu_armv8.tar.gz -C openwrt/bin/targets/armsr/armv8*/ ./u-boot-qemu_armv8
cp -a openwrt/bin/targets/armsr/armv8*/*-generic-initramfs-kernel.bin rom/
cp -a openwrt/bin/targets/armsr/armv8*/*-generic-kernel.bin rom/
cp -a openwrt/bin/targets/armsr/armv8*/*-generic-ext4-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/armsr/armv8*/*-generic-squashfs-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/armsr/armv8*/*-rootfs.tar.gz rom/
cp -a openwrt/bin/targets/armsr/armv8*/*.manifest info/manifest.txt
cp -a openwrt/bin/targets/armsr/armv8*/config.buildinfo info/config.buildinfo
cd rom && sha256sum * > ../info/sha256sums.txt
fi
cd ..
tar zcf rom/buildinfo_${{ matrix.model }}.tar.gz info
- name: Create release
uses: ncipollo/[email protected]
with:
name: OpenWrt-Test-${{ env.latest_release }}
allowUpdates: true
prerelease: true
tag: test-${{ env.latest_release }}
commit: main
replacesArtifacts: true
token: ${{ secrets.workflow_token }}
artifacts: ${{ env.WORKDIR }}/rom/*
24 changes: 3 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p align="center">
<img width="400px" src="https://camo.githubusercontent.com/55640468a9152e9657a07fea92ac6717db2b8f2e875e821bbc23390286356209/68747470733a2f2f63646e2e636f6f6c75632e636f6d2f7234732f4f70656e5772745f4c6f676f2e737667" />
<img width="400px" src="https://github.com/user-attachments/assets/6d37cd69-a232-4444-9f91-30e5942a8938" />
</p>

<h1 align="center">OpenWrt for FriendlyElec NanoPi R4S / R5S & X86_64 & Netgear R8500</h1>

<p align="center">
<img width="300px" src="https://camo.githubusercontent.com/c35d7564ca447b87cbaab1d30ead23345f3c861cba8c02163bcfb2c5e66a460b/68747470733a2f2f63646e2e636f6f6c75632e636f6d2f7234732f7235735f2e77656270" />
<img width="300px" src="https://cdn.cooluc.com/r4s/r5s_.webp" />
</p>

<p align="center">
Expand Down Expand Up @@ -56,6 +56,7 @@
| BBRv3 拥塞控制 || LLVM-BPF 支持 ||
| KVM 虚拟化加速 || Shortcut-FE(支持 UDP 入站) ||
| NGINX & CURL HTTP3/QUIC 支持 || LRNG(v54) ||
| TCP Brutal 拥塞控制 || | |

| 内置插件 | 状态 | 内置插件 | 状态 |
|:------------------------:|:----:|:----------------:|:----:|
Expand Down Expand Up @@ -127,7 +128,6 @@
<details>
<summary><b>├── 服务</b></summary>
 ├── PassWall<br/>
 ├── ShadowSocksR Plus+<br/>
 ├── HomeProxy<br/>
 ├── qBittorrent<br/>
 ├── MosDNS<br/>
Expand Down Expand Up @@ -301,26 +301,8 @@ bash -c "$(curl -sS https://r5s.cooluc.com/daed-install.sh)"

------

## 概览

![](https://cdn.cooluc.com/r4s/1.webp)

![](https://cdn.cooluc.com/r4s/menu.webp)

![](https://cdn.cooluc.com/r4s/23.05.02.webp)

![](https://cdn.cooluc.com/r4s/nanopi-ota.webp)

![](https://cdn.cooluc.com/r4s/firewall.webp)

![](https://cdn.cooluc.com/r4s/4.webp)

![](https://cdn.cooluc.com/r4s/5.webp)

![](https://cdn.cooluc.com/r4s/udp2.webp)

![](https://cdn.cooluc.com/r4s/daed.webp)

------

## 开源地址
Expand Down

0 comments on commit c579abb

Please sign in to comment.