Skip to content

Commit

Permalink
Merge pull request #118 from wychlw/package_index_sync
Browse files Browse the repository at this point in the history
Package  Sync: Add a bunch of images, add threadhold
  • Loading branch information
KevinMX authored Jan 2, 2025
2 parents bf64bcd + 6bf3355 commit e9c9d3c
Show file tree
Hide file tree
Showing 29 changed files with 544 additions and 79 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/package-index-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ on:
# push: # Uncomment this line to enable push event, but it is not recommended as it may cause unnecessary PRs. Use workflow_dispatch instead.

jobs:
check_should_run:
name: Check Should Run
runs-on: ubuntu-latest
steps:
- name: Check Should Run
run: |
echo "Event Name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "Repository Owner: ${{ github.repository_owner }}"
echo "Inputs: makepr ${{ inputs.makepr }} debuginfo ${{ inputs.debuginfo }}"
echo "Should Run Auto: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'ruyisdk' ) }}"
echo "Should Run Manual: ${{ ( github.event_name == 'workflow_dispatch' ) }}"
build:
name: Generate and Upload
runs-on: ubuntu-latest
if: ${{ ( github.event_name == 'push' && github.ref == github.ref == 'refs/heads/main' && github.repository_owner == 'ruyisdk' ) || ( github.event_name == 'workflow_dispatch' ) }}
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'ruyisdk' ) || ( github.event_name == 'workflow_dispatch' ) }}
environment: ruyi-sync
env:
GITHUB_TOKEN: ${{ secrets.GHO_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions Duo/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: milkv_duo
product: Milk-V Duo (64M)
cpu: CV1800B
cpu_core: XuanTie C906
Expand Down
2 changes: 1 addition & 1 deletion Duo256m/BuildRoot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: buildroot
sys_ver: null
sys_ver: v1.1.0
sys_var: null

status: basic
Expand Down
1 change: 1 addition & 0 deletions Duo256m/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: milkv_duo256m
product: Milk-V Duo (256M)
cpu: SG2002
cpu_core: XuanTie C906 + ARM Cortex-A53
Expand Down
2 changes: 1 addition & 1 deletion Duo_S/BuildRoot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: buildroot
sys_ver: null
sys_ver: v1.1.3
sys_var: null

status: basic
Expand Down
1 change: 1 addition & 0 deletions Duo_S/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: milkv_duos
product: Milk-V Duo S
cpu: SG2000
cpu_core: XuanTie C906 + ARM Cortex-A53
Expand Down
1 change: 1 addition & 0 deletions LicheeCluster4A/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: sipeed_licheecluster4a
product: Lichee Cluster 4A
cpu: TH1520
cpu_core: XuanTie C910 + XuanTie C906 + XuanTie E902
Expand Down
2 changes: 1 addition & 1 deletion LicheeCluster4A/RevyOS/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: revyos
sys_ver: 12
sys_ver: "20240127"
sys_var: null

status: basic
Expand Down
1 change: 1 addition & 0 deletions LicheeConsole4A/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: sipeed_licheeconsole4a
product: Lichee Console 4A
cpu: TH1520
cpu_core: XuanTie C910 + XuanTie C906 + XuanTie E902
Expand Down
2 changes: 1 addition & 1 deletion LicheeConsole4A/RevyOS/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: revyos
sys_ver: 12
sys_ver: "20240202"
sys_var: null

status: good
Expand Down
2 changes: 1 addition & 1 deletion LicheeRV_Nano/BuildRoot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: buildroot
sys_ver: null
sys_ver: "20241129"
sys_var: null

status: basic
Expand Down
2 changes: 1 addition & 1 deletion LicheeRV_Nano/Debian/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: debian
sys_ver: null
sys_ver: "v1.4.0"
sys_var: null

status: basic
Expand Down
1 change: 1 addition & 0 deletions LicheeRV_Nano/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: sipeed_licheervnano
product: LicheeRV Nano
cpu: SG2002
cpu_core: XuanTie C906 + ARM Cortex-A53
Expand Down
2 changes: 1 addition & 1 deletion Mars/BuildRoot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sys: buildroot
sys_ver: null
sys_ver: "1.0.6"
sys_var: null

status: basic
Expand Down
1 change: 1 addition & 0 deletions Mars/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: milkv_mars
product: Milk-V Mars
cpu: JH7110
cpu_core: SiFive U74 + SiFive S7 + SiFive E24
Expand Down
13 changes: 8 additions & 5 deletions STAR64/Armbian/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
sys: armbian
sys_ver: 24.5.0
sys_ver: 25.2.0-trunk.86
sys_var: null

status: cft
last_update: 2024-06-21
last_update: 2024-12-12

# Due to the complexcity in armbian mirror naming, we needs to provide the download link for sync tools in the metadata.
link: https://github.com/armbian/community/releases/download/25.2.0-trunk.86/Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img.xz
---

# Armbian Star64 Test Report
Expand All @@ -13,7 +16,7 @@ last_update: 2024-06-21

### Operating System Information

- Download Link: https://www.armbian.com/star64/
- Download Link: https://github.com/armbian/community/releases/download/25.2.0-trunk.86/Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img.xz
- Reference Installation Document: https://www.hackster.io/lupyuen/rtos-on-a-risc-v-sbc-star64-jh7110-apache-nuttx-2a7429

### Hardware Information
Expand All @@ -28,8 +31,8 @@ last_update: 2024-06-21

After downloading, unzip and flash the image (using the xfce version as an example):
```bash
unxz -k Armbian_community_24.5.0-trunk.667_Star64_jammy_edge_5.15.0_xfce_desktop.img.xz
sudo dd if=Armbian_community_24.5.0-trunk.667_Star64_jammy_edge_5.15.0_xfce_desktop.img of=/dev/your/sdcard bs=1M status=progress
unxz -k Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img.xz
sudo dd if=Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img of=/dev/your/sdcard bs=1M status=progress
```

### Logging into the System
Expand Down
6 changes: 3 additions & 3 deletions STAR64/Armbian/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### 操作系统信息

- 下载链接:https://www.armbian.com/star64/
- 下载链接:https://github.com/armbian/community/releases/download/25.2.0-trunk.86/Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img.xz
- 参考安装文档:https://www.hackster.io/lupyuen/rtos-on-a-risc-v-sbc-star64-jh7110-apache-nuttx-2a7429

### 硬件信息
Expand All @@ -19,8 +19,8 @@

下载后,解压并烧写镜像(以下以 xfce 版为例):
```bash
unxz -k Armbian_community_24.5.0-trunk.667_Star64_jammy_edge_5.15.0_xfce_desktop.img.xz
sudo dd if=Armbian_community_24.5.0-trunk.667_Star64_jammy_edge_5.15.0_xfce_desktop.img of=/dev/your/sdcard bs=1M status=progress
unxz -k Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img.xz
sudo dd if=Armbian_community_25.2.0-trunk.86_Star64_noble_edge_5.15.0_xfce_desktop.img of=/dev/your/sdcard bs=1M status=progress
```

### 登录系统
Expand Down
1 change: 1 addition & 0 deletions STAR64/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vendor: pine64_star64
product: Star64
cpu: JH7110
cpu_core: SiFive U74 + SiFive S7 + SiFive E24
Expand Down
47 changes: 47 additions & 0 deletions assets/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,50 @@ user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Ge
source = "regex"
url = "https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/"
regex = '<a href="(\d{8})/" title="\1">\1/</a>'

[sipeed_licheecluster4a-debian-null] # RevyOS is seen as Debian
source = "regex"
url = "https://mirror.iscas.ac.cn/revyos/extra/images/lpi4amain/"
regex = '<a href="(\d{8})/" title="\1">\1/</a>'

[sipeed_licheeconsole4a-debian-null]
source = "github"
github = "0x754C/sipeed-th1520-laptop-extra"
use_latest_release = true

[milkv_duo-buildroot-null]
source = "github"
github = "milkv-duo/duo-buildroot-sdk"
use_latest_release = true

[milkv_duo256m-buildroot-null]
source = "github"
github = "milkv-duo/duo-buildroot-sdk"
use_latest_release = true

[milkv_duos-buildroot-null]
source = "github"
github = "milkv-duo/duo-buildroot-sdk"
use_latest_release = true

[pine64_star64-armbian-null]
source = "github"
github = "armbian/community"
use_latest_release = true

[sipeed_licheervnano-buildroot-null]
source = "github"
github = "sipeed/LicheeRV-Nano-Build"
use_latest_release = true

[sipeed_licheervnano-debian-null]
source = "github"
github = "Fishwaldo/sophgo-sg200x-debian"
use_latest_release = true

[milkv_mars-buildroot-null]
source = "github"
github = "milkv-mars/mars-buildroot-sdk"
use_latest_release = true


8 changes: 4 additions & 4 deletions assets/generate_svgimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from src.svg_gen import SvgConf, SvgNode, SvgXml, gen_html, putconf, SvgRectContainer
from src.svg_gen import SvgText, SvgTextCenter, SvgMoveTo, SvgCR, SvgLF, SvgGroup
from src.svg_gen import SvgAdvancer, SvgSvg, SvgLine, SvgLink
from src.matrix_parser import Systems, status_map
from src.matrix_parser import Systems


def gen_svg_table(conf: SvgConf, systems: Systems, need_systems: dict[str],
Expand Down Expand Up @@ -61,8 +61,8 @@ def gen_svg_table(conf: SvgConf, systems: Systems, need_systems: dict[str],
continue
flag = True
if len(system.variant) == 1:
sys_t = SvgText(status_map(
system.variant[0].status), False)
sys_t = SvgText(
str(system.variant[0].status), False)
# Use python's dynamic feature to add link without modifying the class
sys_t.link = system.variant[0].link
board_group.append(sys_t)
Expand All @@ -71,7 +71,7 @@ def gen_svg_table(conf: SvgConf, systems: Systems, need_systems: dict[str],
for var in system.variant:
sys_var = var.sys_var if var.sys_var is not None else "main"
sys_t = SvgText(sys_var + ': ' +
status_map(var.status), False)
str(var.status), False)
# Same as above
sys_t.link = var.link
var_g.append(sys_t)
Expand Down
11 changes: 9 additions & 2 deletions assets/renew_ruyi_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import logging
import colorlog

from src.matrix_parser import Systems
from src.matrix_parser import Systems, ImageStatus
from src.ruyi_index_updator import RuyiDiff, RuyiGitRepo


Expand All @@ -35,6 +35,12 @@ def main():
arg.add_argument(
'--warn', help='output the warn to the file', default=None
)
arg.add_argument(
'--threadhold', help='the status threadhold can be synced', default='basic'
)
arg.add_argument(
'plugin_names', help='the plugins to run, default to all', nargs='*'
)
args = arg.parse_args()

handler = colorlog.StreamHandler()
Expand Down Expand Up @@ -71,7 +77,8 @@ def main():
diffs = RuyiDiff(matrix, args.config)
repo = RuyiGitRepo(index_path)

for diff in diffs.gen_diff():
threadhold = ImageStatus(args.threadhold)
for diff in diffs.gen_diff(args.plugin_names, threadhold):
pr = repo.upload_image(diff)
if pr is None:
continue
Expand Down
Loading

0 comments on commit e9c9d3c

Please sign in to comment.